I'm with a little strange problem in cacti and haven't found nothing about it here in the forums.
I have got some scripts and templates here on this forum to collect some QoS data on cisco routers, but they didn't worked properly. I started changing things a bit to make them work. I thought I had done it but not.
THE PROBLEM: the data query works for one cisco device and not for other.
The perl script and the xml are attached.
Script execution outputs for the working device (cacti on a linux box):
Script execution outputs for the not working device:root@<host> cacti# perl /opt/cacti/scripts/cbwfq.pl
usage:
/opt/cacti/scripts/cbwfq.pl IP SNMP_community SNMP_version index
/opt/cacti/scripts/cbwfq.pl IP SNMP_community SNMP_version query {class|bytes|drops}
/opt/cacti/scripts/cbwfq.pl IP SNMP_community SNMP_version get {class|bytes|drops} index_oid
root@<host> cacti# perl /opt/cacti/scripts/cbwfq.pl <ip> <community> 2 index
1089.1091
1089.1097
1089.1107
root@<host> cacti# perl /opt/cacti/scripts/cbwfq.pl <ip> <community> 2 query class
1089.1091!<class name1>
1089.1097!<class name2>
1089.1107!<class name3>
root@<host> cacti# perl /opt/cacti/scripts/cbwfq.pl <ip> <community> 2 query bytes
1089.1091!0
1089.1097!3639476156
1089.1107!2603127710
root@<host> cacti#
As can be verified on the output the script is working properly for the 2 devices. (of course I removed some sensitive information)root@<host> cacti# perl /opt/cacti/scripts/cbwfq.pl <ip> <community> 2 index
1083.1085
1083.1093
1083.1099
1117.1121
1117.1133
1117.1143
1117.1149
1195.1197
1195.1205
1195.1211
1229.1233
1229.1245
1229.1255
1229.1261
root@<host> cacti# perl /opt/cacti/scripts/cbwfq.pl <ip> <community> 2 query class
1083.1085!<class name1>
1083.1093!<class name2>
1083.1099!<class name3>
1117.1121!<class name4>
1117.1133!<class name5>
1117.1143!<class name6>
1117.1149!<class name7>
1195.1197!<class name8>
1195.1205!<class name9>
1195.1211!<class name10>
1229.1233!<class name11>
1229.1245!<class name12>
1229.1255!<class name13>
1229.1261!<class name14>
root@<host> cacti# perl /opt/cacti/scripts/cbwfq.pl <ip> <community> 2 query bytes
1083.1085!101373200
1083.1093!347365295
1083.1099!310175705
1117.1121!374433754
1117.1133!1484071717
1117.1143!3521803237
1117.1149!1085342123
1195.1197!102478013
1195.1205!353077392
1195.1211!322493502
1229.1233!376106516
1229.1245!1485573975
1229.1255!3536948125
1229.1261!1103662306
root@<host> cacti#
Now, creating the graphics.
On working device:
And on non working device:Data Query Debug Information
+ Running data query [14].
+ Found type = '4 '[script query].
+ Found data query XML file at '/opt/cacti/resource/script_queries/cbwfq.xml'
+ XML file parsed ok.
+ Executing script for list of indexes 'perl /opt/cacti/scripts/cbwfq.pl <ip> <community> 2 index'
+ Executing script query 'perl /opt/cacti/scripts/cbwfq.pl <ip> <community> 2 query class'
+ Found item [class='class name1'] index: 1089.1091
+ Found item [class='class name2'] index: 1089.1097
+ Found item [class='class name3'] index: 1089.1107
+ Found data query XML file at '/opt/cacti/resource/script_queries/cbwfq.xml'
+ Found data query XML file at '/opt/cacti/resource/script_queries/cbwfq.xml'
+ Found data query XML file at '/opt/cacti/resource/script_queries/cbwfq.xml'
+ Found data query XML file at '/opt/cacti/resource/script_queries/cbwfq.xml'
+ Found data query XML file at '/opt/cacti/resource/script_queries/cbwfq.xml'
+ Found data query XML file at '/opt/cacti/resource/script_queries/cbwfq.xml'
+ Found data query XML file at '/opt/cacti/resource/script_queries/cbwfq.xml'
+ Found data query XML file at '/opt/cacti/resource/script_queries/cbwfq.xml'
+ Found data query XML file at '/opt/cacti/resource/script_queries/cbwfq.xml'
======================================
+ Created graph: <ip> - Class Throughput - <class name1>
+ Created graph: <ip> - Class Throughput - <class name2>
+ Created graph: <ip> - Class Throughput - <class name3>
As can by viewed the creation of the graphics fail in the second case, as if the "query class" option on the script doesn't worked...Data Query Debug Information
+ Running data query [14].
+ Found type = '4 '[script query].
+ Found data query XML file at '/opt/cacti/resource/script_queries/cbwfq.xml'
+ XML file parsed ok.
+ Executing script for list of indexes 'perl /opt/cacti/scripts/cbwfq.pl <ip> <community> 2 index'
+ Executing script query 'perl /opt/cacti/scripts/cbwfq.pl <ip> <community> 2 query class'
+ Found item [class='class name1'] index: 1083.1085
+ Found item [class='class name2'] index: 1083.1093
+ Found item [class='class name3'] index: 1083.1099
+ Found item [class='class name4'] index: 1117.1121
+ Found item [class='class name5'] index: 1117.1133
+ Found item [class='class name6'] index: 1117.1143
+ Found item [class='class name7'] index: 1117.1149
+ Found item [class='class name8'] index: 1195.1197
+ Found item [class='class name9'] index: 1195.1205
+ Found item [class='class name10'] index: 1195.1211
+ Found item [class='class name11'] index: 1229.1233
+ Found item [class='class name12'] index: 1229.1245
+ Found item [class='class name13'] index: 1229.1255
+ Found item [class='class name14'] index: 1229.1261
+ Found data query XML file at '/opt/cacti/resource/script_queries/cbwfq.xml'
+ Found data query XML file at '/opt/cacti/resource/script_queries/cbwfq.xml'
+ Found data query XML file at '/opt/cacti/resource/script_queries/cbwfq.xml'
======================================
+ Created graph: <ip> - Class Throughput - |query_class|
+ Created graph: <ip> - Class Throughput - |query_class|
+ Created graph: <ip> - Class Throughput - |query_class|
+ Created graph: <ip> - Class Throughput - |query_class|
+ Created graph: <ip> - Class Throughput - |query_class|
+ Created graph: <ip> - Class Throughput - |query_class|
+ Created graph: <ip> - Class Throughput - |query_class|
+ Created graph: <ip> - Class Throughput - |query_class|
+ Created graph: <ip> - Class Throughput - |query_class|
+ Created graph: <ip> - Class Throughput - |query_class|
+ Created graph: <ip> - Class Throughput - |query_class|
+ Created graph: <ip> - Class Throughput - |query_class|
+ Created graph: <ip> - Class Throughput - |query_class|
+ Created graph: <ip> - Class Throughput - |query_class|
I have tried change the class name reducing it's size or/and removing all non letter/number/space character.
Any ideas?
Last, sorry by my English, I have learned by myself...
Thanks for any help,
Regards,
Gripp.