site24x7_apminsight 1.8.5.1 → 1.8.6

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.
@@ -24,7 +24,7 @@ module ManageEngine
24
24
  @alreadyconnected = checkAgentInfo
25
25
  @site24x7 = checkLicenseFile
26
26
  if (@site24x7)
27
- @site24x7url = @license_key.start_with?('eu_') ? @obj.constants.site24x7EUurl : @license_key.start_with?('cn_') ? @obj.constants.site24x7CNurl : @license_key.start_with?('au_') ? @obj.constants.site24x7AUurl : @license_key.start_with?('in_') ? @obj.constants.site24x7INurl : @license_key.start_with?('gd_') ? @obj.constants.site24x7GDurl : @obj.constants.site24x7USurl
27
+ @site24x7url = @license_key.start_with?('eu_') ? @obj.constants.site24x7EUurl : @license_key.start_with?('cn_') ? @obj.constants.site24x7CNurl : @license_key.start_with?('au_') ? @obj.constants.site24x7AUurl : @license_key.start_with?('in_') ? @obj.constants.site24x7INurl : @license_key.start_with?('gd_') ? @obj.constants.site24x7GDurl : @license_key.start_with?('jp_') ? @obj.constants.site24x7JPurl : @obj.constants.site24x7USurl
28
28
  end
29
29
  @db_operations =["select","insert","update","delete"]
30
30
  urlMergePattern
@@ -121,15 +121,14 @@ module ManageEngine
121
121
  end
122
122
 
123
123
  def checkLicenseFile
124
- if(@license_key != nil)
125
- @obj.log.info "License key is not null. Connecting to site24x7"
126
- @obj.constants.setLicenseKey @license_key
127
- true
128
- else
129
- @obj.log.info "License key is null. Connecting to APPManager"
130
- false
131
- end
132
-
124
+ @obj.constants.setLicenseKey @license_key
125
+ if(@license_key.start_with?('APMI_'))
126
+ @obj.log.info "Connecting to App Manager"
127
+ false
128
+ else
129
+ @obj.log.info "Connecting to Site24x7"
130
+ true
131
+ end
133
132
  end
134
133
 
135
134
  def urlMergePattern
@@ -39,17 +39,20 @@ module ManageEngine
39
39
  resp = nil
40
40
  if @obj.config.alreadyconnected
41
41
  @obj.log.debug "[doConnect] Already Connected - Make Contact - Instance id = #{@obj.config.instance_id}"
42
- if @obj.config.site24x7
43
- resp = startConnect "?license.key="+@obj.config.license_key+"&instance_id="+@obj.config.instance_id,agentInfo
44
- else
45
- resp = startConnect "?instance_id="+@obj.config.instance_id,agentInfo
46
- end
42
+ resp = startConnect "?license.key="+@obj.config.license_key+"&instance_id="+@obj.config.instance_id,agentInfo
47
43
  else
48
44
  @obj.log.debug "[doConnect] Going to connect - New "
49
- if @obj.config.site24x7
50
- resp = startConnect "?license.key="+@obj.config.license_key,agentInfo
45
+ # if @obj.config.site24x7
46
+ # resp = startConnect "?license.key="+@obj.config.license_key,agentInfo
47
+ # else
48
+ # resp = startConnect "",agentInfo
49
+ # end
50
+ # Checking the license pattern for APM as per team requirement
51
+ if !@obj.config.site24x7 && !@obj.config.license_key.match?("APMI_[A-Fa-f0-9]{64}")
52
+ @obj.log.info "Invalid license key for App Manager, aborting agent init"
53
+ @obj.shutdown=true
51
54
  else
52
- resp = startConnect "",agentInfo
55
+ resp = startConnect "?license.key="+@obj.config.license_key,agentInfo
53
56
  end
54
57
  end
55
58
 
@@ -16,7 +16,7 @@ class APMWorker
16
16
  @obj = ManageEngine::APMObjectHolder.instance
17
17
 
18
18
  if @status=="working"
19
- @obj.log.debug "woker thread already started"
19
+ @obj.log.debug "worker thread already started"
20
20
  elsif @status == "initialized"
21
21
  @obj.log.info "start worker thread for - #{Process.pid} :: #{@status} "
22
22
  #@obj.log.info "Starting APMWorker Thread #{Process.pid} "
@@ -3,7 +3,7 @@ module ManageEngine
3
3
  class APMConstants
4
4
 
5
5
  attr_reader :conf_location, :apm_gem,:s247_apm_gem,:apm_conf,:agent_conf,:connection_open_timeout,:connection_read_timeout,:connect_uri,:connect_data_uri,:connect_trace_uri,:connect_config_update_uri,:mergepattern_conf
6
- attr_reader :site24x7USurl, :site24x7EUurl, :site24x7CNurl, :site24x7INurl, :site24x7AUurl, :site24x7GDurl
6
+ attr_reader :site24x7USurl, :site24x7EUurl, :site24x7CNurl, :site24x7INurl, :site24x7AUurl, :site24x7GDurl, :site24x7JPurl
7
7
  attr_reader :licence_exceeds,:licence_expired,:unmanage_agent,:manage_agent,:agent_config_updated,:error_notfound,:error_server,:delete_agent,:response_code,:custom_config_info, :agent_specific_info
8
8
  attr_reader :mf_transaction,:mf_separator,:mf_db,:mf_apdex,:mf_namespace,:mf_name,:mf_all,:agent_store,:agent_lock,:mf_overflow
9
9
  attr_reader :mf_logmetric, :mf_logmetric_warning, :mf_exception_st, :mf_err_st, :mf_loginfo, :mf_loginfo_time, :mf_loginfo_level, :mf_loginfo_str, :mf_loginfo_err_clz, :mf_loginfo_st, :mf_loginfo_level_warn
@@ -56,6 +56,7 @@ module ManageEngine
56
56
  @site24x7AUurl = "https://plusinsight.site24x7.net.au/"
57
57
  @site24x7INurl = "https://plusinsight.site24x7.in/"
58
58
  @site24x7GDurl = "https://gdplusinsight.site24x7.com/"
59
+ @site24x7JPurl = "https://plusinsight.site24x7.jp/"
59
60
 
60
61
  #Response Codes
61
62
  @licence_expired = 701
data/lib/agent/version.rb CHANGED
@@ -6,8 +6,8 @@
6
6
 
7
7
  module ManageEngine
8
8
  class APMInsight
9
- VERSION = '1.8.5.1'
9
+ VERSION = '1.8.6'
10
10
  MAJOR_VERSION = '1.8'
11
- MINOR_VERSION = '5.1'
11
+ MINOR_VERSION = '6'
12
12
  end
13
13
  end
metadata CHANGED
@@ -5,9 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 8
8
- - 5
9
- - 1
10
- version: 1.8.5.1
8
+ - 6
9
+ version: 1.8.6
11
10
  platform: ruby
12
11
  authors:
13
12
  - Adithyan P
@@ -15,7 +14,7 @@ autorequire:
15
14
  bindir: bin
16
15
  cert_chain: []
17
16
 
18
- date: 2021-07-06 00:00:00 +05:30
17
+ date: 2022-08-26 00:00:00 +05:30
19
18
  default_executable:
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency