Ad blocker detected: Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker on our website.
I'm trying to use script queries to find information about remote hosts. We are using a small client/server protocol rather than snmp.
Well, nothing is working and I think the problem may be due to the fact that I need the |host| variable to be in the script query .xml file. I basically copied the unix_disk.xml file and changed the script_path part like so:
+ Running data query [10].
+ Found type = '4 '[script query].
+ Found data query XML file at '/var/www/html/cacti-0.8.6h/resource/script_queries/remote_unix_disk.xml'
+ Error parsing XML file into an array.
+ Found data query XML file at '/var/www/html/cacti-0.8.6h/resource/script_queries/remote_unix_disk.xml'
+ Found data query XML file at '/var/www/html/cacti-0.8.6h/resource/script_queries/remote_unix_disk.xml'
+ Found data query XML file at '/var/www/html/cacti-0.8.6h/resource/script_queries/remote_unix_disk.xml'
If I use |host| , I get the following ( note no variable substitution on |host| ):
+ Running data query [10].
+ Found type = '4 '[script query].
+ Found data query XML file at '/var/www/html/cacti-0.8.6h/resource/script_queries/remote_unix_disk.xml'
+ XML file parsed ok.
+ Executing script for list of indexes '/var/www/html/cacti-0.8.6h/scripts/symcacti_client -s |host| -c partition_query index'
+ Executing script query '/var/www/html/cacti-0.8.6h/scripts/symcacti_client -s |host| -c partition_query query device'
+ Executing script query '/var/www/html/cacti-0.8.6h/scripts/symcacti_client -s |host| -c partition_query query mount'
+ Found data query XML file at '/var/www/html/cacti-0.8.6h/resource/script_queries/remote_unix_disk.xml'
+ Found data query XML file at '/var/www/html/cacti-0.8.6h/resource/script_queries/remote_unix_disk.xml'
+ Found data query XML file at '/var/www/html/cacti-0.8.6h/resource/script_queries/remote_unix_disk.xml'
Last edited by symcacti on Tue Jan 31, 2006 1:12 pm, edited 1 time in total.
In the XML file, your <arg_prepend> should contain the |host_hostname| along with other variables. Take a look at the SNMP - Get Processor Information or SNMP - Interface Statistics Data Queries for examples.
+ Running data query [10].
+ Found type = '4 '[script query].
+ Found data query XML file at '/var/www/html/cacti-0.8.6h/resource/script_queries/remote_unix_disk.xml'
+ XML file parsed ok.
+ Executing script for list of indexes '/var/www/html/cacti-0.8.6h/scripts/symcacti_client -c partition_query -s 10.127.9.134 index'
+ Executing script query '/var/www/html/cacti-0.8.6h/scripts/symcacti_client -c partition_query -s 10.127.9.134 query device'
+ Found item [dskDevice='/dev/root'] index: /dev/root
+ Found item [dskDevice='/dev/sda1'] index: /dev/sda1
+ Found item [dskDevice='/dev/mapper/system-var'] index: /dev/mapper/system-var
+ Found item [dskDevice='/dev/mapper/system-cache'] index: /dev/mapper/system-cache
+ Found item [dskDevice='/dev/mapper/system-restore'] index: /dev/mapper/system-restore
+ Executing script query '/var/www/html/cacti-0.8.6h/scripts/symcacti_client -c partition_query -s 10.127.9.134 query mount'
+ Found item [dskMount='/'] index: /dev/root
+ Found item [dskMount='/boot'] index: /dev/sda1
+ Found item [dskMount='/var'] index: /dev/mapper/system-var
+ Found item [dskMount='/logs'] index: /dev/mapper/system-cache
+ Found item [dskMount='/restore'] index: /dev/mapper/system-restore
+ Found data query XML file at '/var/www/html/cacti-0.8.6h/resource/script_queries/remote_unix_disk.xml'
+ Found data query XML file at '/var/www/html/cacti-0.8.6h/resource/script_queries/remote_unix_disk.xml'
+ Found data query XML file at '/var/www/html/cacti-0.8.6h/resource/script_queries/remote_unix_disk.xml'
+ Found data query XML file at '/var/www/html/cacti-0.8.6h/resource/script_queries/remote_unix_disk.xml'
+ Found data query XML file at '/var/www/html/cacti-0.8.6h/resource/script_queries/remote_unix_disk.xml'
+ Found data query XML file at '/var/www/html/cacti-0.8.6h/resource/script_queries/remote_unix_disk.xml'
+ Found data query XML file at '/var/www/html/cacti-0.8.6h/resource/script_queries/remote_unix_disk.xml'
+ Found data query XML file at '/var/www/html/cacti-0.8.6h/resource/script_queries/remote_unix_disk.xml'
Check the poller cache for the path to your script. Make sure it looks right.
[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]
Is the device disabled, or has a status of down? This would cause it to not populate the poller cache.
Resolve that and rebuild the poller cache.
[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]
Really, ok, in the Data Query edit screen when editing associated graph templates, there are these little check boxes off on the right hand side that don't look like they do anything in particular, in the associated data query section. CHECK THEM. Save the query and I bet you will be ok.
[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]
Thanks for all your help. I think it's working now.
I think that when I was playing around with the re-index trigger, the graphs got screwed, because when I clicked on 'create graphs for this device', I could choose all of the partition graphs again. This ended up creating 2 graphs for each partition ( the old non-working and the new ones ). Any how, I deleted everything, started again, and all is well.