OS icon and statusmap images

Having issues? Post them here, and help other users.
Post Reply
Kuesco
Junior Member
Posts: 8
Joined: Fri Nov 10, 2017 6:56 am

OS icon and statusmap images

Post by Kuesco »

Hi everybody,

In NConf i can see eight OS descriptions already created each with a gif image and a .gd2 file associated. By example the FreeBSD OS has got base/freebsd40.gif as icon and base/freebsd.gd2 as statusmap image.

Question: Can i add new images to use when I create new OS descriptions? (i can´t find the base/ directory where the images should go). Maybe a basic question but i can´t find that directory.
User avatar
kd4pyr
Junior Member
Posts: 28
Joined: Wed Jul 05, 2017 4:56 pm

RE: OS icon and statusmap images

Post by kd4pyr »

I have updated and added some OS image files.  Take a look in:

/usr/share/nagios3/htdocs/images/logos/
Rick
User avatar
Robbie Ferguson
Posting Freak
Posts: 835
Joined: Wed Mar 07, 2012 3:23 pm
Location: Ontario, Canada
Contact:

RE: OS icon and statusmap images

Post by Robbie Ferguson »

Sure. You'd need to submit your pull requests: https://github.com/Cat5TV/nems-www/tree ... ios_themes

On your NEMS filesystem, this is found in /var/www/html/share/nagios_themes - but don't edit them there directly (as you will break the git connection and make it so your NEMS server no longer gets updates). You're better to fork, then move the official nems-www, then clone your own, then edit, then PR, then restore.   :)

If that's not doable, just post a ZIP with the images here in the forum as a feature request and I'll push it out as soon as I can.
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
User avatar
zinfra
Junior Member
Posts: 9
Joined: Thu Mar 22, 2018 7:28 am
Location: Suisse
Contact:

RE: OS icon and statusmap images

Post by zinfra »

there are 2 directories for nconf,  small and big icons
small  12x12 px:
/var/www/nconf/img/logos/base/

big 40x40 px:
/usr/share/nagios/htdocs/images/logos/base/

copy the gif and gd2 files to their respective directories,  then in nconf
additional items -> OS -> add
- Name of the new OS
- names of the gif and gd2 files
for example: base/centos7.gif / base/centos7.gd2

when you create a new host
on OS field select your new OS

I'm sorry for my english but it's not really my language ;)

Zinfra
User avatar
Robbie Ferguson
Posting Freak
Posts: 835
Joined: Wed Mar 07, 2012 3:23 pm
Location: Ontario, Canada
Contact:

RE: OS icon and statusmap images

Post by Robbie Ferguson »

You can, but doing so locally would mean if you ever have to rebuild your NEMS server, you'd have to redo it all.

I would suggest instead that you send the files (assuming they are freely available / royalty free) so I can include them directly in NEMS Linux for the benefit of yourself and other NEMS Linux users. That way, they exist within the OS and will be included next time you flash.

Are there particular icons you need?

Robbie
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
bhil923
Junior Member
Posts: 2
Joined: Wed May 02, 2018 11:53 am

RE: OS icon and statusmap images

Post by bhil923 »

If anyone is interested, this is how I changed the icons for myself.  First I created my icons in GIF and PNG (although not sure where we need the PNG files yet). I created a temp directory on the root of the NEMS system ( \temp) so that I can easily copy from another system via the scp command.

You'll need libgd-tools on the nems system.  
- sudo apt-get libgd-tools
- follow the prompts

Once installed you can continue. (assuming you have a temp directory \temp and your first image is printer40.gif)
- run the following: pngtogd2 \temp\printer40.png \temp\printer40.gd2 0 1

Now you have the gd2 file

Now copy the gif and gd2 to the proper directories
- sudo cp /temp/printer40.gif /var/www/html/share/nagios_templates/nems-1.3/images/logos/base
- sudo cp /temp/printer40.gd2 /var/www/html/share/nagios_templates/nems-1.3/images/logos/base
- sudo cp /temp/printer40.gif /var/www/html/nconf/img/logos/base

Now you will have the icons in NConf and Nagios.  Make sure to create new a new "OS" in NConf
- Add OS
- Name the OS something appropriate, Printer in this case
- Add the icon image base/printer40.gif
- Add the status map image base/printer40.gd2

Assign the OS to your proper hosts

Now "Generate Nagios Config" and deploy your image.

Hopefully this helps some people.  I've already created a few icons for myself, but it takes a little tweaking of the images to make them work for all background colors.  

Ps... Thanks Robbie! The NEMS setup was much easier then doing the full Nagios Core route which I started with a few months back.  Just finished converting all of my setup to work on NEMS (I was on Nagios 4.3.4 on my other systems but wanted to deploy a few of these Pi's to my different offices.)
Last edited by bhil923 on Fri May 11, 2018 4:17 pm, edited 1 time in total.
ildylan
Junior Member
Posts: 1
Joined: Sun Oct 20, 2019 10:51 am

RE: OS icon and statusmap images

Post by ildylan »

Amheus
Junior Member
Posts: 3
Joined: Thu Jun 11, 2020 4:10 pm
Location: Wales, UK

Re: RE: OS icon and statusmap images

Post by Amheus »

bhil923 wrote: Fri May 11, 2018 3:58 pm If anyone is interested, this is how I changed the icons for myself.  First I created my icons in GIF and PNG (although not sure where we need the PNG files yet). I created a temp directory on the root of the NEMS system ( \temp) so that I can easily copy from another system via the scp command.

You'll need libgd-tools on the nems system.  
- sudo apt-get libgd-tools
- follow the prompts

Once installed you can continue. (assuming you have a temp directory \temp and your first image is printer40.gif)
- run the following: pngtogd2 \temp\printer40.png \temp\printer40.gd2 0 1

Now you have the gd2 file

Now copy the gif and gd2 to the proper directories
- sudo cp /temp/printer40.gif /var/www/html/share/nagios_templates/nems-1.3/images/logos/base
- sudo cp /temp/printer40.gd2 /var/www/html/share/nagios_templates/nems-1.3/images/logos/base
- sudo cp /temp/printer40.gif /var/www/html/nconf/img/logos/base

Now you will have the icons in NConf and Nagios.  Make sure to create new a new "OS" in NConf
- Add OS
- Name the OS something appropriate, Printer in this case
- Add the icon image base/printer40.gif
- Add the status map image base/printer40.gd2

Assign the OS to your proper hosts

Now "Generate Nagios Config" and deploy your image.

Hopefully this helps some people.  I've already created a few icons for myself, but it takes a little tweaking of the images to make them work for all background colors.  

Ps... Thanks Robbie! The NEMS setup was much easier then doing the full Nagios Core route which I started with a few months back.  Just finished converting all of my setup to work on NEMS (I was on Nagios 4.3.4 on my other systems but wanted to deploy a few of these Pi's to my different offices.)
I know I'm slightly late to the party, but has anyone got a complete list of directories that require populating, I did a look last night and there seem to be dozens (if not hundreds).
plawer
Junior Member
Posts: 5
Joined: Thu Jun 04, 2020 9:57 am

Re: OS icon and statusmap images

Post by plawer »

I'd love to see Pi logos as standard
https://exchange.nagios.org/directory/G ... Pi/details
Post Reply