Ticket ID #227 ‐ Sub‐ticket ‐ Expand Nagios Monitoring with Puppet - GriffinKat/group-a GitHub Wiki
Expand Nagios Monitoring with Puppet
Go to
/etc/puppetlabs/code/modules/nagios/manifests
In the config.pp file copy and paste this block of code so there is a Nagios host to monitor each server
nagios_host { 'apps-a': <Edit here so there is one block each for 'apps' 'backup' and 'mgmt'
target => '/etc/nagios4/conf.d/ppt_hosts.cfg',
alias => 'apps', _< Edit here too _
check_period => '24x7',
max_check_attempts => 3,
check_command => 'check-host-alive',
notification_interval => 30,
notification_period => '24x7',
notification_options => 'd,u,r',
mode => '0444',
}
Define a Nagios host to monitor the application server
Check Nagios status here and click 'hosts'
-
Validate Nagios configuration:
sudo nagios4 -v /etc/nagios4/nagios.cfg
-
Check Nagios logs:
sudo tail -n 50 /var/log/nagios4/nagios.log
-
Verify file permissions:
sudo chown -R nagios:nagios /etc/nagios4