SNMP data query for Juniper FW Counter - problems

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
Sanych
Posts: 1
Joined: Mon Dec 15, 2008 1:09 am

SNMP data query for Juniper FW Counter - problems

Post by Sanych »

Dear Experts!

I am trying to create a handy method for graphing values of firewall filter counters on my M7 router. I've searched this forum for corresponding templates, but all I've found was about using script queries, but I want to make it via SNMP.

I've created an xml file (in attachment) and data query using it.
I had to use oid_index_parse OID/REGEXP to get indexes. Verbose query output looks reasonable to me:

+ Running data query [13].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/usr/local/www/cacti/resource/snmp_queries/jnx-firewall-counters.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.2636.3.5.2.1.5'
+ Located input field 'filterName' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.2636.3.5.2.1.6'
+ Found item [filterName='aaa'] index: 3.97.97.97.22.97.114.99.104.105.118.101.46.105.110.102.114.97.108.105.110.117.120.46.111.114.103.2 [from value]
+ Found item [filterName='to-ix'] index: 5.116.111.45.105.120.10.82.85.84.85.66.69.50.82.67.78.2 [from value]
+ Found item [filterName='to-ix'] index: 5.116.111.45.105.120.12.82.85.84.85.66.69.50.77.83.75.73.88.2 [from value]
+ Found item [filterName='to-ix'] index: 5.116.111.45.105.120.12.114.97.116.101.45.50.48.109.45.114.99.110.3 [from value]
+ Found item [filterName='to-map'] index: 6.116.111.45.109.97.112.11.70.82.79.77.95.82.85.84.85.66.69.2 [from value]
+ Found item [filterName='to-map'] index: 6.116.111.45.109.97.112.21.114.97.116.101.45.53.48.109.45.108.105.109.105.116.45.114.117.116.117.98.101.3 [from value]
+ Found item [filterName='discard'] index: 7.100.105.115.99.97.114.100.15.100.105.115.99.97.114.100.45.112.97.99.107.101.116.115.2 [from value]
+ Found item [filterName='from-map'] index: 8.102.114.111.109.45.109.97.112.9.84.79.95.82.85.84.85.66.69.2 [from value]
+ Found item [filterName='from-map'] index: 8.102.114.111.109.45.109.97.112.21.114.97.116.101.45.53.48.109.45.108.105.109.105.116.45.114.117.116.117.98.101.3 [from value]
+ Found item [filterName='test-aak'] index: 8.116.101.115.116.45.97.97.107.8.65.65.75.95.73.67.77.80.2 [from value]
+ Found item [filterName='test-aak'] index: 8.116.101.115.116.45.97.97.107.12.114.97.116.101.45.54.52.107.45.97.97.107.3 [from value]
+ Found item [filterName='protect-RE'] index: 10.112.114.111.116.101.99.116.45.82.69.14.100.110.115.45.112.111.108.105.99.101.45.100.110.115.3 [from value]
+ Found item [filterName='protect-RE'] index: 10.112.114.111.116.101.99.116.45.82.69.14.110.116.112.45.112.111.108.105.99.101.45.110.116.112.3 [from value]
<---cut--->

OID I want to query is .1.3.6.1.4.1.2636.3.5.2.1.5. snmpwalk for .1.3.6.1.4.1.2636.3.5.2.1.5.10.112.114.111.116.101.99.116.45.82.69.14.110.116.112.45.112.111.108.105.99.101.45.110.116.112.3 (last index in listing above) gives result SNMPv2-SMI::enterprises.2636.3.5.2.1.5.10.112.114.111.116.101.99.116.45.82.69.14.110.116.112.45.112.111.108.105.99.101.45.110.116.112.3 = Counter64: 0
which looks correct


I've created really simple graph template with a single Line for testing purposes.
I've set suggeted values for data template name and graph template title both as |host_description| - |query_filterName| - |query_counterName|

In data template I set 'Index Type','Index Value' and 'Output Type ID' as per-data source values.

After all, when I am creating a new graph, I see all the filterName/counterName pairs as they are on the router (so, I suppose that data query works good). But the datasource created looks strange and doesn't work.
First, my |query_*| macros in data/graph template are not expanded, so data source is named like rotuerName-|query_filterName| - |query_counterName|.
In the data source created I see following:
Index Type Data query data sources must be created through New Graphs.
Index Value
Output Type ID Data query data sources must be created through New Graphs.

I cant find what I am missing. Please, help me to resolve this issue!

Regards,
Alexander.
Attachments
jnx-firewall-counters.xml
(1023 Bytes) Downloaded 268 times
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests