Problem getting script data (indexed) to be polled

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
al9000
Posts: 4
Joined: Fri Sep 09, 2005 2:06 am
Location: Montana, USA
Contact:

Problem getting script data (indexed) to be polled

Post by al9000 »

I'm beginning to lose molecular cohesion after swiming in the cacti code for hours. I can't get my new indexed data script to be polled. Symptoms: graph entries in tree are made but no rra files are created, and there are no related entries in the poller_items table.

Background:
I'm using a linux based router with >1000 DSL interfaces on it. Net-snmp is a miserably slow cpu hog when the number of interfaces gets over 100 (let alone 2000) so I decided to just cat /proc/net/dev off the router and process the info with a daemon on my cacti box.

The xml in resources and the scripts/query seem to be working EXCEPT it never gets into the database table "poller_items". Also shown by the device table by UNKNOWN status -

Code: Select all

Description 	Status 	Hostname 	Current (ms) 	Average (ms) 	Availability 	
Dual Switch 	Up 	xxxxxxx	11.5 	13.38 	99.91% 	
fubar   	Unknown 	xxxxxxxx 	0 	0 	100%
The device detail show this:

Code: Select all

Associated Data Queries
Data Query Name 	Debugging 	Re-Index Method 	Status
1) NetDev  	 (Verbose Query)  	 Index Count Changed  	 Success [141 Items, 141 Rows]
Verbose Query shows this:

Code: Select all

+ Running data query [12].
+ Found type = '4 '[script query].
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/script_queries/netdev.xml'
+ XML file parsed ok.
+ Executing script for list of indexes 'perl /var/www/localhost/htdocs/cacti/scripts/query_dev.pl index'
+ Executing script query 'perl /var/www/localhost/htdocs/cacti/scripts/query_dev.pl query interface'
+ Results=141
+ Found item [devName='Bonder1'] index: Bonder1
+ Found item [devName='Serial0'] index: Serial0
+ Found item [devName='Serial1'] index: Serial1
+ Found item [devName='Serial2'] index: Serial2
+ Found item [devName='Serial3'] index: Serial3
+ Found item [devName='Serial4'] index: Serial4
+ Found item [devName='Serial5'] index: Serial5
+ Found item [devName='Serial6'] index: Serial6
+ Found item [devName='Serial7'] index: Serial7
+ Found item [devName='Serial7.101'] index: Serial7.101
+ Found item [devName='Serial7.102'] index: Serial7.102
...lots...
+ Found item [devName='dummy0'] index: dummy0
+ Found item [devName='eth0'] index: eth0
+ Found item [devName='eth1'] index: eth1
+ Found item [devName='gre0'] index: gre0
+ Found item [devName='lo'] index: lo
+ Found item [devName='sit0'] index: sit0
+ Found item [devName='teql0'] index: teql0
+ Found item [devName='tunl0'] index: tunl0
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/script_queries/netdev.xml'
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/script_queries/netdev.xml'
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/script_queries/netdev.xml'
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/script_queries/netdev.xml'
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/script_queries/netdev.xml'
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/script_queries/netdev.xml'
Popups in template show the output variable names correctly.
I'm going to try to post all the pieces in a tar.gz. Add attachemt is giving me grief though.
al9000
Posts: 4
Joined: Fri Sep 09, 2005 2:06 am
Location: Montana, USA
Contact:

Post by al9000 »

The script, xml, daemon and sample data
Attachments
devgrab.tar.gz
(10.05 KiB) Downloaded 106 times
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Ok, in the Data Query editor, edit your Associated Graph Templates. Now, under the Associated Data Templates, you should see you data source templates. If you don't, that is problem 1, if you do, make sure that the unmarked check box to the far right is checked.

Let me know the results.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
al9000
Posts: 4
Joined: Fri Sep 09, 2005 2:06 am
Location: Montana, USA
Contact:

Post by al9000 »

Definitely a good thought. Bad XML has gotten me before but I have working popups and the boxes are checked.
What next? Don't be shy about asking for mysql info if you need it.
Image
al9000
Posts: 4
Joined: Fri Sep 09, 2005 2:06 am
Location: Montana, USA
Contact:

Post by al9000 »

After inserting many print statements into lib/utility.php in function update_poller_cache, I found that it was trying inserting an SMTP_QUERY. Further investigate lead to the input in one of the graph templates being set to "Interface - Traffic" instead of my custom NetDev - Traffic. Meanwhile the NetDev device has no snmp.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest