OS level checks on Nagios
Ubuntu OS Release Check
Login to server
• cd /home/Nagios/bin/
• ls
We can see here different file in red and purple color
- Purple color file – Already installed plugins
- Red color file – We have configured that
Also we have created symlink for purple color files, which have already installed plugins.
Purpose of symlink is, if installed some server updates or restarts server, then also we don’t have replace that plugins again at /home/Nagios/bin/
If we have to check OS release, then run below command
• ./check_os_release.py
Configuring OS Release Check for Server
Ex. for dev.apoyar
Login to nagios.apoyar
• As nagios user and enter password (Locutus1)
• cd /plugins
Copy python config file from Nagios.apoyar to dev.apoyar using below command
• scp check_os_release.py dev.apoyar:/home/nagios/bin/
Then exit Nagios user and login as neal
• su
• Password – ap0yar
• Go to below path
• cd /usr/local/etc/nagios/objects/
• vi services.cfg
and add server name (ApoyarDev) under OS Release in hostnames
save and exit file (:wq!)
Run below command for syntax error check
• /usr/local/bin/nagios -v /usr/local/etc/nagios/nagios.cfg
And at last restart Nagios process fom nagios.apoyar.net