adding icons to nagios map _ scottyp's blog

4
4/25/2014 Adding ICONS to Nagios Map | ScottyP's Blog http://srparkin.wordpress.com/2011/10/18/adding-icons-to-nagios-map/ 1/4 S cottyP's Blog ScottyP's NMIT Course Blog Adding ICONS to Nagios Map By default the Nagios map looks confusing, having question marks everywhere doesn’t help. as an administrator you should be able to just look at the map and automatically know whats happening. icons can make things easier to understand. by default Nagios comes with some icons and they can do the trick but they are not all that appealing to the eye, so i made my own. the default icon set can be found in: /usr/local/nagios/share/images/icons/ Here is the icon set that I created for my network: The Cloud is for internet sources, the server is ESXi physical hosts, the penguin is for Linux servers, printer for printers, the next one is a router then switch and then a windows server. The icons must be 40 X 40 pixels as this is what Nagios uses Because I am using putty with an SSH connection to my server, I can use PSFTP to put the images on to the server, PSFTP is a free FTP client that comes with putty. this will upload the icons to the Nagios server. Open PSFTP Type: open 10.10.21.3 (this is the IP address of the Nagios server) enter username and password as requested. type: put Then in widows explore find the file you want to transfer and drag and drop into the CLI Once this is done move the .png images into the appropriate file location within the Nagios install

Upload: tsibi

Post on 10-May-2017

279 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Adding ICONS to Nagios Map _ ScottyP's Blog

4/25/2014 Adding ICONS to Nagios Map | ScottyP's Blog

http://srparkin.wordpress.com/2011/10/18/adding-icons-to-nagios-map/ 1/4

ScottyP's Blog

ScottyP's NMIT Course Blog

Adding ICONS to Nagios Map

By default the Nagios map looks confusing, having question marks everywhere doesn’t help. as anadministrator you should be able to just look at the map and automatically know whats happening.

icons can make things easier to understand. by default Nagios comes with some icons and they can dothe trick but they are not all that appealing to the eye, so i made my own. the default icon set can be

found in:

/usr/local/nagios/share/images/icons/

Here is the icon set that I created for my network:

The Cloud is for internet sources, the server is ESXi physical hosts, the penguin is for Linux servers,

printer for printers, the next one is a router then switch and then a windows server.

The icons must be 40 X 40 pixels as this is what Nagios uses

Because I am using putty with an SSH connection to my server, I can use PSFTP to put the images onto the server, PSFTP is a free FTP client that comes with putty. this will upload the icons to the Nagios

server.

Open PSFTP

Type:open 10.10.21.3 (this is the IP address of the Nagios server)

enter username and password as requested.

type:put

Then in widows explore find the file you want to transfer and drag and drop into the CLI

Once this is done move the .png images into the appropriate file location within the Nagios install

Page 2: Adding ICONS to Nagios Map _ ScottyP's Blog

4/25/2014 Adding ICONS to Nagios Map | ScottyP's Blog

http://srparkin.wordpress.com/2011/10/18/adding-icons-to-nagios-map/ 2/4

/usr/local/nagios/share/images/logos/

Once this is done the image needs to be converted to GD2 file format as a part of my install I installedthe pngtogd2 converter.

pngtogd2 /usr/local/nagios/share/images/logos/Windows.png/usr/local/nagios/share/images/logos/WindowsServer.gd2 0 1

Nagios uses the gd2 image for its status maps and the png image everywhere else.

To add the images to the map, in each Template file that was made two lines need to be added

nano /usr/local/nagios/etc/objects/talos/ESXiServers/_ESXiServers.cfg

define host{

name ESXi-serveruse generic-hostcheck_period 24×7check_interval 5

retry_interval 1 max_check_attempts 10check_command check-host-alive notification_period 24×7 notification_interval 30

notification_options d,u,r contact_groups admins

hostgroups ESXi-servers register 0 icon_image ESXiServer.png statusmap_image ESXiServer.gd2

}

Add those two lines on each of the template files with the appropriate icons and all of the icons should

appear. then the map is much easier to see whats going on.

Page 3: Adding ICONS to Nagios Map _ ScottyP's Blog

4/25/2014 Adding ICONS to Nagios Map | ScottyP's Blog

http://srparkin.wordpress.com/2011/10/18/adding-icons-to-nagios-map/ 3/4

You May Like

1.

201110/18

CATEGORYInstruction Manual's

NMITPRJ300

Write commentWrite comment Comments RSS

Trackback ( 0 ) Comments ( 1 )

1. Mark

September 20th, 2013

REPLY QUOTEgreat stuff

Create a free website or blog at WordPress.com. | The monochrome Theme.

Follow

About these ads

Page 4: Adding ICONS to Nagios Map _ ScottyP's Blog

4/25/2014 Adding ICONS to Nagios Map | ScottyP's Blog

http://srparkin.wordpress.com/2011/10/18/adding-icons-to-nagios-map/ 4/4

Follow “ScottyP's Blog”

Powered by WordPress.com