I have found many tutorials in the internet but it still does not work.
Here is the steps that I have followed:
1 - Created a script (attached) and here is the output (input: IP of NTP Server)
# ./ntpdateq_mrtg.pl 10.100.0.100
offset: 1423688
2 - Create a Data Input Method (attached image)
3 - Create a Data Source
At this point, debug shows an error
"Notice: Undefined index: in /opt/cacti/lib/rrd.php on line 225"
This is the first problem that I am facing. How to solve it?
ps: logs shows no lines with ntpdateq_mrtg.pl text.
[solved] create a graph based on the output of a script?
Moderators: Developers, Moderators
[solved] create a graph based on the output of a script?
- Attachments
-
- data_source_detail.gif (26.57 KiB) Viewed 2065 times
-
- data_source_debug.gif (4.22 KiB) Viewed 2065 times
-
- data_source.gif (10.69 KiB) Viewed 2065 times
-
- data_input_method.gif (11.72 KiB) Viewed 2065 times
All looks ok. Running cacti 0.8.7d + patches?
looking in the cacti.log file with debugging mode enabled, is that ntp rrd file created? The script run, collect data, etc?
Also, you need the full path to perl for spine to work properly.
looking in the cacti.log file with debugging mode enabled, is that ntp rrd file created? The script run, collect data, etc?
Also, you need the full path to perl for spine to work properly.
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
1 - full path to perl ajusted
2 - output of my script ajusted
Now. log is showing:
05/27/2009 12:40:01 PM - SPINE: Poller[0] Host[1] DS[2549] SCRIPT: /usr/bin/perl /opt/cacti/scripts/ntpdateq_mrtg.pl 10.100.0.100, output: offset:108064
Cacti Version 0.8.7b
Why there is no *ntp_offset_2549.rrd in my rra directory? After creating Data Source this file should have have been created or not?
2 - output of my script ajusted
Now. log is showing:
05/27/2009 12:40:01 PM - SPINE: Poller[0] Host[1] DS[2549] SCRIPT: /usr/bin/perl /opt/cacti/scripts/ntpdateq_mrtg.pl 10.100.0.100, output: offset:108064
Cacti Version 0.8.7b
Why there is no *ntp_offset_2549.rrd in my rra directory? After creating Data Source this file should have have been created or not?
No.leoh wrote: After creating Data Source this file should have have been created or not?
Look in the cacti.log for ntp_offset_2549.rrd. Cacti should've tried to create it and then update it with offset:108064. What did it do?
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
Look what we have in the logs.
I still have no idea why there is no graph.
I have started everyghint from the begining and it never works. I am making a mistake somewhere.
----------------------
05/28/2009 03:45:01 PM - SPINE: Poller[0] Host[1] DS[2549] SCRIPT: /usr/bin/perl /opt/cacti/scripts/ntpdateq_mrtg.pl 10.100.0.100, output: offset:177.096
05/28/2009 03:45:02 PM - POLLER: Poller[0] Parsed MULTI output field 'offset:177.096' [map offset->ntp_offset]
05/28/2009 03:45:02 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "delete from poller_output where local_data_id='2549' and rrd_name='ntp_offset' and time='2009-05-28 15:45:01'"
05/28/2009 03:45:02 PM - POLLER: Poller[0] CACTI2RRD: /usr/local/rrdtool-1.2.19/bin/rrdtool update /opt/cacti/rra/bms65_ntp_offset_2549.rrd --template ntp_offset 1243536301:177.096
---------------
I still have no idea why there is no graph.
I have started everyghint from the begining and it never works. I am making a mistake somewhere.
----------------------
05/28/2009 03:45:01 PM - SPINE: Poller[0] Host[1] DS[2549] SCRIPT: /usr/bin/perl /opt/cacti/scripts/ntpdateq_mrtg.pl 10.100.0.100, output: offset:177.096
05/28/2009 03:45:02 PM - POLLER: Poller[0] Parsed MULTI output field 'offset:177.096' [map offset->ntp_offset]
05/28/2009 03:45:02 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "delete from poller_output where local_data_id='2549' and rrd_name='ntp_offset' and time='2009-05-28 15:45:01'"
05/28/2009 03:45:02 PM - POLLER: Poller[0] CACTI2RRD: /usr/local/rrdtool-1.2.19/bin/rrdtool update /opt/cacti/rra/bms65_ntp_offset_2549.rrd --template ntp_offset 1243536301:177.096
---------------
Who is online
Users browsing this forum: No registered users and 2 guests