ZTE IP DSLAM AGENT Template

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

Moderators: Developers, Moderators

Post Reply
uyak
Posts: 2
Joined: Wed Mar 23, 2011 11:01 pm

ZTE IP DSLAM AGENT Template

Post by uyak »

Hi all, i need help how to parse oid index from ZTE IP DSLAM. I run snmp walk and result was :

snmpwalk -c public -v2c x.x.x.x .1.3.6.1.2.1.2.2

iso.3.6.1.2.1.2.2.1.2.25 = STRING: "SHDSL 1/1"
iso.3.6.1.2.1.2.2.1.2.26 = STRING: "SHDSL 1/2"
iso.3.6.1.2.1.2.2.1.2.27 = STRING: "SHDSL 1/3"
iso.3.6.1.2.1.2.2.1.2.28 = STRING: "SHDSL 1/4"
iso.3.6.1.2.1.2.2.1.2.29 = STRING: "SHDSL 1/5"
iso.3.6.1.2.1.2.2.1.2.30 = STRING: "SHDSL 1/6"
iso.3.6.1.2.1.2.2.1.2.31 = STRING: "SHDSL 1/7"
iso.3.6.1.2.1.2.2.1.2.32 = STRING: "SHDSL 1/8"
.
.
.
iso.3.6.1.2.1.2.2.1.2.122 = STRING: "Ethernet 5/2"

iso.3.6.1.2.1.2.2.1.3.25 = INTEGER: 96
iso.3.6.1.2.1.2.2.1.3.26 = INTEGER: 96
iso.3.6.1.2.1.2.2.1.3.27 = INTEGER: 96
iso.3.6.1.2.1.2.2.1.3.28 = INTEGER: 96
iso.3.6.1.2.1.2.2.1.3.29 = INTEGER: 96
iso.3.6.1.2.1.2.2.1.3.30 = INTEGER: 96
iso.3.6.1.2.1.2.2.1.3.31 = INTEGER: 96
iso.3.6.1.2.1.2.2.1.3.32 = INTEGER: 96
.
.
.
iso.3.6.1.2.1.2.2.1.3.122 = INTEGER: 6

iso.3.6.1.2.1.2.2.1.4.25 = INTEGER: 0
iso.3.6.1.2.1.2.2.1.4.26 = INTEGER: 0
iso.3.6.1.2.1.2.2.1.4.27 = INTEGER: 0
iso.3.6.1.2.1.2.2.1.4.28 = INTEGER: 0
iso.3.6.1.2.1.2.2.1.4.29 = INTEGER: 0
iso.3.6.1.2.1.2.2.1.4.30 = INTEGER: 0
iso.3.6.1.2.1.2.2.1.4.31 = INTEGER: 0
iso.3.6.1.2.1.2.2.1.4.32 = INTEGER: 0
.
.
.
iso.3.6.1.2.1.2.2.1.4.122 = INTEGER: 0

Theris no oid to show index_num, but interface index is from 25 to 122. I used default cacti interface.xml but cannot produce graph, anyone can help me?

thx
uyak
Posts: 2
Joined: Wed Mar 23, 2011 11:01 pm

Re: ZTE IP DSLAM AGENT Template

Post by uyak »

anyone can help? i learn how to parse xml but can't understand...
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: ZTE IP DSLAM AGENT Template

Post by noname »

See
- Zyxel SHDSL DSLAM SNR/ATN
- HowTos: Data Query Templates

And try this:

(1) Duplicate default interface.xml

(2) Modify like as follows

Original:
<interface>
<name>Get SNMP Interfaces</name>
<description>Queries a host for a list of monitorable interfaces</description>
<oid_index>.1.3.6.1.2.1.2.2.1.1</oid_index>
<oid_num_indexes>.1.3.6.1.2.1.2.1.0</oid_num_indexes>
<index_order>ifDescr:ifName:ifHwAddr:ifIndex</index_order>
<index_order_type>numeric</index_order_type>
<index_title_format>|chosen_order_field|</index_title_format>

