I'm not getting the graphs. I've tested the script from the command line, and it's working fine there, but it's not getting into the graphs for some reason. Here's some output of things I've seen. I'm new to cacti (using 0.8.6h and perl 5.8.6 on a Red Hat FC4 system), so if you need more info, let me know.
I did make one change to the .pl script because when doing a "get temp 1" it was always returning "0". I changed this line
Quote:
$tempdata{$1}{temp} = $4 if $3 eq 'INTEGER';
to this
Quote:
$tempdata{$1}{temp} = $4 if $2 == 3;
to get the temperature. It returns the STRING value of the temperature rather then the INTEGER value, but I couldn't get it to work if I told it to print if $2==2.
Quote:
[root@cactihost scripts]# perl query_temptrax.pl <IP Address> <IP Address> query probe
1:1
2:2
3:3
4:4
Quote:
[root@cactihost scripts]# perl query_temptrax.pl <IP Address> <IP Address> index
1:1
2:2
3:3
4:4
Quote:
[root@cactihost scripts]# perl query_temptrax.pl <IP Address> <IP Address> query name
1:Probe 1
2:Probe 2
3:Probe 3
4:Probe 4
It sees all four probes.
Quote:
[root@cactihost scripts]# perl query_temptrax.pl <IP Address> <IP Address> get temp 1
71
Probes 2-4 are not active, so they always report back that the temperature is -100.
I created the device as instructed, removing the SNMP Community string. When I do the "Verbose Query" from the cacti interface, I get this:
Quote:
+ Running data query [10].
+ Found type = '4 '[script query].
+ Found data query XML file at '/usr/share/cacti/resource/script_queries/temptrax.xml'
+ XML file parsed ok.
+ Executing script for list of indexes 'perl /usr/share/cacti/scripts/query_temptrax.pl <IP Address> <IP Address> index'
+ Executing script query 'perl /usr/share/cacti/scripts/query_temptrax.pl <IP Address> <IP Address> query probe'
+ Found item [probe='1'] index: 1
+ Found item [probe='2'] index: 2
+ Found item [probe='3'] index: 3
+ Found item [probe='4'] index: 4
+ Executing script query 'perl /usr/share/cacti/scripts/query_temptrax.pl <IP Address> <IP Address> query name'
+ Found item [name='Probe 1'] index: 1
+ Found item [name='Probe 2'] index: 2
+ Found item [name='Probe 3'] index: 3
+ Found item [name='Probe 4'] index: 4
+ Found data query XML file at '/usr/share/cacti/resource/script_queries/temptrax.xml'
+ Found data query XML file at '/usr/share/cacti/resource/script_queries/temptrax.xml'
+ Found data query XML file at '/usr/share/cacti/resource/script_queries/temptrax.xml'
+ Found data query XML file at '/usr/share/cacti/resource/script_queries/temptrax.xml'