Text Parse on SNMPGet

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

Moderators: Developers, Moderators

Post Reply
WeAreGray
Posts: 10
Joined: Sun Feb 06, 2011 7:19 pm

Text Parse on SNMPGet

Post by WeAreGray »

hello,
I am trying to parse the response I receive to an SNMPGET. Below is a list of some strings that I get. What I would like to do is to condense the string down so that "WS-F6700-DFC3BXL Distributed Forwarding Card 3 sub-module of 1" becomes "DFC Sub-Module of 1". Is this possible, and if so, how?

Thank You

WS-F6700-DFC3BXL Distributed Forwarding Card 3 sub-module of 1
WS-F6700-DFC3BXL Distributed Forwarding Card 3 sub-module of 2
WS-F6700-DFC3BXL Distributed Forwarding Card 3 sub-module of 3
WS-F6700-DFC3BXL Distributed Forwarding Card 3 sub-module of 4
WS-F6K-PFC3BXL Policy Feature Card 3 sub-module of 5
WS-F6K-PFC3BXL Policy Feature Card 3 sub-module of 6


<entPhysicalName>
<name>Description</name>
<method>get</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.2.1.47.1.1.1.1.7</oid>
</entPhysicalName>
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: Text Parse on SNMPGet

Post by noname »

I'm not sure but maybe this helps a bit..
- VALUE/REGEXP in Action

I don't know how to add custom string (like "DFC") as value.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests