Change host png icon

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
jkinning
Posts: 747
Joined: Wed Oct 09, 2013 2:54 pm

Change host png icon

Post by jkinning »

This may be a little silly but I am trying to figure out how to change the png image file on my host. I am running all SUSE Enterprise server which the cfg file has the icon_image set correctly as suse_enterprise.png. I have a couple others that are using the icon_image linux.png which is the TUX penguin. When I look at the cfg file on the Nagios XI server it says DO NOT EDIT THIS FILE BY HAND. So, what is the easiest way to change the icon_image setting?
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Change host png icon

Post by jdalrymple »

jkinning,

Logged in as an administrator:
Click Configure at the top of the screen
Click Core Configuration Manager
Click Hosts in the left-hand pane
Click on the Host Name you wish to change
Click the Misc Settings tab
There is an "Icon image" field where you can choose an alternative image. Just be sure to put your png in the location:

Code: Select all

/usr/local/nagios/share/images/logos/
mp4783
Posts: 116
Joined: Wed May 14, 2014 11:11 am

Re: Change host png icon

Post by mp4783 »

If we assume that you have an alternate PNG file that you would like to use, you can modify the Icon associated with the host by reimporting the host configuration file.

In the Nagios XI GUI, go to Configure => Core Config Manager => Hosts. Select the host whose icon you wish to change. In the "Misc Settings" tab, you will see several boxes that allow you to set the icon/status images used. These images are typically stored in /usr/local/nagios/nagiosxi/html/includes/components/nagioscore/ui/images/logos or /usr/local/nagios/share/images/logos (I'm not 100% sure which it is), but you might be able to use any location accessible to Nagios. Save and apply the configuration.

Alternatively, you can do this "manually":
- Put the new PNG image file in a location accessible to Nagios (see default paths above).
- Copy the host configuration file from /usr/local/nagios/etc/hosts to a temporary location.
- Using a text editor, modify the icon_image value to point to the file you want to use as the icon.
- Copy the modified host configuration to /usr/local/nagios/etc/import
- Change directories to /usr/local/nagios/nagiosxi/scripts
- Execute ./reconfigure_nagios.sh

This should import the modified configuration.

I have not, however, actually tried any of the above, but experience tells me they should work.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Change host png icon

Post by abrist »

Any of these methods should work for you, though changing the path through the CCM is the easiest.
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.
jkinning
Posts: 747
Joined: Wed Oct 09, 2013 2:54 pm

Re: Change host png icon

Post by jkinning »

jdalrymple wrote:jkinning,

Logged in as an administrator:
Click Configure at the top of the screen
Click Core Configuration Manager
Click Hosts in the left-hand pane
Click on the Host Name you wish to change
Click the Misc Settings tab
There is an "Icon image" field where you can choose an alternative image. Just be sure to put your png in the location:

Code: Select all

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

Thanks that was easy!
cmerchant
Posts: 546
Joined: Wed Sep 24, 2014 11:19 am

Re: Change host png icon

Post by cmerchant »

Great! We'll go ahead and close the thread. Thanks.
Locked