Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Total newbie to Nagios, and thanks to the help of the admins I was able to solve my installation issues and I have a functioning installation! But I am struggling to understand the documentation on how to do anything useful.
My biggest current issue is adding hosts. I don't understand why my .cfg files are not working, I have copied templates from all over trying to get a host other than localhost to show up in nagios with no luck. Here's an example of my most recent host file that includes all the directives required according to the documentation.
And I have placed the absolute path of **HOSTNAME**.cfg in the /usr/local/nagios/etc/nagios.cfg file, the **HOSTNAME**.cfg file is located under /usr/local/nagios/etc/objects/. Every time that I attempt to get this working I restart the nagios and httpd services, yet nothing ever appears.
s -la /usr/local/nagios/etc/objects
grep "<name of your config>" /usr/local/nagios/etc/nagios.cfg
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
service nagios status
Note: Modify the paths if you need to.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Oops, thought that name was used differently than host_name... Looking back at the documentation I noticed that name wasn't required but host_name is, so I commented out the name line.
Here's my output for the commands that you mentioned (Nagios is using my local account and group instead of nagios/nagcmd due to reasons out of my control)
service nagios status
nagios (pid 12247) is running...
Nothing is yelling at me when I restart Nagios, although it has in the past when I mess something up. I'm starting to think that running Nagios without the nagios account is causing this problem, but hopefully someone can prove me wrong. Hopefully I'll have approval to "take-over" the nagios account on the network soon.