Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.1.0 #21

Merged
merged 7 commits into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
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'
Loading