Page 1 of 1
Nagios XI and Nagvis Service/Host Graph's
Posted: Mon Sep 15, 2014 2:15 am
by mkeil77
Hi,
I'm currently trying to add some graphs to mi Nagvis setup (hover template)
But all i could find till now in regards to Nagios and Nagvis is related to Nagios core with pnp4nagios.
i know that the link to the php graphs is something like http://[nagios_server_IP]/nagiosxi/includes/components/perfdata/graphApi.php?host=[host_name]&service=[Service_Name]&source=1&view=1&start=&end=&rand=1365528046
but how could that be added to Nagvis?
hope someone could help since the nagvis forum is onyx referring back to here as soon as they see/hear of nagios xi.
regards
Matthias
Re: Nagios XI and Nagvis Service/Host Graph's
Posted: Mon Sep 15, 2014 5:02 pm
by abrist
Well, XI provides two methods for graph display: pnp4nagios and highcharts. Do you know which one you are using? What version of XI are you currently running?
On 2014, I turned off the highcharts api. I then followed the following suggestion from James Barnes:
http://lists.mathias-kettner.de/piperma ... 00070.html
It is old. I changed the url mentioned to:
Code: Select all
/nagiosxi/includes/components/perfdata/graphApi.php?host=[pnp_hostname]&service=[pnp_service_description]&source=1&view=1&start=&end=&rand=1410817866
But did not get a graph. I then hardcoded the hostname (192.168.4.39) and service description (_HOST_) into the url:
Code: Select all
/nagiosxi/includes/components/perfdata/graphApi.php?host=192.168.4.39&service=_HOST_&source=1&view=1&start=&end=&rand=1410818178
This worked for hovers. I am unsure though what is wrong with the [pnp_hostname] and [pnp_service_description] variables/parameters.
Re: Nagios XI and Nagvis Service/Host Graph's
Posted: Mon Sep 15, 2014 5:04 pm
by slansing
Yes,
You would likely have to use PNP4Nagios graphs in Nagvis unless you follow what Abrist suggested, an alternative would be using the Highcharts graphs from Host/Service details, or Home > Graph Explorer in a dashboard, if you are only looking for graphs. You could use something like:
http://docs.nagvis.org/1.5/en_US/gadgets.html
Or:
http://blog.stefandanielschwarz.de/2010 ... -with.html
Let us know if you are stuck at a specific point, or if you already tried adding a PNP graph, let us know what the results where.
Re: Nagios XI and Nagvis Service/Host Graph's
Posted: Tue Sep 16, 2014 12:09 am
by mkeil77
Hi Abrist,
I'm currently on Nagios XI 2014R1.4 without any changes in the default setup of the graph. so i guess I'm using the high charts.
I will check how to with then fully to pnp4nagios.
abrist wrote:Well, XI provides two methods for graph display: pnp4nagios and highcharts. Do you know which one you are using? What version of XI are you currently running?
On 2014, I turned off the highcharts api. I then followed the following suggestion from James Barnes:
http://lists.mathias-kettner.de/piperma ... 00070.html
It is old. I changed the url mentioned to:
Code: Select all
/nagiosxi/includes/components/perfdata/graphApi.php?host=[pnp_hostname]&service=[pnp_service_description]&source=1&view=1&start=&end=&rand=1410817866
But did not get a graph. I then hardcoded the hostname (192.168.4.39) and service description (_HOST_) into the url:
Code: Select all
/nagiosxi/includes/components/perfdata/graphApi.php?host=192.168.4.39&service=_HOST_&source=1&view=1&start=&end=&rand=1410818178
This worked for hovers. I am unsure though what is wrong with the [pnp_hostname] and [pnp_service_description] variables/parameters.
Re: Nagios XI and Nagvis Service/Host Graph's
Posted: Tue Sep 16, 2014 3:05 am
by mkeil77
Hi,
after some updates in the hover template as suggested by Abrist its now working.
see attached template.
thanks for help
Matthias
Re: Nagios XI and Nagvis Service/Host Graph's
Posted: Tue Sep 16, 2014 9:12 am
by tmcdonald
Sounds great! I'll be closing this thread now, but feel free to open another if you need anything in the future!