I’m trying to get Nagios 3.0.3 up and running.
I’m working through the Nagios manual from start to end. Everything is installed and started a-ok, but for the past day I’m been struggling to get anything other than localhost monitored.
I’ve just wiped and re-installed again to make sure I didn’t do anything “funny”. After the clean install, I started Nagios and logged on via the web interface. Everything looked good, and localhost was monitored OK.
Next I tried to add a Windows host as per the “monitoring-windows” documentation. I added the client software onto the Windows host, modified the nagios.cfg file and changed the ip address in windows.cfg. I ran nagios -v, which reported 2 hosts, restarted nagios but still only have information on localhost. The Tactical Overview shows 1 active host. The Service Detail shows only localhost. The host detail shows only localhost. The hostgroup overview shows two group, but only Linux Servers has a host - localhost; Windows Server has only the heading. Hostgroup summary shows “No matching hosts” and “No matching services” for Windows Servers. In Status Map I see three items - Winserver (grey), localhost (green) and Nagios process.
What am I forgetting to add / change?
Edit: AH! There was an old nagios process still running in memory. For whatever reason the init script didn’t kill it, but killall did
Edit: Tested over again and the init script really doesn’t work. I’ll be re-writing it to do a proper reload/restart.
Edit: Changing the kill function works great: