[HOWTO] Using Data Queries and Data Input Methods
Moderators: Developers, Moderators
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
This is due to the way rrdtool works (see main rrd site at http://oss.oetiker.ch/rrdtool/tut/rrdtutorial.en.html, Section: Data Resampling. You may find http://www.vandenbogaerdt.nl/rrdtool/process.php useful, too). Not all updates occur at exactly a 300 sec interval. So rrdtool provides a way dealing with those slight deviations and back-calculating them to exactly 300 sec. On COUNTERS, you will as well see the result of normalizing from 300 sec (data gathering interval) to 1 sec (so: division by 300 which will change integers to non-integers).
You may use the GPRINT Preset "Exact Numbers" in your Graph Template to suppress decimals.
Reinhard
You may use the GPRINT Preset "Exact Numbers" in your Graph Template to suppress decimals.
Reinhard
Blank graph - trying to add Squid SNMP OIDs to CACTI
Hi
I have recently started using CACTI to monitor squid server.
I followed the above mentioned steps , created my own xml file
<interface>
<name>Get Squid Cache Network</name>
<description>Queries Squid SNMPserver </description>
<oid_index>1.3.6.1.4.1.3495.1.4.1.7</oid_index>
<oid_num_indexes>1.3.6.1.4.1.3495.1.4.1.0</oid_num_indexes>
<fields>
<cacheBlockingGetHostByName>
<name>cacheBlocking</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>1.3.6.1.4.1.3495.1.4.1.7</oid>
</cacheBlockingGetHostByName>
<cacheIpHits>
<name>cache hits </name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>1.3.6.1.4.1.3495.1.4.1.3</oid>
</cacheIpHits>
<cacheIpMisses>
<name>cache Miss </name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>1.3.6.1.4.1.3495.1.4.1.6</oid>
</cacheIpMisses>
</fields>
</interface>
The Debug query information shows
+ Running data query [14].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/usr/share/cacti/resource/snmp_queries/testsquid.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '1.3.6.1.4.1.3495.1.4.1.7'
+ Located input field 'cacheBlockingGetHostByName' [walk]
+ Executing SNMP walk for data @ '1.3.6.1.4.1.3495.1.4.1.7'
+ Found item [cacheBlockingGetHostByName='0'] index: 0 [from value]
+ Found data query XML file at '/usr/share/cacti/resource/snmp_queries/testsquid.xml'
+ Found data query XML file at '/usr/share/cacti/resource/snmp_queries/testsquid.xml'
+ Found data query XML file at '/usr/share/cacti/resource/snmp_queries/testsquid.xml'
+ Found data query XML file at '/usr/share/cacti/resource/snmp_queries/testsquid.xml'
However , my graphs are empty!! I have included cacheIpHits and cacheIpMisses as datasources for my graph.
Also i created the .rrd file for the graph manually using "rrdtool create" since it gave an error .
Could anyone plz let me know, why am I not getting any plots on my graph? what am I missing out??
Also ,manual snmpwalk for cacheIpHits and cacheIpMisses returns valid values.
Any help regarding this is deeply appreciated.
Thanx!
I have recently started using CACTI to monitor squid server.
I followed the above mentioned steps , created my own xml file
<interface>
<name>Get Squid Cache Network</name>
<description>Queries Squid SNMPserver </description>
<oid_index>1.3.6.1.4.1.3495.1.4.1.7</oid_index>
<oid_num_indexes>1.3.6.1.4.1.3495.1.4.1.0</oid_num_indexes>
<fields>
<cacheBlockingGetHostByName>
<name>cacheBlocking</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>1.3.6.1.4.1.3495.1.4.1.7</oid>
</cacheBlockingGetHostByName>
<cacheIpHits>
<name>cache hits </name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>1.3.6.1.4.1.3495.1.4.1.3</oid>
</cacheIpHits>
<cacheIpMisses>
<name>cache Miss </name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>1.3.6.1.4.1.3495.1.4.1.6</oid>
</cacheIpMisses>
</fields>
</interface>
The Debug query information shows
+ Running data query [14].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/usr/share/cacti/resource/snmp_queries/testsquid.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '1.3.6.1.4.1.3495.1.4.1.7'
+ Located input field 'cacheBlockingGetHostByName' [walk]
+ Executing SNMP walk for data @ '1.3.6.1.4.1.3495.1.4.1.7'
+ Found item [cacheBlockingGetHostByName='0'] index: 0 [from value]
+ Found data query XML file at '/usr/share/cacti/resource/snmp_queries/testsquid.xml'
+ Found data query XML file at '/usr/share/cacti/resource/snmp_queries/testsquid.xml'
+ Found data query XML file at '/usr/share/cacti/resource/snmp_queries/testsquid.xml'
+ Found data query XML file at '/usr/share/cacti/resource/snmp_queries/testsquid.xml'
However , my graphs are empty!! I have included cacheIpHits and cacheIpMisses as datasources for my graph.
Also i created the .rrd file for the graph manually using "rrdtool create" since it gave an error .
Could anyone plz let me know, why am I not getting any plots on my graph? what am I missing out??
Also ,manual snmpwalk for cacheIpHits and cacheIpMisses returns valid values.
Any help regarding this is deeply appreciated.
Thanx!
Get SNMP Data
How can I get a SNMP Data from an OID that returns 2 fields, like in:
snmpwalk -On -v1 -ccommunity host UCD-SNMP-MIB::extOutput
...
.1.3.6.1.4.1.2021.8.1.101.4 = STRING: Duration:105 count:8
...
Is my DIM correct(see attachment)?
snmpwalk -On -v1 -ccommunity host UCD-SNMP-MIB::extOutput
...
.1.3.6.1.4.1.2021.8.1.101.4 = STRING: Duration:105 count:8
...
Is my DIM correct(see attachment)?
- Attachments
-
- Data Input Method with 2 output fields
- cacti_dim.png (46.52 KiB) Viewed 25505 times
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Yep. Use the HowTo at http://docs.cacti.net. This thread is no longer maintainedmgriffin wrote:The images on the main HOWTO have broken. Is there any way to get an update to this guide for 0.8.7b?
Reinhard
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
All has been moved to http://docs.cacti.net/manual:087:3_templates#templates and following
Reinhard
Reinhard
Re: [HOWTO] Using Data Queries and Data Input Methods
Helloo together,
My question is, is there a maximum threshold for the number of Letters which give the query return?
exemple I want use
|query_FarmServer|
And the result is not the hole Name of the FarmServer its just 14 Letters.
thanks for reply
My question is, is there a maximum threshold for the number of Letters which give the query return?
exemple I want use
|query_FarmServer|
And the result is not the hole Name of the FarmServer its just 14 Letters.
thanks for reply
-
- Posts: 1
- Joined: Mon Nov 25, 2013 9:05 am
Re: [HOWTO] Using Data Queries and Data Input Methods
Hi all
I create the file xml with content
<interface>
<name>Get GEPON Interfaces Statistics</name>
<description>Queries a statistics for interfaces CNI e PON in plataform GEPON Furukawa FKC16</description>
<oid_index>.1.3.6.1.4.1.10428.8.1.1.9.1.2.1.1</oid_index>
<index_order>fkc16OltInformationIndex</index_order>
<oid_num_indexes>.1.3.6.1.4.1.10428.8.1.1.9.1.1.0</oid_num_indexes>
<index_order_type>numeric</index_order_type>
<index_title_format>|chosen_order_field|</index_title_format>
<fields>
<fkc16OltInformationIndex>
<name>Index</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.10428.8.1.1.9.1.2.1.1</oid>
</fkc16OltInformationIndex>
</fields>
</interface>
Via gui of cacti using verbose query its display
+ Running data query [14].
+ Found type = '3' [SNMP Query].
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/gepon.xml'
+ XML file parsed ok.
+ Executing SNMP get for num of indexes @ '.1.3.6.1.4.1.10428.8.1.1.9.1.1.0' Index Count: 3
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.10428.8.1.1.9.1.2.1.1' Index Count: 0
+ No SNMP data returned
Its test via line command.
root@apolo:/usr/share/cacti/resource/snmp_queries# snmpget -c public -v 1 172.16.30.11 .1.3.6.1.4.1.10428.8.1.1.9.1.1.0
iso.3.6.1.4.1.10428.8.1.1.9.1.1.0 = INTEGER: 3
root@apolo:/usr/share/cacti/resource/snmp_queries# snmpwalk -c public -v 1 172.16.30.11 .1.3.6.1.4.1.10428.8.1.1.9.1.2.1.1
iso.3.6.1.4.1.10428.8.1.1.9.1.2.1.1.1 = INTEGER: 1
iso.3.6.1.4.1.10428.8.1.1.9.1.2.1.1.2 = INTEGER: 2
iso.3.6.1.4.1.10428.8.1.1.9.1.2.1.1.3 = INTEGER: 3
root@apolo:/usr/share/cacti/resource/snmp_queries#
where am I wrong?
Regards
I create the file xml with content
<interface>
<name>Get GEPON Interfaces Statistics</name>
<description>Queries a statistics for interfaces CNI e PON in plataform GEPON Furukawa FKC16</description>
<oid_index>.1.3.6.1.4.1.10428.8.1.1.9.1.2.1.1</oid_index>
<index_order>fkc16OltInformationIndex</index_order>
<oid_num_indexes>.1.3.6.1.4.1.10428.8.1.1.9.1.1.0</oid_num_indexes>
<index_order_type>numeric</index_order_type>
<index_title_format>|chosen_order_field|</index_title_format>
<fields>
<fkc16OltInformationIndex>
<name>Index</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.10428.8.1.1.9.1.2.1.1</oid>
</fkc16OltInformationIndex>
</fields>
</interface>
Via gui of cacti using verbose query its display
+ Running data query [14].
+ Found type = '3' [SNMP Query].
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/gepon.xml'
+ XML file parsed ok.
+ Executing SNMP get for num of indexes @ '.1.3.6.1.4.1.10428.8.1.1.9.1.1.0' Index Count: 3
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.10428.8.1.1.9.1.2.1.1' Index Count: 0
+ No SNMP data returned
Its test via line command.
root@apolo:/usr/share/cacti/resource/snmp_queries# snmpget -c public -v 1 172.16.30.11 .1.3.6.1.4.1.10428.8.1.1.9.1.1.0
iso.3.6.1.4.1.10428.8.1.1.9.1.1.0 = INTEGER: 3
root@apolo:/usr/share/cacti/resource/snmp_queries# snmpwalk -c public -v 1 172.16.30.11 .1.3.6.1.4.1.10428.8.1.1.9.1.2.1.1
iso.3.6.1.4.1.10428.8.1.1.9.1.2.1.1.1 = INTEGER: 1
iso.3.6.1.4.1.10428.8.1.1.9.1.2.1.1.2 = INTEGER: 2
iso.3.6.1.4.1.10428.8.1.1.9.1.2.1.1.3 = INTEGER: 3
root@apolo:/usr/share/cacti/resource/snmp_queries#
where am I wrong?
Regards
Who is online
Users browsing this forum: No registered users and 0 guests