Hello,
I am currently monitoring a Windows Server 2022 machine using Nagios. I set up the monitoring using the Nagios Assistant with the plugin that supports Windows servers (not WMI). I am using NCPA with a token, and I can retrieve metrics from the machine successfully.
One of the services I am monitoring on this server is PostgreSQL. Nagios correctly detects when the PostgreSQL service stops, but the host status remains green in both the Network Status Map and Hypermap views.
I expected the host status to reflect the issue, but it remains unchanged. Is there a way to make the host status change accordingly when a critical service goes down?
Thank you for your help.
Issue with Host Status in Nagios Despite Service Down
-
- Posts: 199
- Joined: Thu Feb 09, 2017 5:07 pm
Re: Issue with Host Status in Nagios Despite Service Down
Hi @cedric974,
Thanks for your post.
Most commonly, people don't set up their Nagios monitoring in this way. Usually, people separate the hosts and services, the host could be up but the one or more significant services are down. You can set up dashboards and visualizations for services as well as hosts.
Still, Nagios is super flexible. If you only care about that one service on that host, and you want the host to show down when Postgres is down, you would change the host check to the Postgres check you have on the service.
By default, Nagios sets up the host check with ping. We're just looking to see if the thing is responsive, and (in many environments) ping is simple enough. But in some environments ping is not allowed, so people move to some other check to determine if the host is up/responsive.
Anyway, go to the CCM, open up the Postgres service that is configured, copy the check command to your clipboard or notepad, then open the host and paste that check command in there.
You may as well delete the service once the host is monitoring Postgres for the host check, since if the host check shows the host down, service checks don't run. Please note that this also means that if you have other services on that machine you are checking, those checks won't run when Postgres is down either.
Questions?
Aaron
Thanks for your post.
Most commonly, people don't set up their Nagios monitoring in this way. Usually, people separate the hosts and services, the host could be up but the one or more significant services are down. You can set up dashboards and visualizations for services as well as hosts.
Still, Nagios is super flexible. If you only care about that one service on that host, and you want the host to show down when Postgres is down, you would change the host check to the Postgres check you have on the service.
By default, Nagios sets up the host check with ping. We're just looking to see if the thing is responsive, and (in many environments) ping is simple enough. But in some environments ping is not allowed, so people move to some other check to determine if the host is up/responsive.
Anyway, go to the CCM, open up the Postgres service that is configured, copy the check command to your clipboard or notepad, then open the host and paste that check command in there.
You may as well delete the service once the host is monitoring Postgres for the host check, since if the host check shows the host down, service checks don't run. Please note that this also means that if you have other services on that machine you are checking, those checks won't run when Postgres is down either.
Questions?
Aaron
Re: Issue with Host Status in Nagios Despite Service Down
Thank you very much for your response; it's very clear. I had understood the logic, but I didn't know that services could be displayed graphically like hosts.
In my case, the most important thing is knowing whether the service is running, as that indicates that the host is online. Is there a way to display a service in the Hypermap or the Network Status Map in Nagios?
Thanks again for your help!
Cédric
In my case, the most important thing is knowing whether the service is running, as that indicates that the host is online. Is there a way to display a service in the Hypermap or the Network Status Map in Nagios?
Thanks again for your help!
Cédric
-
- Posts: 199
- Joined: Thu Feb 09, 2017 5:07 pm
Re: Issue with Host Status in Nagios Despite Service Down
Hi Cédric,
Well, I think I was thinking of a custom dashlet or something like service status overview to look at services down.
At the moment, for mapping visualizations, you're likely going to need to make the host check the postgres check.
It is an interesting use case though to have a map by most important services status, rather than simply if the host pings.
We'll take a look at what that might look like.
Aaron
Well, I think I was thinking of a custom dashlet or something like service status overview to look at services down.
At the moment, for mapping visualizations, you're likely going to need to make the host check the postgres check.
It is an interesting use case though to have a map by most important services status, rather than simply if the host pings.
We'll take a look at what that might look like.
Aaron
Re: Issue with Host Status in Nagios Despite Service Down
I will try lol...
Another question, a new post.
Thanks
Another question, a new post.
Thanks