Nagios map

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.
IvanAK
Posts: 25
Joined: Sun Mar 17, 2013 9:43 am

Nagios map

Post 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 ?
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Nagios map

Post by slansing »

How far out do your parent-child relationships extend, and how many hosts do you have?
IvanAK
Posts: 25
Joined: Sun Mar 17, 2013 9:43 am

Re: Nagios map

Post 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 :)
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Nagios map

Post 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.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
IvanAK
Posts: 25
Joined: Sun Mar 17, 2013 9:43 am

Re: Nagios map

Post 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 ?
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Nagios map

Post 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.
IvanAK
Posts: 25
Joined: Sun Mar 17, 2013 9:43 am

Re: Nagios map

Post 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 ?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Nagios map

Post 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.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
IvanAK
Posts: 25
Joined: Sun Mar 17, 2013 9:43 am

Re: Nagios map

Post 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.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Nagios map

Post by slansing »

Yeah there are some neat options nested within the map, let us know how this goes!
Locked