<fields>
<ifIndex>
<name>Index</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.2.1.2.2.1.1</oid>
</ifIndex>
<ifOperStatus>
......
Modified:
<interface>
<name>Get SNMP Interfaces (without ifIndex)</name>
<description>Queries a host for a list of monitorable interfaces</description>
<oid_index>.1.3.6.1.2.1.2.2.1.2</oid_index>
<oid_index_parse>OID/REGEXP:.*\.([0-9]{1,3})$</oid_index_parse>
<index_order>ifDescr:ifName:ifHwAddr:Index</index_order>
<index_order_type>numeric</index_order_type>
<index_title_format>|chosen_order_field|</index_title_format>

<fields>
<Index>
<name>Index</name>
<source>index</source>
<direction>input</direction>
</Index>

<ifOperStatus>
......
(3) In 'Console -> Data Queries', create new data query to resemble original 'SNMP - Interface Statistics' (unfortunately it can't be duplicated), and use new XML (made at the above)

(4) In 'Console -> Devices', add new data query to your device

(5) Create graph

Good luck.

NOTICE:
If you have problems with showing IP address, such like this..
data_query_problem.png
data_query_problem.png (8.98 KiB) Viewed 7348 times
Then, please delete these lines from XML.
<ifIP>
<name>IP Address</name>
<method>walk</method>
<source>OID/REGEXP:.*\.([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})$</source>
<direction>input</direction>
<oid>.1.3.6.1.2.1.4.20.1.2</oid>
</ifIP>
Because this(original) template expects that query results should be

Code: Select all

.1.3.6.1.2.1.4.20.1.2.aaa.bbb.ccc.ddd = <index value from ifIndex>
to make IP address field.
But this time you changed behavior for getting index, so it cannot bind IP address to index properly.
(I couldn't fix this problem..)

// Sorry my English
xolo
Posts: 9
Joined: Fri Dec 25, 2009 7:19 am

Re: ZTE IP DSLAM AGENT Template

Post by xolo »

thanks for information...
rezi
Posts: 6
Joined: Thu Mar 31, 2011 4:44 am

Re: ZTE IP DSLAM AGENT Template

Post by rezi »

This is what's look for result:
+ Running data query [10].
+ Found type = '4 '[script query].
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/zte.xml'
+ XML file parsed ok.
+ Executing script for list of indexes ' '
+ Executing script query ' '
+ Executing script query ' '
+ Executing script query ' '
+ Executing script query ' '
+ Executing script query ' '
+ Executing script query ' '
+ Executing script query ' '
+ Executing script query ' '
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/zte.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/zte.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/zte.xml'
there still error.. pliss give some help
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: ZTE IP DSLAM AGENT Template

Post by noname »

rezi wrote:+ Running data query [10].
+ Found type = '4 '[script query].
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/zte.xml'
+ XML file parsed ok.
+ Executing script for list of indexes ' '
+ Executing script query ' '
...
Probably you incorrectly selected 'Get Script Data (Indexed)' for 'Data Input Method' in Data Query Setting.
This should be 'Get SNMP Data (Indexed)'.
rezi
Posts: 6
Joined: Thu Mar 31, 2011 4:44 am

Re: ZTE IP DSLAM AGENT Template

Post by rezi »

the next result is like this :
+ Running data query [10].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/zte.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.2.1.2.2.1.2'
+ No SNMP data returned
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/zte.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/zte.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/zte.xml'
please give any advise or something?? my mind was dead end
sorry my english is bad
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: ZTE IP DSLAM AGENT Template

Post by noname »

Perform these snmpwalk commands and post results.
(1) snmpwalk -v2c -c COMMUNITY -On IPADDRESS .1.3.6.1.2.1.2.2.1.1
(2) snmpwalk -v2c -c COMMUNITY -On IPADDRESS .1.3.6.1.2.1.2.2.1.2
rezi
Posts: 6
Joined: Thu Mar 31, 2011 4:44 am

Re: ZTE IP DSLAM AGENT Template

Post by rezi »

number 1 the result :
snmpwalk -v2c -c xxxxx -On x.x.x.x .1.3.6.1.2.1.2.2.1.1
.1.3.6.1.2.1.2.2.1.1 = No more variables left in this MIB View (It is past the end of the MIB tree)

number 2 the result:
snmpwalk -v2c -c xxxxx -On x.x.x.x.1.3.6.1.2.1.2.2.1.2
.1.3.6.1.2.1.2.2.1.2.25 = STRING: "SHDSL 1/1"
.1.3.6.1.2.1.2.2.1.2.26 = STRING: "SHDSL 1/2"
.1.3.6.1.2.1.2.2.1.2.27 = STRING: "SHDSL 1/3"
.1.3.6.1.2.1.2.2.1.2.28 = STRING: "SHDSL 1/4"
.1.3.6.1.2.1.2.2.1.2.29 = STRING: "SHDSL 1/5"
.1.3.6.1.2.1.2.2.1.2.30 = STRING: "SHDSL 1/6"
.1.3.6.1.2.1.2.2.1.2.31 = STRING: "SHDSL 1/7"
.1.3.6.1.2.1.2.2.1.2.32 = STRING: "SHDSL 1/8"
.1.3.6.1.2.1.2.2.1.2.33 = STRING: "SHDSL 1/9"
.1.3.6.1.2.1.2.2.1.2.34 = STRING: "SHDSL 1/10"
.1.3.6.1.2.1.2.2.1.2.35 = STRING: "SHDSL 1/11"
.1.3.6.1.2.1.2.2.1.2.36 = STRING: "SHDSL 1/12"
.1.3.6.1.2.1.2.2.1.2.37 = STRING: "SHDSL 1/13"
.1.3.6.1.2.1.2.2.1.2.38 = STRING: "SHDSL 1/14"
.1.3.6.1.2.1.2.2.1.2.39 = STRING: "SHDSL 1/15"
.1.3.6.1.2.1.2.2.1.2.40 = STRING: "SHDSL 1/16"
.1.3.6.1.2.1.2.2.1.2.41 = STRING: "SHDSL 1/17"
.1.3.6.1.2.1.2.2.1.2.42 = STRING: "SHDSL 1/18"
.1.3.6.1.2.1.2.2.1.2.43 = STRING: "SHDSL 1/19"
.1.3.6.1.2.1.2.2.1.2.44 = STRING: "SHDSL 1/20"
.1.3.6.1.2.1.2.2.1.2.45 = STRING: "SHDSL 1/21"
.1.3.6.1.2.1.2.2.1.2.46 = STRING: "SHDSL 1/22"
.1.3.6.1.2.1.2.2.1.2.47 = STRING: "SHDSL 1/23"
.1.3.6.1.2.1.2.2.1.2.48 = STRING: "SHDSL 1/24"
.1.3.6.1.2.1.2.2.1.2.49 = STRING: "SHDSL 2/1"
.1.3.6.1.2.1.2.2.1.2.50 = STRING: "SHDSL 2/2"
.1.3.6.1.2.1.2.2.1.2.51 = STRING: "SHDSL 2/3"
.1.3.6.1.2.1.2.2.1.2.52 = STRING: "SHDSL 2/4"
.1.3.6.1.2.1.2.2.1.2.53 = STRING: "SHDSL 2/5"
.1.3.6.1.2.1.2.2.1.2.54 = STRING: "SHDSL 2/6"
.1.3.6.1.2.1.2.2.1.2.55 = STRING: "SHDSL 2/7"
.1.3.6.1.2.1.2.2.1.2.56 = STRING: "SHDSL 2/8"
.1.3.6.1.2.1.2.2.1.2.57 = STRING: "SHDSL 2/9"
.1.3.6.1.2.1.2.2.1.2.58 = STRING: "SHDSL 2/10"
.1.3.6.1.2.1.2.2.1.2.59 = STRING: "SHDSL 2/11"
.1.3.6.1.2.1.2.2.1.2.60 = STRING: "SHDSL 2/12"
.1.3.6.1.2.1.2.2.1.2.61 = STRING: "SHDSL 2/13"
.1.3.6.1.2.1.2.2.1.2.62 = STRING: "SHDSL 2/14"
.1.3.6.1.2.1.2.2.1.2.63 = STRING: "SHDSL 2/15"
.1.3.6.1.2.1.2.2.1.2.64 = STRING: "SHDSL 2/16"
.1.3.6.1.2.1.2.2.1.2.65 = STRING: "SHDSL 2/17"
.1.3.6.1.2.1.2.2.1.2.66 = STRING: "SHDSL 2/18"
.1.3.6.1.2.1.2.2.1.2.67 = STRING: "SHDSL 2/19"
.1.3.6.1.2.1.2.2.1.2.68 = STRING: "SHDSL 2/20"
.1.3.6.1.2.1.2.2.1.2.69 = STRING: "SHDSL 2/21"
.1.3.6.1.2.1.2.2.1.2.70 = STRING: "SHDSL 2/22"
.1.3.6.1.2.1.2.2.1.2.71 = STRING: "SHDSL 2/23"
.1.3.6.1.2.1.2.2.1.2.72 = STRING: "SHDSL 2/24"
.1.3.6.1.2.1.2.2.1.2.121 = STRING: "Ethernet 5/1"
.1.3.6.1.2.1.2.2.1.2.122 = STRING: "Ethernet 5/2"

then what i do now??
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: ZTE IP DSLAM AGENT Template

Post by noname »

Hmm, both results looks like valid for the case of this topic...
I'll check query.
(But I tell you in advance, I don't have any ZyXEL devices)
rezi
Posts: 6
Joined: Thu Mar 31, 2011 4:44 am

Re: ZTE IP DSLAM AGENT Template

Post by rezi »

Any news for this problem??
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: ZTE IP DSLAM AGENT Template

Post by noname »

rezi wrote:...
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.2.1.2.2.1.2'
+ No SNMP data returned
...
Sorry such a fundamental question,
did you set SNMP options (community, etc.) for that device properly?
rezi
Posts: 6
Joined: Thu Mar 31, 2011 4:44 am

Re: ZTE IP DSLAM AGENT Template

Post by rezi »

i think the correct is .1.3.6.1.2.1.2.2.1 because when i snmpwalk the result is like this :


iso.3.6.1.2.1.2.2.1.2.25 = STRING: "SHDSL 1/1"
iso.3.6.1.2.1.2.2.1.2.26 = STRING: "SHDSL 1/2"
iso.3.6.1.2.1.2.2.1.2.27 = STRING: "SHDSL 1/3"
iso.3.6.1.2.1.2.2.1.2.28 = STRING: "SHDSL 1/4"
iso.3.6.1.2.1.2.2.1.2.29 = STRING: "SHDSL 1/5"
iso.3.6.1.2.1.2.2.1.2.30 = STRING: "SHDSL 1/6"
iso.3.6.1.2.1.2.2.1.2.31 = STRING: "SHDSL 1/7"
iso.3.6.1.2.1.2.2.1.2.32 = STRING: "SHDSL 1/8"
iso.3.6.1.2.1.2.2.1.2.33 = STRING: "SHDSL 1/9"
iso.3.6.1.2.1.2.2.1.2.34 = STRING: "SHDSL 1/10"
iso.3.6.1.2.1.2.2.1.2.35 = STRING: "SHDSL 1/11"
iso.3.6.1.2.1.2.2.1.2.36 = STRING: "SHDSL 1/12"
iso.3.6.1.2.1.2.2.1.2.37 = STRING: "SHDSL 1/13"
iso.3.6.1.2.1.2.2.1.2.38 = STRING: "SHDSL 1/14"
iso.3.6.1.2.1.2.2.1.2.39 = STRING: "SHDSL 1/15"
iso.3.6.1.2.1.2.2.1.2.40 = STRING: "SHDSL 1/16"
iso.3.6.1.2.1.2.2.1.2.41 = STRING: "SHDSL 1/17"
iso.3.6.1.2.1.2.2.1.2.42 = STRING: "SHDSL 1/18"
iso.3.6.1.2.1.2.2.1.2.43 = STRING: "SHDSL 1/19"
iso.3.6.1.2.1.2.2.1.2.44 = STRING: "SHDSL 1/20"
iso.3.6.1.2.1.2.2.1.2.45 = STRING: "SHDSL 1/21"
iso.3.6.1.2.1.2.2.1.2.46 = STRING: "SHDSL 1/22"
iso.3.6.1.2.1.2.2.1.2.47 = STRING: "SHDSL 1/23"
iso.3.6.1.2.1.2.2.1.2.48 = STRING: "SHDSL 1/24"
iso.3.6.1.2.1.2.2.1.2.121 = STRING: "Ethernet 5/1"
iso.3.6.1.2.1.2.2.1.2.122 = STRING: "Ethernet 5/2"
iso.3.6.1.2.1.2.2.1.3.25 = INTEGER: 96
iso.3.6.1.2.1.2.2.1.3.26 = INTEGER: 96
iso.3.6.1.2.1.2.2.1.3.27 = INTEGER: 96
iso.3.6.1.2.1.2.2.1.3.28 = INTEGER: 96
iso.3.6.1.2.1.2.2.1.3.29 = INTEGER: 96
iso.3.6.1.2.1.2.2.1.3.30 = INTEGER: 96
iso.3.6.1.2.1.2.2.1.3.31 = INTEGER: 96
iso.3.6.1.2.1.2.2.1.3.32 = INTEGER: 96
iso.3.6.1.2.1.2.2.1.3.33 = INTEGER: 96
iso.3.6.1.2.1.2.2.1.3.34 = INTEGER: 96
iso.3.6.1.2.1.2.2.1.3.35 = INTEGER: 96
iso.3.6.1.2.1.2.2.1.3.36 = INTEGER: 96
iso.3.6.1.2.1.2.2.1.3.37 = INTEGER: 96
iso.3.6.1.2.1.2.2.1.3.38 = INTEGER: 96
iso.3.6.1.2.1.2.2.1.3.39 = INTEGER: 96
iso.3.6.1.2.1.2.2.1.3.40 = INTEGER: 96
iso.3.6.1.2.1.2.2.1.3.41 = INTEGER: 96
iso.3.6.1.2.1.2.2.1.3.42 = INTEGER: 96
iso.3.6.1.2.1.2.2.1.3.43 = INTEGER: 96
iso.3.6.1.2.1.2.2.1.3.44 = INTEGER: 96
iso.3.6.1.2.1.2.2.1.3.45 = INTEGER: 96
iso.3.6.1.2.1.2.2.1.3.46 = INTEGER: 96
iso.3.6.1.2.1.2.2.1.3.47 = INTEGER: 96
iso.3.6.1.2.1.2.2.1.3.48 = INTEGER: 96
iso.3.6.1.2.1.2.2.1.3.121 = INTEGER: 6
iso.3.6.1.2.1.2.2.1.3.122 = INTEGER: 6
iso.3.6.1.2.1.2.2.1.4.25 = INTEGER: 0
iso.3.6.1.2.1.2.2.1.4.26 = INTEGER: 0
iso.3.6.1.2.1.2.2.1.4.27 = INTEGER: 0
iso.3.6.1.2.1.2.2.1.4.28 = INTEGER: 0
iso.3.6.1.2.1.2.2.1.4.29 = INTEGER: 0
iso.3.6.1.2.1.2.2.1.4.30 = INTEGER: 0
iso.3.6.1.2.1.2.2.1.4.31 = INTEGER: 0
iso.3.6.1.2.1.2.2.1.4.32 = INTEGER: 0
iso.3.6.1.2.1.2.2.1.4.33 = INTEGER: 0
iso.3.6.1.2.1.2.2.1.4.34 = INTEGER: 0
iso.3.6.1.2.1.2.2.1.4.35 = INTEGER: 0
iso.3.6.1.2.1.2.2.1.4.36 = INTEGER: 0
iso.3.6.1.2.1.2.2.1.4.37 = INTEGER: 0
iso.3.6.1.2.1.2.2.1.4.38 = INTEGER: 0
iso.3.6.1.2.1.2.2.1.4.39 = INTEGER: 0
iso.3.6.1.2.1.2.2.1.4.40 = INTEGER: 0
iso.3.6.1.2.1.2.2.1.4.41 = INTEGER: 0
iso.3.6.1.2.1.2.2.1.4.42 = INTEGER: 0
iso.3.6.1.2.1.2.2.1.4.43 = INTEGER: 0
iso.3.6.1.2.1.2.2.1.4.44 = INTEGER: 0
iso.3.6.1.2.1.2.2.1.4.45 = INTEGER: 0
iso.3.6.1.2.1.2.2.1.4.46 = INTEGER: 0
iso.3.6.1.2.1.2.2.1.4.47 = INTEGER: 0
iso.3.6.1.2.1.2.2.1.4.48 = INTEGER: 0
iso.3.6.1.2.1.2.2.1.4.121 = INTEGER: 0
iso.3.6.1.2.1.2.2.1.4.122 = INTEGER: 0
iso.3.6.1.2.1.2.2.1.5.25 = INTEGER: 24000
iso.3.6.1.2.1.2.2.1.5.26 = INTEGER: 24000
iso.3.6.1.2.1.2.2.1.5.27 = INTEGER: 24000
rezi
Posts: 6
Joined: Thu Mar 31, 2011 4:44 am

Re: ZTE IP DSLAM AGENT Template

Post by rezi »

anything wrong with my query or maybe i forgot something please check it:


<interface>
<name>Get SNMP Interfaces (without ifIndex)</name>
<description>Queries a host for a list of monitorable interfaces</description>
<oid_index>.1.3.6.1.2.1.2.2.1</oid_index>
<oid_index_parse>OID/REGEXP:.*\.([0-9]{1,3})$</oid_index_parse>
<index_order>Index</index_order>
<index_order_type>alphabetic</index_order_type>

<fields>
<Index>
<name>Index</name>
<source>index</source>
<direction>input</direction>
</Index>
</fields>
</interface>
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: ZTE IP DSLAM AGENT Template

Post by noname »

rezi wrote:i think the correct is .1.3.6.1.2.1.2.2.1 because when i snmpwalk the result is like this :
iso.3.6.1.2.1.2.2.1.2.25 = STRING: "SHDSL 1/1"
iso.3.6.1.2.1.2.2.1.2.26 = STRING: "SHDSL 1/2"
iso.3.6.1.2.1.2.2.1.2.27 = STRING: "SHDSL 1/3"
...
Sorry, my question was a bit short.
Not for command line, but for device settings.
Because when I set wrong SNMP community in device settings, I saw same error: 'No SNMP data returned' in result of verbose query.


Your query seems to be correct..

BTW,
rezi wrote:<oid_index>.1.3.6.1.2.1.2.2.1</oid_index>
This should be '.1.3.6.1.2.1.2.2.1.2' (or .3 or .4 or other sub-OID).
Result is same, but amount of query is reduced.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests