I take no responsibility for this ‘hack’. USE AT YOUR OWN RISK.
Open Poller.php
Find Line 171
Paste the code below.
Code: Select all
/* Graph Polling Times */
$time = fopen('scripts/pollertime.txt', 'w');
fwrite($time, round($end-$start,4));
fclose($time);
Next
Copy Pollertime.php into the scripts/ directory.
Data Input Method:
Click Add
Name: Cacti Poller Time
Type: Script/Command
String: <path_php_binary> -q <path_cacti>/scripts/pollertime.php <path_cacti>/scripts/pollertime.txt
Click Create
Add Output Fields
Click Add
Field [Output]: time
Friendly Name: seconds
Output Fields: checked
Create
Data Sources:
Click Add
Leave both on NONE
Click Create
Data Source Name: Cacti Poller Time
Data Input Method: Select Cacti Poller Time
Internal Data Source Name: time
Click Create and then click save
Graph Management:
Click Add
Leave both on NONE
Click Create
Title: Cacti Poller Time
Create
Graph Items:
Click Add
Data Source: select ‘No Host – Cacti Poller Time (time)
Colour: select one
Graph Item type: Area
Click Create
All done.
If anyone knows of a better way to do this, it would be good to see. Also, not sure of performance issues regarding adding code to poller.php.
Cheers
Byron
EDIT: Thanks to Phil a.k.a pvd for the graph template.
import it for 086d
go into the data input method and set YOUR paths up.
select a device (localhost)
add a specific graph