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.
It works well, up until I get to the section 'Apply the Data Query to your Device'. Although the data query is added ok, it only adds some of the items in the XML file. When I choose 'Data query debug information', I get - <p>
+ Running data query [15].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/var/www/html/cacti/resource/snmp_queries/prt_consum.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.2.1.43.11.1'
+ Located input field 'prtMarkerSuppliesIndex' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.2.1.43.11.1.1.1'
+ Located input field 'prtMarkerSuppliesDescription' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.2.1.43.11.1.1.6'
+ Found item [prtMarkerSuppliesDescription='Black Toner Cartridge HP C4191A'] index: 1 [from value]
+ Found item [prtMarkerSuppliesDescription='Cyan Toner Cartridge HP C4192A'] index: 2 [from value]
+ Found item [prtMarkerSuppliesDescription='Magenta Toner Cartridge HP C4193A'] index: 3 [from value]
+ Found item [prtMarkerSuppliesDescription='Yellow Toner Cartridge HP C4194A'] index: 4 [from value]
+ Found item [prtMarkerSuppliesDescription='Drum Kit HP C4195A'] index: 5 [from value]
+ Found item [prtMarkerSuppliesDescription='Transfer Kit HP C4196A'] index: 6 [from value]
+ Found item [prtMarkerSuppliesDescription='Fuser Kit HP 120V C4197A 220V C4198A'] index: 7 [from value]
+ Found data query XML file at '/var/www/html/cacti/resource/snmp_queries/prt_consum.xml'
+ Found data query XML file at '/var/www/html/cacti/resource/snmp_queries/prt_consum.xml'
+ Found data query XML file at '/var/www/html/cacti/resource/snmp_queries/prt_consum.xml'
I also cannot associate the graph template I created earlier in following the instructions, as it isn't even listed. Iv'e attached a screenshot of my browser, as well as the XML file.
Why doesn't it query for the other items in the xml file? I've checked it a couple times, and can't see anything wrong with it. I simply used the host_disk.xml file already included with cacti as a guide. I also used snmpwalk to probe the oids on this printer, and it turned out the values I expected. I figure that may be a reason why I can't associate a graph template...
[/img]
Attachments
Screenshot problem data query.
data_query_not_working.gif (19.73 KiB) Viewed 3017 times
Well, I clicked 'Create Graphs for this Host', and yes, they did show up. I clicked on the items to create them, and will check the logs in a bit to see if anything happened.
However, it seems from the verbose output in my original posting that there isn't even any data being updated to the rrd... otherwise, wouldn't the verbose listing list more information, like the OIDs of the current level of toner?
The verbose output will only show you the 'input' data types. Both 'input' and 'output' data types will be shown in the 'create graphs' screen. For example, the 'SNMP - Interface Statistics' associated data template does not show the actual data with a verbose query....
Please follow the last link of my signature. This pertains to SNMP Data Queries. To sum up, the Data Template definition is wrong. If you had a Data Input Method that spits out all the values in one run, the Data Template would be fine ...
Reinhard
Hm, well, I checked both the last and second to last writeups in your signature:
"HowTo: Using Data Queries and Data Input Methods (walkthrough)", and "Howto: from snmptable to XML Graphs (Data Query walkthrough)".
Since the former contains information about a data templates and the latter doesn't, I assume you meant the former. Is that correct? If so, I followed that and I don't see where my data template is wrong. Can you point out where it's off?
Burvil wrote:However, it seems from the verbose output in my original posting that there isn't even any data being updated to the rrd... otherwise, wouldn't the verbose listing list more information, like the OIDs of the current level of toner?
Verbose Output will never have any influence on rrd's. It is more like an Online Execution of the OIDs given by <direction>input</direction> XML fields. So the output of Verbose Query looks good
Reinhard
From the image, I assume, that you may have associated the Graph Templates directly to the Host. As to my howto, this is wrong. You will have to associate the Graph Templates to the Data Query, then add the Data Query to the List of Associated Data Queries for that host.
To verify, please post a screenshot of your current Data Query Definition
Reinhard
As to your Data Template:
You defined data sources of each index of the Data Query. This is wrong. Your XML file defines two <direction>output</direction> fields. Please create one data source for each of those fields, e.g. prtMarkerSuppliesMaxCapacity and prtMarkerSuppliesLevel. You'll notice, that I prefer to take the field names of the XML for the data sources as well (This is my personal way of doing this; there is no need for this. You may use e.g. max and current as well)
This will create a single rrd file for each index (in normal words: toner cartridge) containing two data sources each. That's the way Queries are working with cacti.
Of course, you may choose an alternative approach, if you want all data sources to reside in one single rrd: Then you'll have to write a wrapper Data Input Method. The advantage of the Data Query approach is, that this allows even for black-cartridge-only printers. In this case, you will need a single rrd file only.
Reinhard
PS: your XML file seems to be ok. I verified this with a "normal" HP Printer.