Fetching data via SNMP from custom scrip

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
arekm
Posts: 3
Joined: Fri Oct 14, 2005 2:05 am

Fetching data via SNMP from custom scrip

Post by arekm »

I have net-snmp set up with custom script which is added to snmpd.conf.

Current setup (1) is:
exec .1.3.6.1.4.1.3032.64 exim-snmp-email-in /bin/cat /etc/mail/exim-snmp-email_in.txt
exec .1.3.6.1.4.1.3032.65 exim-snmp-email-local /bin/cat /etc/mail/exim-snmp-email_local.txt
exec .1.3.6.1.4.1.3032.66 exim-snmp-email-out /bin/cat /etc/mail/exim-snmp-email_out.txt
exec .1.3.6.1.4.1.3032.67 exim-snmp-invalid-welcome /bin/cat /etc/mail/exim-snmp-invalid_welcome.txt
exec .1.3.6.1.4.1.3032.68 exim-snmp-is-spam /bin/cat /etc/mail/exim-snmp-is_spam.txt
exec .1.3.6.1.4.1.3032.69 exim-snmp-is-virus /bin/cat /etc/mail/exim-snmp-is_virus.txt
exec .1.3.6.1.4.1.3032.70 exim-snmp-mx-is-local /bin/cat /etc/mail/exim-snmp-mx_is_local.txt
exec .1.3.6.1.4.1.3032.71 exim-snmp-no-relay /bin/cat /etc/mail/exim-snmp-no_relay.txt
exec .1.3.6.1.4.1.3032.72 exim-snmp-no-smtp-auth /bin/cat /etc/mail/exim-snmp-no_smtp_auth.txt
exec .1.3.6.1.4.1.3032.73 exim-snmp-q-frozen /bin/cat /etc/mail/exim-snmp-q_frozen.txt
exec .1.3.6.1.4.1.3032.74 exim-snmp-q-queue /bin/cat /etc/mail/exim-snmp-q_queue.txt
exec .1.3.6.1.4.1.3032.75 exim-snmp-q-size /bin/cat /etc/mail/exim-snmp-q_size.txt
exec .1.3.6.1.4.1.3032.76 exim-snmp-reject /bin/cat /etc/mail/exim-snmp-reject.txt
exec .1.3.6.1.4.1.3032.77 exim-snmp-unknown-cmd /bin/cat /etc/mail/exim-snmp-unknown_cmd.txt
exec .1.3.6.1.4.1.3032.78 exim-snmp-unknown-local /bin/cat /etc/mail/exim-snmp-unknown_local.txt

snmpwalk shows:
SNMPv2-SMI::enterprises.3032.64.1.1 = INTEGER: 1
SNMPv2-SMI::enterprises.3032.64.2.1 = STRING: "exim-snmp-email-in"
SNMPv2-SMI::enterprises.3032.64.3.1 = STRING: "/bin/cat /etc/mail/exim-snmp-email_in.txt"
SNMPv2-SMI::enterprises.3032.64.100.1 = INTEGER: 0
SNMPv2-SMI::enterprises.3032.64.101.1 = STRING: "211"
SNMPv2-SMI::enterprises.3032.64.102.1 = INTEGER: 0
SNMPv2-SMI::enterprises.3032.64.103.1 = ""
SNMPv2-SMI::enterprises.3032.65.1.1 = INTEGER: 1
SNMPv2-SMI::enterprises.3032.65.2.1 = STRING: "exim-snmp-email-local"
SNMPv2-SMI::enterprises.3032.65.3.1 = STRING: "/bin/cat /etc/mail/exim-snmp-email_local.txt"
SNMPv2-SMI::enterprises.3032.65.100.1 = INTEGER: 0
SNMPv2-SMI::enterprises.3032.65.101.1 = STRING: "172"
SNMPv2-SMI::enterprises.3032.65.102.1 = INTEGER: 0
SNMPv2-SMI::enterprises.3032.65.103.1 = ""

So far so good. I'm trying to write snmp_queries/exim.xml for that. Currently I have:
<query>
<name>Exim Statistics</name>
<description>Queue, incoming, outgoing and rejects statistics</description>
<fields>
<EximStatEmailIn>
<name>EmailIn</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.3032.64.101.1</oid>
</EximStatEmailIn>
<EximStatEmailLocal>
<name>EmailLocal</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.3032.65.101.1</oid>
</EximStatEmailLocal>
<EximStatEmailOut>
<name>EmailOut</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.3032.66.101.1</oid>
</EximStatEmailOut>
<EximStatInvalidWelcome>
<name>InvalidWelcome</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.3032.67.101.1</oid>
</EximStatInvalidWelcome>
</fields>
</query>

I've created data and graph templates. Unfortunately when trying to fetch data via verbose query I get:
Data Query Name Debugging Re-Index Method Status
1) Exim Statistics (Verbose Query) Index Count Changed Success [0 Items, 0 Rows]

Seems not working.

I've tried another setup (2) where there is single file with all entries:
# cat /etc/mail/exim-snmp.txt
2313
234
234
234
5
56
34
65
56
2
45
3456
45
35
7

snmpd.conf:
exec .1.3.6.1.4.1.3032.63 exim-snmp /bin/cat /etc/mail/exim-snmp.txt

I got:
SNMPv2-SMI::enterprises.3032.63.1.1 = INTEGER: 1
SNMPv2-SMI::enterprises.3032.63.2.1 = STRING: "exim-snmp"
SNMPv2-SMI::enterprises.3032.63.3.1 = STRING: "/bin/cat /etc/mail/exim-snmp.txt"
SNMPv2-SMI::enterprises.3032.63.100.1 = INTEGER: 0
SNMPv2-SMI::enterprises.3032.63.101.1 = STRING: "2313"
SNMPv2-SMI::enterprises.3032.63.101.2 = STRING: "234"
SNMPv2-SMI::enterprises.3032.63.101.3 = STRING: "234"
SNMPv2-SMI::enterprises.3032.63.101.4 = STRING: "234"
SNMPv2-SMI::enterprises.3032.63.101.5 = STRING: "5"
SNMPv2-SMI::enterprises.3032.63.101.6 = STRING: "56"
SNMPv2-SMI::enterprises.3032.63.101.7 = STRING: "34"
SNMPv2-SMI::enterprises.3032.63.101.8 = STRING: "65"

Wrote the query:
<query>
<name>Exim Statistics</name>
<comment>arekm@pld-linux.org</comment>
<oid_index>.1.3.6.1.4.1.3032.63.101</oid_index>
<index_order_type>numeric</index_order_type>
<index_title_format>|chosen_order_field|</index_title_format>
<fields>
<EximStatIndex>
<name>Index</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.3032.63.101</oid>
</EximStatIndex>
<EximStatEmailIn>
<name>EmailIn</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.3032.63.101.1</oid>
</EximStatEmailIn>
<EximStatEmailLocal>
<name>EmailLocal</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.3032.63.101.2</oid>
</EximStatEmailLocal>
</fields>
</query>

This time I got some replies in verbose query but just values without descriptions for them.

What is the proper way of doing that kind of custom snmp script && query?

I would like to go for (1) method but no results in verbose query is the problem for me. Any ideas what's going on here?
arekm
Posts: 3
Joined: Fri Oct 14, 2005 2:05 am

Post by arekm »

And more:

<query>
<name>Exim Statistics</name>
<description>Queue, incoming, outgoing and rejects statistics</description>
<oid_index>.1.3.6.1.4.1.3032</oid_index>
<index_order>EximStatIndex</index_order>
<index_order_type>numeric</index_order_type>
<index_title_format>|chosen_order_field|</index_title_format>
<fields>
<EximStatIndex>
<name>EximIndex</name>
<method>walk</method>
<source>OID/REGEXP:.*3032\.([0-9][0-9])\.101\.1$</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.3032</oid>
</EximStatIndex>
<EximStatEmailIn>
<name>EmailIn</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.3032.64.101.1</oid>
</EximStatEmailIn>
<EximStatEmailLocal>
<name>EmailLocal</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.3032.65.101.1</oid>
</EximStatEmailLocal>
</fields>
</query>

