Skip to content

Commit

Permalink
Merge pull request #21 from redBorder/development
Browse files Browse the repository at this point in the history
Release 0.1.0
  • Loading branch information
malvads authored Aug 16, 2024
2 parents 97c656f + 0854095 commit 3c98ddb
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
cookbook-rb-monitor CHANGELOG
===============

## 0.1.0

- Miguel Alvarez
- [d89a1db] Fix sensor_name array invalid
- [c47a755] Fix sensor name for monitor

## 0.0.8

- Miguel Negrón
Expand Down
19 changes: 13 additions & 6 deletions resources/libraries/update_manager_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -187,14 +187,21 @@ def update_manager_config(resource)
node.default['redborder']['monitor']['count'] = node.default['redborder']['monitor']['count'] + 1
end

sensor_name = if node['redborder']['ips'] && !node['redborder']['cloud']
node['rbname']
else
resource['hostname']
end

manager_sensor = {
'timeout': 5,
'sensor_name': resource['hostname'],
'sensor_ip': resource['hostip'],
'community': resource['community'],
'snmp_version': '2c',
'monitors': manager_monitors,
'timeout' => 5,
'sensor_name' => sensor_name,
'sensor_ip' => resource['hostip'],
'community' => resource['community'],
'snmp_version' => '2c',
'monitors' => manager_monitors,
}

# Finally, add manager sensor to sensors array in config
node.default['redborder']['monitor']['config']['sensors'].push(manager_sensor)
end
Expand Down
2 changes: 1 addition & 1 deletion resources/metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
maintainer_email 'git@redborder.com'
license 'AGPL-3.0'
description 'Installs/Configures rb-monitor'
version '0.0.8'
version '0.0.9'

0 comments on commit 3c98ddb

Please sign in to comment.