Page 1 of 2

Nagios map

Posted: Sun Dec 08, 2013 8:36 pm
by IvanAK
Hi all,
I have nagios 4.0.2 on CentOS 6.5 and it works well, but i have difficulties with the map. Im truing to isolate the host one from the others ( too many hosts in one place). When i go to the map iv get this circle of hosts and dots...so what im trying to achieve here is to make something like this. And yes i use parents options and the main options 2d_coords and 3d_coord but nothing is happening they all stay. There is no distance :) any suggestions ?

Re: Nagios map

Posted: Mon Dec 09, 2013 11:13 am
by slansing
How far out do your parent-child relationships extend, and how many hosts do you have?

Re: Nagios map

Posted: Mon Dec 09, 2013 11:31 am
by IvanAK
I have more than 400 hosts ... and all that are parents to 2-4 hosts .... for example i have 400 routers (parents) and all that have one switch (parent,child ) with 5-10 other hosts ( child) ... i would like to modifies the map just to look more beautiful :) .. im willing to modifies every host that i have ... :) too much free time :)

Re: Nagios map

Posted: Mon Dec 09, 2013 12:18 pm
by abrist
You could create dummy hosts that are always up and use them as parents/children to space them more out on the map. Just a thought.

Re: Nagios map

Posted: Mon Dec 09, 2013 1:45 pm
by IvanAK
Iv never meet this type of host :/, and what is the difference between normal host ? What about the 2d_coord way they dont work ?

Re: Nagios map

Posted: Mon Dec 09, 2013 2:04 pm
by slansing
A dummy host is a term used for hosts that do check against actual systems/devices/etc in your environment, they are essentially blank objects that you can use to string out your real hosts in your network. In this case it would be used to essentially bump your map out and make it a bit more fleshier.

Re: Nagios map

Posted: Mon Dec 09, 2013 4:12 pm
by IvanAK
I have never create dummy host and cant understand still how it works or how can this help me to get beater map ? Is't dis be fixed with the 2d or 3d coord ?? and way they not working when im trying to change them ?

Re: Nagios map

Posted: Mon Dec 09, 2013 4:27 pm
by abrist
I believe the coordinates are used for nagvis etc. To make a dummy host, create a new host definition using check_dummy (set it to 0), for example:

Code: Select all

define host {
    use                        generic-host            
    host_name            map dummy for datacenter
    address                 127.0.0.1
    check_command   check_dummy!0
    parents                 localhost
}
This host check will always return OK. Its parent host is the nagios server. Make it the parent of the "datacenter" or whatever subnet/hostgroup you want. This subnet will pushed out on the map ring by one, hopefully making it more readable.

Re: Nagios map

Posted: Mon Dec 09, 2013 5:24 pm
by IvanAK
i use the check_dummy as you say and the hosts iv got are in one line now ( but this i test with my home nagios experiment ":) with 5 hosts :) ) tomorrow i will test with those 400 and more to see what will happen.

And also iv go deep about this coord and iv note this when you put/configure the 2d_coord in host part/configuration, after that you should change "Layout Method" /options in the map part to "user-supplied coords" and "update" or go to cgi.cfg part and change the "default_statusmap_layout=5" to 0. Also you can change the background of the map to the image you would like ( for example iv done this with google maps simple PrtScrn and iv try to get the right coords for this 5 hosts :) too much work here but its interesting :) ) this image then place it in the "/usr/local/nagios/share/images" (in my situation) as .png or .gd2 and in the cgi.cfg file find the part "statusmap_background_image"=<image_name.gd2>" and dont forget to put 0 on the "default_statusmap_layout=0" part.

Re: Nagios map

Posted: Tue Dec 10, 2013 10:28 am
by slansing
Yeah there are some neat options nested within the map, let us know how this goes!