Page 1 of 1

Graphs to Nagvis

Posted: Thu Dec 03, 2015 9:26 am
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.

Re: Graphs to Nagvis

Posted: Thu Dec 03, 2015 4:10 pm
by rkennedy
Just to clarify, you're looking for a bigger graph right?

Can you provide a screenshot of how it currently appears?

Re: Graphs to Nagvis

Posted: Fri Dec 04, 2015 12:46 am
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.

Re: Graphs to Nagvis

Posted: Fri Dec 04, 2015 3:30 pm
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

Re: Graphs to Nagvis

Posted: Sat Dec 05, 2015 1:38 am
by gmikhailov
ssax
Thanks a lot.

Re: Graphs to Nagvis

Posted: Mon Dec 07, 2015 3:04 pm
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.

Re: Graphs to Nagvis

Posted: Tue Dec 08, 2015 1:33 am
by gmikhailov
ssax
Thank You very much.
It works.

Re: Graphs to Nagvis

Posted: Tue Dec 08, 2015 10:26 am
by rkennedy
Nice @ssax!

As this is resolved, do you mind if I close this thread out?