Perfdata Graph only integer

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
suportenebrasil
Posts: 9
Joined: Tue Aug 06, 2019 2:25 pm
Contact:

Re: Perfdata Graph only integer

Post by suportenebrasil »

Thank you, I'll be waiting. I am trying as per these other comments:
https://stackoverflow.com/questions/166 ... eger-value
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Perfdata Graph only integer

Post by tgriep »

One thing to note, the graph templates only work with the legacy versions of the Graphs, not the Highchart version of the graph.

Go switch to the Legacy version, go to the Admin > System Settings menu and click on the Theme & Display Tab.
Deselect the box for "Use Highcharts for Performance Graphs page and host/service detail pages (host/service popup graph always uses Highcharts)" and save the settings.

Go to the Service Details for the Service and Click on the Performance Graphs Tab, that is where you will see the Legacy version of the Graphs.

If you still see the decimal places after the integer, you can edit the check_testgraph_gauge.php file and change this from

Code: Select all

$def[1] .= "GPRINT:var1:LAST:\"%3.4lg %s$UNIT[1] LAST \" "; 
$def[1] .= "GPRINT:var1:MAX:\"%3.4lg %s$UNIT[1] MAX \" "; 
$def[1] .= "GPRINT:var1:AVERAGE:\"%3.4lg %s$UNIT[1] AVERAGE \" "; 
to

Code: Select all

$def[1] .= "GPRINT:var1:LAST:\"%3.4lg %s$UNIT[1] LAST \" "; 
$def[1] .= "GPRINT:var1:MAX:\"%3.4lg %s$UNIT[1] MAX \" "; 
$def[1] .= "GPRINT:var1:AVERAGE:\"%3.4lg %s$UNIT[1] AVERAGE \" "; 
And that should strip off the Decimal points from the graph.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
suportenebrasil
Posts: 9
Joined: Tue Aug 06, 2019 2:25 pm
Contact:

Re: Perfdata Graph only integer

Post by suportenebrasil »

Thanks!
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Perfdata Graph only integer

Post by scottwilkerson »

suportenebrasil wrote:Thanks!
Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked