whatap 0.4.96 → 0.4.97

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -76,7 +76,7 @@ ConfSysMon.prototype.findType = function(){
76
76
  // dynamic reload!!!
77
77
  var Configure = require('./configure');
78
78
 
79
- if (Configure.whatap_micro_enabled) {
79
+ if (Configure.whatap_micro_enabled || process.env.WHATAP_MICRO_ENABLED === "true") {
80
80
  t = this.SysType.KUBE;
81
81
  } else if (this.aws_ecs_enabled) {
82
82
  t = this.SysType.ECS;
@@ -150,7 +150,7 @@ Configuration.prototype.apply = function(properties) {
150
150
  var ips = Array.from(set);
151
151
  this.whatap_server_host = ips;
152
152
 
153
- if( this.getProperty('whatap_micro_enabled') === true){
153
+ if( this.getProperty('whatap_micro_enabled') === true || process.env.WHATAP_MICRO_ENABLED === "true"){
154
154
  this.kubeNodeName(properties);
155
155
  }
156
156
 
@@ -59,7 +59,7 @@ CounterManager.prototype.run = function () {
59
59
  self.process(tasks);
60
60
  });
61
61
 
62
- if(conf.whatap_micro_enabled){
62
+ if(conf.whatap_micro_enabled || process.env.WHATAP_MICRO_ENABLED === "true"){
63
63
  KubeUtil.loadContainerId();
64
64
  if (conf.enabled_master_agent_call) KubeClient.run();
65
65
  }
@@ -70,7 +70,7 @@ var SecurityMaster = {
70
70
  OidUtil.setType(process.env.name || Configuration.getProperty("whatap.type", "NODE"));
71
71
 
72
72
  var name_pattern;
73
- if(Configuration.getProperty('whatap_micro_enabled', false) === true){
73
+ if(Configuration.getProperty('whatap_micro_enabled', false) === true || process.env.WHATAP_MICRO_ENABLED === "true"){
74
74
  name_pattern = process.env.WHATAP_NAME || "{okind}-{ip2}-{ip3}";
75
75
  }else if(require('cluster').isMaster){
76
76
  name_pattern=process.env.WHATAP_NAME || "{type}-{ip2}-{ip3}";
@@ -90,7 +90,7 @@ var SecurityMaster = {
90
90
  this.OKIND_NAME=null;
91
91
  }
92
92
 
93
- if(Configuration.getProperty('whatap_micro_enabled', false) === false) {
93
+ if(Configuration.getProperty('whatap_micro_enabled', false) === false || process.env.WHATAP_MICRO_ENABLED === "true") {
94
94
  var onodeStr= process.env.WHATAP_ONODE || Configuration.getProperty('whatap.onode');
95
95
  console.log(onodeStr)
96
96
  if(onodeStr && onodeStr.length>0){
@@ -140,7 +140,7 @@ var SecurityMaster = {
140
140
  this.OKIND_NAME=null;
141
141
  }
142
142
 
143
- if(Configuration.getProperty('whatap_micro_enabled', false) === false) {
143
+ if(Configuration.getProperty('whatap_micro_enabled', false) === false || process.env.WHATAP_MICRO_ENABLED === "true") {
144
144
  var onodeStr= process.env.WHATAP_ONODE || Configuration.getProperty('whatap.onode');
145
145
  if(onodeStr && onodeStr.length>0){
146
146
  this.ONODE = HashUtil.hashFromString(onodeStr);
package/lib/util/index.js CHANGED
@@ -33,11 +33,11 @@ function getRandomInteger(min, max) {
33
33
  }
34
34
  function printWhatap() {
35
35
  var str =
36
- ' _ ____ ______NODE-AGENT ' + (Configure.whatap_micro_enabled === true ? "\t\t\t| | | | | | " : '')+ '\n'+
37
- '| | /| / / / ___ /_ __/__ ____' + '' + (Configure.whatap_micro_enabled === true ? "\t\t\t| | ___ _| |__ ___ _ __ _ __ ___| |_ ___ ___ " : '')+ '\n'+
38
- '| |/ |/ / _ \\/ _ `// / / _ `/ _ \\' + '' + (Configure.whatap_micro_enabled === true ? "\t\t\t| |/ / | | | '_ \\ / _ \\ '__| '_ \\ / _ \\ __/ _ \\/ __|" : '')+ '\n'+
39
- '|__/|__/_//_/\\_,_//_/ \\_,_/ .__/' + '' + (Configure.whatap_micro_enabled === true ? "\t\t\t| <| |_| | |_) | __/ | | | | | __/ || __/\\__ \\" : '')+ '\n'+
40
- ' /_/ ' + '' + (Configure.whatap_micro_enabled === true ? "\t\t\t|_|\\_\\\\__,_|_.__/ \\___|_| |_| |_|\\___|\\__\\___||___/" : '')+ '\n'+
36
+ ' _ ____ ______NODE-AGENT ' + (Configure.whatap_micro_enabled === true || process.env.WHATAP_MICRO_ENABLED === "true" ? "\t\t\t| | | | | | " : '')+ '\n'+
37
+ '| | /| / / / ___ /_ __/__ ____' + '' + (Configure.whatap_micro_enabled === true || process.env.WHATAP_MICRO_ENABLED === "true" ? "\t\t\t| | ___ _| |__ ___ _ __ _ __ ___| |_ ___ ___ " : '')+ '\n'+
38
+ '| |/ |/ / _ \\/ _ `// / / _ `/ _ \\' + '' + (Configure.whatap_micro_enabled === true || process.env.WHATAP_MICRO_ENABLED === "true" ? "\t\t\t| |/ / | | | '_ \\ / _ \\ '__| '_ \\ / _ \\ __/ _ \\/ __|" : '')+ '\n'+
39
+ '|__/|__/_//_/\\_,_//_/ \\_,_/ .__/' + '' + (Configure.whatap_micro_enabled === true || process.env.WHATAP_MICRO_ENABLED === "true" ? "\t\t\t| <| |_| | |_) | __/ | | | | | __/ || __/\\__ \\" : '')+ '\n'+
40
+ ' /_/ ' + '' + (Configure.whatap_micro_enabled === true || process.env.WHATAP_MICRO_ENABLED === "true" ? "\t\t\t|_|\\_\\\\__,_|_.__/ \\___|_| |_| |_|\\___|\\__\\___||___/" : '')+ '\n'+
41
41
  'Just Tap, Always Monitoring' + '\n'+
42
42
  'WhaTap Node Agent version ' + NodeUtil.getVersion() + ', ' + NodeUtil.getReleaseDate();
43
43
  console.log(str);
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "whatap",
3
3
  "homepage": "http://www.whatap.io",
4
- "version": "0.4.96",
5
- "releaseDate": "20240530",
4
+ "version": "0.4.97",
5
+ "releaseDate": "20240603",
6
6
  "description": "Monitoring and Profiling Service",
7
7
  "main": "index.js",
8
8
  "scripts": {},