Adding Custom Links to Sidebar

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
jsingleton71
Posts: 6
Joined: Mon Apr 17, 2017 8:10 am

Adding Custom Links to Sidebar

Post by jsingleton71 »

Hello All,

Is there an easy way to add links to the sidebar in Nagiox XI?

Basically I want to integrate NfSen/NfDump into my Nagios XI view without forcing it to be the homepage.

I watched the video on how to use NfSen within Nagios, but that is merely editing the homepage and using a custom URL, which is not really integrating it.

Is there a plugin or addon that allows me to add to the sidebar?

Thanks,
Jeff
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Adding Custom Links to Sidebar

Post by mcapra »

You could do that with a component. @box293 gave a talk at a past conference on the topic:
https://www.youtube.com/watch?v=wcULFg2dHLc

We also have some documentation:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Your other option would be to use Javascript via the "Custom Includes" component to append a menu item. This Javascript does that, though you won't be able to collapse the custom section:
https://pastebin.com/k5KJAu14

You could change the target to maincontentframe if you wanted the link to load into the iframe and preserve the Nagios XI GUI.
Former Nagios employee
https://www.mcapra.com/
jsingleton71
Posts: 6
Joined: Mon Apr 17, 2017 8:10 am

Re: Adding Custom Links to Sidebar

Post by jsingleton71 »

Hey great! Thank-you for the response.

I will take a look at the pastebin option and see if I can't make that work.

Again, Thanks!

Jeff
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Adding Custom Links to Sidebar

Post by cdienger »

Thanks for the update Jeff. Keep us posted on your progress or if you need anything else.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
jsingleton71
Posts: 6
Joined: Mon Apr 17, 2017 8:10 am

Re: Adding Custom Links to Sidebar

Post by jsingleton71 »

Thanks,

So the javascript method doesn't seem to work in XI 5.4.0. I left the example intact just to see if it would work, and I do not see the Custom header anywhere.

Ultimately, I just want an easy way to monitor some Netflow data on my network and Nfsen/Nfdump provides the data I need. Integrating that tool into Nagios in the same way the other things like NagVis is what I was looking for, but without having to code a lot. The option of adding a tool also seems to work for this, which may satisfy my needs, but having it on the main sidebar would be ideal.

As with everything, I will keep hacking away until I get something to work.

Jeff
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Adding Custom Links to Sidebar

Post by mcapra »

Did you do a hard refresh (crtl+f5) when adding the Javascript? I had to do that to get it to render correctly.

The end result in case there's confusion:
2017_04_17_12_36_32_Nagios_XI.png
You do not have the required permissions to view the files attached to this post.
Former Nagios employee
https://www.mcapra.com/
jsingleton71
Posts: 6
Joined: Mon Apr 17, 2017 8:10 am

Re: Adding Custom Links to Sidebar

Post by jsingleton71 »

Ok so, just to be sure I understand.

I save the js snippet from pastebin into a .js file.
Then upload it to the Custom Includes component.
Then hard refresh.

Is there anything else I need to do to get the menu to show?

Jeff

Edit:

And check the box :)
Last edited by jsingleton71 on Mon Apr 17, 2017 12:44 pm, edited 1 time in total.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Adding Custom Links to Sidebar

Post by mcapra »

You might need to reload the parent frame. I did this by clicking the big "Nagios XI" link at the top-left.
Former Nagios employee
https://www.mcapra.com/
jsingleton71
Posts: 6
Joined: Mon Apr 17, 2017 8:10 am

Re: Adding Custom Links to Sidebar

Post by jsingleton71 »

Yep it works now that I checked the box next to the js file I uploaded.

Excellent work. Thank-you!
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Adding Custom Links to Sidebar

Post by cdienger »

Thanks for the update. Can we lock the thread or did you have any more questions?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked