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.
I've always had great support and advice from this group and hope I can get the same again
I'm using Nagios 4.1.1 on Centos 7 and its all working fine, however the statusmap feature isn't doing what I want it to.
I'd like to be able to just display the hosts from one hostgroup and show red, amber or green depending on the status of the hosts and services on it and not have it still draw the whole map still.
I've seen that there are some patches for statusmap.cgi for 3x versions of Nagios that do exactly what I need but not for 4x.
Does anyone know if there is either a modified statusmap.cgi or something else I can use to do the what I need?
Mine didn't look like that.
Everything was on top of each other as I have so many hosts.
However I have specified 2d_coords now and it looks ok now.
However I did notice that all the hosts show as up and green even if there is a service on the host that is in warning or critical.
Is there a way to make the host go yellow or red if a service isn't Ok?
It should be going red as you can see in my screenshot above. Can you post a screenshot of what you're seeing now, and any changes you've made to the cgi.cfg so far?
I'll try to replicate this on my end with that information.
This is what I have now that I supplied 2d_coords to all the hosts in the hostgroup
statusmap.png (11.14 KiB) Viewed 5154 times
Which looks a bit better now.
However I understand that statusmap is at the host level and as all hosts are up they all show green.
But I have a couple of services on 2 of the hosts in the map that are either critical or warning, I would like the host in the map to show this visually without having to hover over the host and see it from the popup.
So the most severe status will be indicated on the host in the map, if a host has 1 critical and 1 warning service, the host should show red, but if there is just a warning then it should show yellow.
I have seen some patches for statusmap.c for Nagios v3x that make this possible, but thus far I haven't seen any patches or solutions for Nagios v4x.
I have done some testing on a separate box with the statusmap.
What I've found is that the out of the box statusmap.cgi doesn't indicate the status of the services on a host unless you hover over it and look at the popup.
We are going to be putting maps of different hostgroups onto large monitors on the wall in our NOC, if we just wanted to see the hosts were UP then it would be fine.
However every host in a hostgroup have services that need to be OK for the whole stack to be working correctly, so it would be ideal if at a glance the statusmap for a hostgroup would show a red or yellow ring around a host if there were services critical or in warning, whatever the most severe status was for the services on the host.
Another thing I have noticed is that currently the statusmap only puts a coloured ring around one host in the group, that host would be the one thats at the top of the tree (The main parent host) I need it to put the coloured ring around all hosts and the colour of the ring would indicate the current status of the services.
delboy1966 wrote:
We are going to be putting maps of different hostgroups onto large monitors on the wall in our NOC, if we just wanted to see the hosts were UP then it would be fine.
However every host in a hostgroup have services that need to be OK for the whole stack to be working correctly, so it would be ideal if at a glance the statusmap for a hostgroup would show a red or yellow ring around a host if there were services critical or in warning, whatever the most severe status was for the services on the host.
I would suggest using nagvis for this, its far more capable than using statusmap and designed to work well in a NOC scenario
Looking forward to seeing you all at #NagiosCon2019?
-Dedicated Lover of Nconf,PNP4Nagios and Nagvis
Yea, I tend to agree. This is part of the reason we include Nagvis with our XI installs. It's tricky though since it is a third-party project, so we can only provide so much support before it's out of our realm.
Yes I considered using Nagvis and even tried it but found it a bit of a pain to setup, the documentation isn't great.
Even when I set it up I had to manually create maps by dropping the hosts in and connecting them to their parents/child.
I tried to just get it to create the maps based on Automap function but if crashed my browser, I guess because of the number of hostgroups I have.
And its just another package that needs to be managed outside of having Nagios.
All that said I've now managed to edit the statusmap.c file in Nagios V4 by backward engineering the patch for statusmap.c for Nagios V3 so it now does the following:
On a map if all hosts and their services are Ok it reads Up in green under the host.
If any of the hosts have any services that are Critical it reads "Services Critical" in red under that host.
If any of the hosts services are in Warning and no Criticals it reads "Services in Warning" in yellow under the host.
So by just looking at the map you can see the status of all hosts and services.
I would have liked to get a, Red, Yellow or Green ring around each host based on the status of the services, but couldn't get that to work, so opted for changing the text underneath the host.
If anyone wants the statusmap.c file I can pass it on.
delboy1966 wrote:Yes I considered using Nagvis and even tried it but found it a bit of a pain to setup, the documentation isn't great.
Even when I set it up I had to manually create maps by dropping the hosts in and connecting them to their parents/child.
yeah this can be a pain but also a blessing because you can draw lines between hosts or hostgroups or maps and have that line show the status of a service e.g. a vpn link and not just its ping but its overall capacity, so its really quite powerful
and make maps icons on overview maps and all sorts of cool things like that.
I really love nagvis and if you do want to do more with it and struggle to get help feel free to PM me about it
delboy1966 wrote:
On a map if all hosts and their services are Ok it reads Up in green under the host.
If any of the hosts have any services that are Critical it reads "Services Critical" in red under that host.
If any of the hosts services are in Warning and no Criticals it reads "Services in Warning" in yellow under the host.
this is a really cool idea, would be good if it was included as standard and even better if we could toggle it on or off
Looking forward to seeing you all at #NagiosCon2019?
-Dedicated Lover of Nconf,PNP4Nagios and Nagvis