Now I'm getting something:
+ Running data query [14].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/usr/share/cacti/resource/snmp_queries/exim.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.3032'
+ Located input field 'EximStatIndex' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.3032'
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.63.1.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.63.2.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.63.3.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.63.100.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='63'] index: 2313 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.63.101.2'] index: 234 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.63.101.3'] index: 234 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.63.101.4'] index: 234 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.63.101.5'] index: 5 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.63.101.6'] index: 56 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.63.101.7'] index: 34 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.63.101.8'] index: 65 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.63.101.9'] index: 56 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.63.101.10'] index: 2 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.63.101.11'] index: 45 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.63.101.12'] index: 3456 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.63.101.13'] index: 45 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.63.101.14'] index: 35 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.63.101.15'] index: 7 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.63.101.16'] index: 7 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.63.102.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.63.103.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.64.1.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.64.2.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.64.3.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.64.100.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='64'] index: 211 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.64.102.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.64.103.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.65.1.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.65.2.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.65.3.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.65.100.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='65'] index: 172 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.65.102.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.65.103.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.66.1.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.66.2.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.66.3.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.66.100.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='66'] index: 71 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.66.102.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.66.103.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.67.1.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.67.2.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.67.3.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.67.100.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='67'] index: 18 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.67.102.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.67.103.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.68.1.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.68.2.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.68.3.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.68.100.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='68'] index: 56 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.68.102.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.68.103.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.69.1.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.69.2.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.69.3.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.69.100.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='69'] index: 54 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.69.102.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.69.103.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.70.1.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.70.2.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.70.3.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.70.100.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='70'] index: 42 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.70.102.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.70.103.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.71.1.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.71.2.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.71.3.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.71.100.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='71'] index: 53 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.71.102.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.71.103.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.72.1.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.72.2.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.72.3.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.72.100.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='72'] index: 38 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.72.102.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.72.103.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.73.1.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.73.2.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.73.3.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.73.100.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='73'] index: 369 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.73.102.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.73.103.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.74.1.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.74.2.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.74.3.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.74.100.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='74'] index: 820 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.74.102.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.74.103.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.75.1.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.75.2.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.75.3.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.75.100.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='75'] index: 1214439678 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.75.102.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.75.103.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.76.1.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.76.2.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.76.3.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.76.100.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='76'] index: 360 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.76.102.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.76.103.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.77.1.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.77.2.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.77.3.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.77.100.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='77'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.77.102.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.77.103.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.78.1.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.78.2.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.78.3.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.78.100.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='78'] index: 37 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.78.102.1'] index: 1 [from regexp oid parse]
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.78.103.1'] index: 1 [from regexp oid parse]
+ Found data query XML file at '/usr/share/cacti/resource/snmp_queries/exim.xml'
+ Found data query XML file at '/usr/share/cacti/resource/snmp_queries/exim.xml'
+ Found data query XML file at '/usr/share/cacti/resource/snmp_queries/exim.xml'

How to skip these:
+ Found item [EximStatIndex='SNMPv2-SMI::enterprises.3032.63.1.1'] index: 1 [from regexp oid parse]
?
arekm
Posts: 3
Joined: Fri Oct 14, 2005 2:05 am

Post by arekm »

Reworked snmpd part to use pass OID script instead of exec OID script.

It's much better!

+ Running data query [14].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/usr/share/cacti/resource/snmp_queries/exim.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.3032.200'
+ Located input field 'EximStatIndex' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.3032.200'
+ Found item [EximStatIndex='1'] index: 1 [from value]
+ Found item [EximStatIndex='2'] index: 2 [from value]
+ Found item [EximStatIndex='3'] index: 3 [from value]
+ Found item [EximStatIndex='4'] index: 4 [from value]
+ Found item [EximStatIndex='5'] index: 5 [from value]
+ Found item [EximStatIndex='6'] index: 6 [from value]
+ Found item [EximStatIndex='7'] index: 7 [from value]
+ Found item [EximStatIndex='8'] index: 8 [from value]
+ Found item [EximStatIndex='9'] index: 9 [from value]
+ Found item [EximStatIndex='10'] index: 10 [from value]
+ Found item [EximStatIndex='11'] index: 11 [from value]
+ Found item [EximStatIndex='12'] index: 12 [from value]
+ Found item [EximStatIndex='13'] index: 13 [from value]
+ Found item [EximStatIndex='14'] index: 14 [from value]
+ Found item [EximStatIndex='15'] index: 15 [from value]
+ Located input field 'EximStatIndexName' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.3032.300'
+ Found item [EximStatIndexName='email_in'] index: 1 [from value]
+ Found item [EximStatIndexName='email_local'] index: 2 [from value]
+ Found item [EximStatIndexName='email_out'] index: 3 [from value]
+ Found item [EximStatIndexName='invalid_welcome'] index: 4 [from value]
+ Found item [EximStatIndexName='is_spam'] index: 5 [from value]
+ Found item [EximStatIndexName='is_virus'] index: 6 [from value]
+ Found item [EximStatIndexName='mx_is_local'] index: 7 [from value]
+ Found item [EximStatIndexName='no_relay'] index: 8 [from value]
+ Found item [EximStatIndexName='no_smtp_auth'] index: 9 [from value]
+ Found item [EximStatIndexName='q_frozen'] index: 10 [from value]
+ Found item [EximStatIndexName='q_queue'] index: 11 [from value]
+ Found item [EximStatIndexName='q_size'] index: 12 [from value]
+ Found item [EximStatIndexName='reject'] index: 13 [from value]
+ Found item [EximStatIndexName='unknown_cmd'] index: 14 [from value]
+ Found item [EximStatIndexName='unknown_local'] index: 15 [from value]
+ Found data query XML file at '/usr/share/cacti/resource/snmp_queries/exim.xml'
+ Found data query XML file at '/usr/share/cacti/resource/snmp_queries/exim.xml'
+ Found data query XML file at '/usr/share/cacti/resource/snmp_queries/exim.xml'


Now there is other problem :-(((

In Console -> Devices -> (Edit) in Associated Graph Templates in Add Graph Template: field I do not see my graph template (exim stats) - why is not there even if I created proper graph template?

There is no such problem with data queries: In Associated Data Queries I see my exim data query.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests