Hi all,
I'm in need to get 4 values from this type of hw via snmp query.
The data that I need to collect is (integer*10):
channel 1: .1.3.6.1.4.1.22626.1.5.2.1.3.0
channel 2: .1.3.6.1.4.1.22626.1.5.2.2.3.0
channel 3: .1.3.6.1.4.1.22626.1.5.2.3.3.0
channel 4: .1.3.6.1.4.1.22626.1.5.2.4.3.0
but I have no idea how to create a "query template" without referincing to an snmp table
Any ideas?
Ciao e grazie! Luciano
Comet P8541
Moderators: Developers, Moderators
Re: Comet P8541
>> but I have no idea how to create a "query template" without referincing to an snmp table
Please explain in detail about that..
Please explain in detail about that..
Re: Comet P8541
What I mean is that if I create a data query in this way:
I get this:
Ciao e grazie!
Luciano
Code: Select all
<query>
<name>Get Channel 1</name>
<description>Query Sonda - CH 1</description>
<oid_index>.1.3.6.1.4.1.22626.1.5.2.1.3</oid_index>
<index_order_type>numeric</index_order_type>
<index_title_format>TEST 1</index_title_format>
<fields>
<ifIndex>
<name>Index</name>
<method>get</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.22626.1.5.2.1.3.0</oid>
</ifIndex>
</fields>
</query>
so I get the value (which should be 26.6 degree) but when I try to create a graph I get "This data query returned 0 rows" ... O_o+ Running data query [11].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/var/www/html/resource/snmp_queries/sonda_ced_1.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.22626.1.5.2.1.3'
+ Index found at OID: '1.3.6.1.4.1.22626.1.5.2.1.3.0' value: '266'
+ Found data query XML file at '/var/www/html/resource/snmp_queries/sonda_ced_1.xml'
+ Found data query XML file at '/var/www/html/resource/snmp_queries/sonda_ced_1.xml'
+ Found data query XML file at '/var/www/html/resource/snmp_queries/sonda_ced_1.xml'
Ciao e grazie!
Luciano
Re: Comet P8541
Well, (just guessing)
1) There is no field which has "<direction>input</direction>".
2) If your device has single (not multiple) SNMP OID for that value, no need to create SNMP data query. Use "SNMP - Generic OID Template" graph template.
Additionally, if you want to draw the value as 26.6 (not 266), create CDEF like "cdef=a,10,/" and use it in graph template.
http://docs.cacti.net/manual:087:6_reference.2_cdef
// Sorry my English
1) There is no field which has "<direction>input</direction>".
2) If your device has single (not multiple) SNMP OID for that value, no need to create SNMP data query. Use "SNMP - Generic OID Template" graph template.
Additionally, if you want to draw the value as 26.6 (not 266), create CDEF like "cdef=a,10,/" and use it in graph template.
http://docs.cacti.net/manual:087:6_reference.2_cdef
// Sorry my English
Re: Comet P8541
Ciao,
I used the Generic template, inserting the OID .1.3.6.1.4.1.22626.1.5.2.1.3.0 but no data is returned ... while, if I used the DataQuery:
get this:
The value is get (251) but is not used as a value but append to the snmp OID .... arghhhh!!!
Ciao ciao!
Luciano
I used the Generic template, inserting the OID .1.3.6.1.4.1.22626.1.5.2.1.3.0 but no data is returned ... while, if I used the DataQuery:
Code: Select all
<query>
<name>Get Channel 1</name>
<description>Query Sonda - CH 1</description>
<oid_index>.1.3.6.1.4.1.22626.1.5.2.1.3</oid_index>
<index_order_type>numeric</index_order_type>
<index_title_format>TEST 1</index_title_format>
<fields>
<ifIndex>
<name>Index</name>
<method>get</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.22626.1.5.2.1.3.0</oid>
</ifIndex>
</fields>
</query>
Code: Select all
+ Running data query [11].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/var/www/html/resource/snmp_queries/sonda_ced_1.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.22626.1.5.2.1.3'
+ Index found at OID: '1.3.6.1.4.1.22626.1.5.2.1.3.0' value: '251'
+ Located input field 'ifIndex' [get]
+ Executing SNMP get for data @ '.1.3.6.1.4.1.22626.1.5.2.1.3.0.251' [value='']
+ Found data query XML file at '/var/www/html/resource/snmp_queries/sonda_ced_1.xml'
+ Found data query XML file at '/var/www/html/resource/snmp_queries/sonda_ced_1.xml'
+ Found data query XML file at '/var/www/html/resource/snmp_queries/sonda_ced_1.xml'
Ciao ciao!
Luciano
Re: Comet P8541
"<direction>input</direction>" is for the selection table when creating graph. (e.g. index, description, etc.)
"<direction>output</direction>" is for drawing graph. (numeric value only)
Both fields are needed.
- SNMP Data Queries - Cacti Docs
(NOTICE: Output field will not be shown in verbose query)
Anyway, try this query for test:
I assume the following result when you perform snmpwalk to the device.
"<direction>output</direction>" is for drawing graph. (numeric value only)
Both fields are needed.
- SNMP Data Queries - Cacti Docs
(NOTICE: Output field will not be shown in verbose query)
Anyway, try this query for test:
Code: Select all
<query>
<name>Get Channel Temperature</name>
<description>Query Sonda - CH x</description>
<oid_index>.1.3.6.1.4.1.22626.1.5.2</oid_index>
<oid_index_parse>OID/REGEXP:.*\.([0-9]+)\.3\.0$</oid_index_parse>
<fields>
<ChIndex>
<name>Index</name>
<source>index</source>
<direction>input</direction>
</ChIndex>
<ChTemp>
<name>CH Temperature</name>
<method>walk</method>
<source>value</source>
<direction>ouput</direction>
<oid>.1.3.6.1.4.1.22626.1.5.2</oid>
<oid_suffix>3.0</oid_suffix>
</ChTemp>
</fields>
</query>
% snmpwalk -v1 -c <community> <device> .1.3.6.1.4.1.22626.1.5.2
.1.3.6.1.4.1.22626.1.5.2.1.3.0 = xxx
.1.3.6.1.4.1.22626.1.5.2.2.3.0 = xxx
.1.3.6.1.4.1.22626.1.5.2.3.3.0 = xxx
.1.3.6.1.4.1.22626.1.5.2.4.3.0 = xxx
Who is online
Users browsing this forum: No registered users and 0 guests