Hi
My nagios server sits behind a firewall wall in a DMZ zone. If the server itself is down OR the nagios daemon has fallen over it will not be able to send messages to the admins and we wouldn't have a clue that something is wrong with any of the machines/services it monitors.
I already have some checks (e.g. ping) from one of my servers I have in a datacenter, this one will send us admins a SMS if the hosts it monitors are not happy.
How can I check a Nagios server itself that it is alive and well?
Is there any flag I can POST to "status.cgi" that will just return "I am OK!"?
Thanks
Jobst
How can I monitor a Nagios Server from external server?
Re: How can I monitor a Nagios Server from external server?
check_http should work to check the front-end, but that won't tell you anything about whether or not the Nagios Core daemon is running. Like so:jobst wrote: Is there any flag I can POST to "status.cgi" that will just return "I am OK!"?
Code: Select all
[root@capra_nag ~]# /usr/local/nagios/libexec/check_http -H localhost -u /nagios/cgi-bin/status.cgi -a nagiosadmin:hunter2 -e 200
HTTP OK: Status line output matched "200" - HTTP/1.1 200 OK - 50068 bytes in 0.026 second response time |time=0.025602s;;;0.000000 size=50068B;;;0
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: How can I monitor a Nagios Server from external server?
Thanks @mcapra
I also will add that many people monitor their monitoring server from a second Nagios server.
I would suggest monitoring it just like you would any other critical server/service.
Install NRPE, on your monitoring server, monitor disk, load, memory and the nagios service at the very minimum.
I also will add that many people monitor their monitoring server from a second Nagios server.
I would suggest monitoring it just like you would any other critical server/service.
Install NRPE, on your monitoring server, monitor disk, load, memory and the nagios service at the very minimum.
Re: How can I monitor a Nagios Server from external server?
Isn't that a little overkill?scottwilkerson wrote:Thanks @mcapra
I also will add that many people monitor their monitoring server from a second Nagios server.
I would suggest monitoring it just like you would any other critical server/service.
Install NRPE, on your monitoring server, monitor disk, load, memory and the nagios service at the very minimum.
I think it would be a good idea if there is a script (as part of Nagios) running on an external server scheduled by crontab that sources a special cgi script raising an alarm via email/sms/XYZ when the Nagios server does not respond. This way you make sure, too, that the Internet connection that is utilised by the Nagios server is monitored.
That monitor could also be part of the set of machines the Nagios server monitors anyway.
No need to look after more daemons - I already have enough of them in my head.
Jobst
Re: How can I monitor a Nagios Server from external server?
You're more than welcome to submit a request on the GitHub. I know of at least one recent issue raised for similar functionality:jobst wrote: I think it would be a good idea if there is a script (as part of Nagios) running on an external server scheduled by crontab that sources a special cgi script raising an alarm via email/sms/XYZ when the Nagios server does not respond.
https://github.com/NagiosEnterprises/na ... issues/428
The script itself would be trivial; Whether or not it is implemented is more a general lifecycle/support discussion that would need to happen.
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/