Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion installer/conf/container.conf
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
heartbeat_type tcp

<server>
host healthmodel-replicaset-service.kube-system
host "#{ENV['REPLICASET_SERVICE_ENDPOINT']}"
Comment thread
r-dilip marked this conversation as resolved.
Outdated
port 25227
</server>

Expand Down
11 changes: 8 additions & 3 deletions installer/scripts/tomlparser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
@logTailPath = "/var/log/containers/*.log"
@logExclusionRegexPattern = "(^((?!stdout|stderr).)*$)"
@excludePath = "*.csv2" #some invalid path
@enable_health_model = false

# Use parser to parse the configmap toml file to a ruby structure
def parseConfigMap(path)
Expand Down Expand Up @@ -121,10 +122,12 @@ def populateSettingValuesFromConfigMap(parsedConfig)
end

begin
if !parsedConfig.nil? && !parsedConfig[:agent_settings][:health_model].nil? && !parsedConfig[:agent_settings][:health_model][:enabled].nil?
if !parsedConfig.nil? && !parsedConfig[:agent_settings].nil? && !parsedConfig[:agent_settings][:health_model].nil? && !parsedConfig[:agent_settings][:health_model][:enabled].nil?
@enable_health_model = parsedConfig[:agent_settings][:health_model][:enabled]
puts "enable_health_model = #{@enable_health_model}"
else
@enable_health_model = false
Comment thread
r-dilip marked this conversation as resolved.
end
puts "enable_health_model = #{@enable_health_model}"
rescue => errorStr
puts "config::error:Exception while reading config settings for health_model enabled setting - #{errorStr}, using defaults"
@enable_health_model = false
Expand All @@ -140,7 +143,9 @@ def populateSettingValuesFromConfigMap(parsedConfig)
Dir["/etc/config/settings/*settings"].each{|file|
puts "Parsing File #{file}"
settings = parseConfigMap(file)
configMapSettings = configMapSettings.merge(settings)
if !settings.nil?
configMapSettings = configMapSettings.merge(settings)
end
}

if !configMapSettings.nil?
Expand Down
3 changes: 2 additions & 1 deletion source/code/plugin/out_mdm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ def start
if aks_region.to_s.empty?
@log.info "Environment Variable AKS_REGION is not set.. "
@can_send_data_to_mdm = false
else
aks_region = aks_region.gsub(" ","")
end
aks_region = aks_region.gsub(" ","")

if @can_send_data_to_mdm
@log.info "MDM Metrics supported in #{aks_region} region"
Expand Down