[SOLVED] Template monitor Power Supply for Juniper EX series

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

Moderators: Developers, Moderators

Post Reply
schukido
Posts: 4
Joined: Mon Jun 07, 2010 9:06 am

[SOLVED] Template monitor Power Supply for Juniper EX series

Post by schukido »

Dear all,

I tried to add template to monitor Power Supply for Juniper EX series by edit Cisco 6509 template in this forum (http://forums.cacti.net/viewtopic.php?f=12&t=10491 ) But it's not successful, I dont know the OID of Juniper to snmpwalk Power Supply and I try to use this:
1.3.6.1.4.1.2636.3.1.13.1.6.2 = Power Supply ( link reference http://kb.juniper.net/InfoCenter/index? ... 7&actp=RSS ).

I verbose query snmp and it only detect 2 items and 1 row ( just only Power Supply 1, i want to see PS0 and PS1 also :( ). Does anyone have Juniper Power Supply Data Source Template plz share with me. Many thanks and best regards.

Hope to see all of yours reply

There is my datasource template xml:

<interface>
<name>Juniper EnvMon Power</name>
<description>Get Juniper Environmental Monitoring Power supply Data</description>
<oid_index>.1.3.6.1.4.1.2636.3.1.13.1.5.2</oid_index>
- <fields>
- <SupplyStatusDescr>
<name>Description</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.2636.3.1.13.1.5.2</oid>
</SupplyStatusDescr>
- <SupplyState>
<name>State</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.2636.3.1.13.1.6.2</oid>
</SupplyState>
Last edited by schukido on Thu Aug 18, 2011 11:18 pm, edited 1 time in total.
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: Template monitor Power Supply for Juniper EX series

Post by noname »

1) </fields> and </interface> are missing at the bottom of XML
2) For <SupplyState> field, <direction> should be "output" if you want to draw its value as graph line

And, if snmpwalk shows results as this post, you'll have to parse last 3 dimensions of its OID (.1.3.6.1.4.1.2636.3.1.13.1.5.2.x.y.z) for using it as index.

- HowTo: Data Query Templates - SNMP Index does not exist

Try this XML query:

Code: Select all

<interface>
<name>Juniper EnvMon Power</name>
<description>Get Juniper Environmental Monitoring Power supply Data</description>
<oid_index>.1.3.6.1.4.1.2636.3.1.13.1.5.2</oid_index>
<oid_index_parse>OID/REGEXP:.*\.([0-9]\.[0-9]\.[0-9])$</oid_index_parse>
<fields>
	<SupplyStatusDescr>
		<name>Description</name>
		<method>walk</method>
		<source>value</source>
		<direction>input</direction>
		<oid>.1.3.6.1.4.1.2636.3.1.13.1.5.2</oid>
	</SupplyStatusDescr>
	<SupplyState>
		<name>State</name>
		<method>walk</method>
		<source>value</source>
		<direction>output</direction>
		<oid>.1.3.6.1.4.1.2636.3.1.13.1.6.2</oid>
	</SupplyState>
</fields>
</interface>
schukido
Posts: 4
Joined: Mon Jun 07, 2010 9:06 am

Re: Template monitor Power Supply for Juniper EX series

Post by schukido »

@noname: Thank u for your help. I solved this problem by your guide. Now I can monitor the power supply of Juniper switch EX series.

DungTQ

NOC Engineer
schukido
Posts: 4
Joined: Mon Jun 07, 2010 9:06 am

Re: [SOLVED] Template monitor Power Supply for Juniper EX se

Post by schukido »

Right data queries template here.

Code: Select all

<interface>
<name>Juniper EnvMon Power</name>
<description>Get Juniper Environmental Monitoring Power supply Data</description>
<oid_index>.1.3.6.1.4.1.2636.3.1.13.1.5.2</oid_index>
<oid_index_parse>OID/REGEXP:.*\.([0-9]\.[0-9]\.[0-9])$</oid_index_parse>
<fields>
   <SupplyStatusDescr>
      <name>Description</name>
      <method>walk</method>
      <source>value</source>
      <direction>input</direction>
      <oid>.1.3.6.1.4.1.2636.3.1.13.1.5.2</oid>
   </SupplyStatusDescr>
   <SupplyState>
      <name>State</name>
      <method>walk</method>
      <source>value</source>
      <direction>input</direction>
      <oid>.1.3.6.1.4.1.2636.3.1.13.1.6.2</oid>
   </SupplyState>
   <SupplyStateOut>
      <name>State</name>
      <method>walk</method>
      <source>value</source>
      <direction>output</direction>
      <oid>.1.3.6.1.4.1.2636.3.1.13.1.6.2</oid>
   </SupplyStateOut>
</fields>
</interface>
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests