We help IT Professionals succeed at work.

nagios on linux

bkreynolds48
bkreynolds48 asked
on
548 Views
Last Modified: 2012-05-08
Can you tell me some of the nagios commands to see if it is running and to restart and check the status on a linux machine?
Comment
Watch Question

Commented:
You can run the top command to see all running processes.  You should see the nagios process running.


From the command line, I use the following.

service nagios status    --Tells you if it's running or not
service nagios reload   --Reloads a new config, or just reloads to memory
service nagios stop   --Stops the nagios process
service nagios restart   --Stops and restarts the nagios process

Author

Commented:
service nagios status
 service: not found [No such file or directory]
Should these not be nrpe commands?
 


Commented:
The nrpe commands usually perform a nagios plugin check, at least that's my understanding of it.

It sounds like your nagios isn't running, have you ran /usr/local/nagios/bin/nagios -v PATHTONAGIOSCONFIGFILE

Author

Commented:

./nagios -v /usr/nagios/etc/nagios.cfg
Nagios 3.0
Copyright (c) 1999-2008 Ethan Galstad (http://www.nagios.org)
Last Modified: 03-13-2008
License: GPL
Reading configuration data...
Running pre-flight check on configuration data...
Checking services...
        Checked 60 services.
Checking hosts...
Warning: Host 'border-fw' has no services associated with it!
Warning: Host 'office-fw' has no services associated with it!
        Checked 10 hosts.
Checking host groups...
        Checked 3 host groups.
Checking service groups...
        Checked 1 service groups.
Checking contacts...
        Checked 5 contacts.
Checking contact groups...
        Checked 5 contact groups.
Checking service escalations...
        Checked 0 service escalations.
Checking service dependencies...
        Checked 0 service dependencies.
Checking host escalations...
        Checked 0 host escalations.
Checking host dependencies...
        Checked 7 host dependencies.
Checking commands...
        Checked 12 commands.
Checking time periods...
        Checked 3 time periods.
Checking for circular paths between hosts...
Checking for circular host and service dependencies...
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...


Total Warnings: 2
Total Errors:   0
Things look okay - No serious problems were detected during the pre-flight check
 
Does that mean nagios is running?

Commented:
Hmm no that just means your config file seems to be in good shape.


If you run this command:

/usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg

that would manually start nagios.   You should then see it in top.

?

Author

Commented:
So in top I should see a nagios process?

Commented:
Yes...  if you hit Shift-P in top, it will sort by processor usage... it should be near the top.
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
Thanks so much - It seems to be running OK now.
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.