Graphs to Nagvis

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
gmikhailov
Posts: 9
Joined: Wed Aug 27, 2014 4:17 am

Graphs to Nagvis

Post by gmikhailov »

Hello!
I would like to put some graphs to nagvis schemes.
I did next steps:
1. To somefile.cfg add new service us gadge:

Code: Select all

define service {
label_show=1
hover_menu=0
context_menu=0
gadget_scale=100
host_name=hostname
service_description=service
x=534
y=150
gadget_url=[/nagiosxi/includes/components/perfdata/graphApi.php?host=hostname&service=servicename&source=1&view=1&start=&end=&rand=1449124102]
view_type=gadget
}
I want to translane this graph to TV, but it looks small on it.
I tried to change param gadget_scale, but graph didn`t getting bigger.

Then I try to get right URL to Highcharts graphs, but didn`t success.

Ould You help me with size of graph or with straight URL to Highcharts graphs.

Thank You.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Graphs to Nagvis

Post by rkennedy »

Just to clarify, you're looking for a bigger graph right?

Can you provide a screenshot of how it currently appears?
Former Nagios Employee
gmikhailov
Posts: 9
Joined: Wed Aug 27, 2014 4:17 am

Re: Graphs to Nagvis

Post by gmikhailov »

Hello.
Just to clarify, you're looking for a bigger graph right?
Yes.
Can you provide a screenshot of how it currently appears?
In attachtment.
You do not have the required permissions to view the files attached to this post.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Graphs to Nagvis

Post by ssax »

I think there is a way to access the highcharts in there, I will talk with the developers on Monday and see what they have to say about getting this working for you.

Thank you
gmikhailov
Posts: 9
Joined: Wed Aug 27, 2014 4:17 am

Re: Graphs to Nagvis

Post by gmikhailov »

ssax
Thanks a lot.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Graphs to Nagvis

Post by ssax »

Ok, I've found a solution to get the standard graphs bigger, I'm unable to find a highcharts solution at this time.

Edit this file:

Code: Select all

/usr/local/nagiosxi/html/includes/components/perfdata/graphApi.php
At the top of the file, change this code:

Code: Select all

$opts = ' --width=500 --height=100 ';
To:

Code: Select all

$width=grab_request_var("width", "500");
$height=grab_request_var("height", "100");
$opts = " --width=$width --height=$height ";
Then add the width and height to the end of the gadget_url URL:

Code: Select all

define service {
label_show=1
hover_menu=0
context_menu=0
gadget_scale=100
host_name=hostname
service_description=service
x=534
y=150
gadget_url=[/nagiosxi/includes/components/perfdata/graphApi.php?host=hostname&service=servicename&source=1&view=1&start=&end=&rand=1449124102&width=1000&height=200]
view_type=gadget
}

That should get you what you need.
gmikhailov
Posts: 9
Joined: Wed Aug 27, 2014 4:17 am

Re: Graphs to Nagvis

Post by gmikhailov »

ssax
Thank You very much.
It works.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Graphs to Nagvis

Post by rkennedy »

Nice @ssax!

As this is resolved, do you mind if I close this thread out?
Former Nagios Employee
Locked