Statusmap modifications?

Hi all

Is there any way to combine some host and nagios process images in statusmap? Like parents local etc. definition?

I’m running nagios version 2.x

use extendedinfo.

i added these to my hosts file but you could use an extra one…

define hostextinfo {
host_name hostname
icon_image server.gif
statusmap_image server.gd2
}

Luca

I use hostextinfo.cfg file and i have same kind of definition, but the thing i’m looking for is that the way that i could remove nagios process image and replace it with some other host. So main host (parent) for everything would be host the i define. Is that complex enough?

I think it wouldn’t make much sense to have a different host as parent for everything.
Your map should be the same as your physical connections so the nagios host SHOULD be the parent for all defined hosts, if it isn’t you don’t have a consistent representation of your network… better no map than a wrong map in my opinion…

If you realy want to change it i believe it is possible… possibly modifying the nagios.gif or nagios.gd2 image should acomplish what you are looking for… but i’m not sure… as it looks like the nagios process is inserted as a parent for all hosts which don’t have parents defined, so you COULD change the image file but probably you can’t get rid of the nagios process image, except if you modify the CGI source.

Luca

ok I undestand your point, but i didn’t explain clearly enought. i have defined some check on nagios host but it appers in statusmap as diffenthost than nagios process. i would like to compine thouse so nagios process and localhost would be same under same nagios.gif.

Explaination: So i have host named NMS that runs Nagios in statusmap i have one monitored host NMS and nms’s parent Nagios Process. I was hoping tht they could be same host named nagios process or NMS.

Luca thanks for your help :slight_smile:

If this is not possible in some limits it does not matter.

So you don’t want the nagios process icon…
i think it is not possible to have the nagios process disappear on the map without working on the cgi code…

Luca

OK, I think I see what you are saying now.
What you have now in your status map is a host that is named “Nagios Process” and then you have a line that is drawn from it to the host that is running Nagios named “NMS” and you don’t like that.
I don’t see what difference it makes, but you can’t get rid of that unless you make your own map. So, if it’s that important, get nagiosmap and make your own status map layout. This statusmap application will create all the coordinates for your hostextinfo.cfg for you. All you have to do is drag and drop the hosts around with nagiosmap. This will make user-supplied coordinates and is much faster to draw, then the other types of status map types like circular/etc…

jakkedup thanks thats is what i was looking for. It is shame that there is no definition that could do the trick for every layout :slight_smile:

Thanks luca too :slight_smile:

You really should be using default_statusmap_layout=0 in the cgi.cfg file and then define the coordinates via nagiosmap. I’m telling you, with a big network like ours, the status map takes a long time to draw, but with default_statusmap_layout=0 the map is drawn in 1 or 2 seconds.

Look at your ~/src/nagios-1,2/src/statusmap.c and make sure:
int draw_nagios_icon=FALSE; /* should we drawn the Nagios process icon? */
Recompile and replace the statusmap.cgi file. Now, the proc icon won’t be there. I THINK!!!

i have it to false and it draws it… as i didn’t modify it after compiling i suppose there’s something else to it… :frowning:

Luca

PS: Looks like there’s a problemin the c file… the value for “draw_nagios_icon” is set to false at the start… but to TRUE 3 or 4 times in the file… i’m trying to change them and recompile it…
Edited Tue Jan 31 2006, 09:10AM ]

ok. this works but only partially…
the nagios process icon isn’t drawn anymore but you still have an emtpy spot in the middle of the network (working on an easy layout here so circular is still an option… )

Luca