Ethernet Stats(RFC1643) - XML

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

Moderators: Moderators, Developers

Author
Message
k.c.o.r.e
Posts: 6
Joined: Sun Apr 18, 2004 10:31 am

Ethernet Stats(RFC1643) - XML

#1 Post by k.c.o.r.e » Tue Apr 20, 2004 9:01 am

Hi guys,

First post. Thanks to all for the great work. I'm tired of tools like Concord Ehealth or Vital Suite and Cacti seems to be the future solution.

I'm posting the "Ethernet Like MIB"(RFC1643) XML-File for quering:

AlignmentErrors
FCSErrors
SingleCollisionFrames
MultipleCollisionFrames
SQETestErrors
DeferredTransmissions
LateCollisions
ExcessiveCollisions
InternalMacTransmitErrors
CarrierSenseErrors
FrameTooLongs
InternalMacReceiveErrors

Tested it with Cisco, Nortel Baystack/Passport, Checkpoint Firewall and some others.

I'm using dot3StatsIndex, ifDescription, ifType for input direction in the xml.

Is it possible to display only dot3StatsIndex, ifDescription and ifType, where ifType='ethernetCsmacd(6)' and discard all other input(where ifType=Serial,Other...)?

It would look nice, but it's not required to use the data query.

In the moment, serial and other interface-types will be displayed without index(dot3StatsIndex), so don't forget to mark only checkboxes, where ifType='ethernetCsmacd(6)'.

If we need an additional elsif in lib/data_query.php(value,OID/REGEXP,VALUE/REGEXP), i'll code it. I'm currently working on extended stats for frame relay and atm.

Chris
Attachments
rfc1643.xml
XML-File for SNMP(indexed)
(3.45 KiB) Downloaded 5539 times
rfc1643.png
One data/graph template for all OID's - example.
rfc1643.png (13.23 KiB) Viewed 59180 times

User avatar
Pumpi
Cacti User
Posts: 256
Joined: Wed Jan 14, 2004 3:23 am
Location: Germany

#2 Post by Pumpi » Fri Apr 23, 2004 3:32 am

Hi k.c.o.r.e,

thanks for sharing your work but I'm not able to import your xml file to Cacti 0.8.5.a. (Import Template from Text or File)


Perhaps the xml file is not complete ?

Looking into another working xml template it looks like:
<cacti>
<hash_000001e3780a13b0f7a3f85a44b70cd4d2fd36>
<name>Unix - Ping Latency (Detailed)</name>
<graph>
<t_title>on</t_title>
<title>|host_description| - ICMP Latency</title>
<t_image_format_id></t_image_format_id>
<image_format_id>1</image_format_id>
<t_height></t_height>
<height>120</height>
<t_width></t_width>
<width>500</width>
<t_auto_scale></t_auto_scale>
<auto_scale></auto_scale>
<t_auto_scale_opts></t_auto_scale_opts>
<auto_scale_opts>2</auto_scale_opts>
<t_auto_scale_log></t_auto_scale_log>
<auto_scale_log></auto_scale_log>
.....
and your template looks like:
<interface>
<name>Get SNMP Interfaces "Ethernet Like" Stats(RFC1643)</name>
<description>Queries a host for RFC1643 Interface Stats</description>
<oid_index>.1.3.6.1.2.1.10.7.2.1.1</oid_index>

<fields>
<dot3StatsIndex>
<name>dot3StatsIndex</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.2.1.10.7.2.1.1</oid>
</dot3StatsIndex>
<ifDescr>
<name>Description</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.2.1.2.2.1.2</oid>
</ifDescr>
<ifType>
<name>Type</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
.....
Can you redo the Template Export and post this interessting template again ?

Thanks

k.c.o.r.e
Posts: 6
Joined: Sun Apr 18, 2004 10:31 am

Ethernet Stats(RFC1643) - XML

#3 Post by k.c.o.r.e » Fri Apr 23, 2004 7:13 am

Hi,

Let's try this: extract the tarball and import the xml's.

data_template_rfc1643.xml
graph_template_rfc1643.xml
data_query_rfc1643.xml

Should work. Post a reply, if it's not working.

Chris
Attachments
templates_rfc1643.tar
data/graph templates &amp; data query in xml.
(100 KiB) Downloaded 3992 times

ethorn
Posts: 4
Joined: Tue Apr 20, 2004 8:14 pm
Location: Atlanta

error with query

#4 Post by ethorn » Fri Apr 23, 2004 8:21 am

I am getting this error when the data query runs on my 3640 router and my pix 515e.
+ Running data query [13].
+ Found type = '3' [snmp query].
+ Could not find data query XML file at '/usr/local/cacti/resource/snmp_queries/rfc1643.xml'
+ Error parsing XML file into an array.
any clue?

k.c.o.r.e
Posts: 6
Joined: Sun Apr 18, 2004 10:31 am

Ethernet Stats(RFC1643) - XML

#5 Post by k.c.o.r.e » Fri Apr 23, 2004 9:14 am

Try to copy the first attachment(rfc1643.xml) to your |path_cacti| (it should be /usr/local/cacti/resource/snmp_queries in your case).

The first attachment is essential and used for the data query with the correct oid's.
But you are right. It need a lot of time to set up the data/graph templates & the data query, so i post it in the second step. Sorry for that.

Don't forget to mark only those interfaces, where ifType='ethernet(Csmacd)'. I have no solution in the moment, to filter out the other interface types in the discovery process...

Chris

Guest

#6 Post by Guest » Tue Apr 27, 2004 3:33 am

XML parse error on the last 3 ...

k.c.o.r.e
Posts: 6
Joined: Sun Apr 18, 2004 10:31 am

Ethernet Stats(RFC1643) - XML

#7 Post by k.c.o.r.e » Tue Apr 27, 2004 4:07 am

Which cacti version is installed on your machine?

Guest

#8 Post by Guest » Tue Apr 27, 2004 4:10 am

my verion of cacti is 0.8.5

At the begining, i've added you first file with no problem but with no result too :)

websi
Posts: 37
Joined: Wed Apr 21, 2004 7:50 am
Contact:

#9 Post by websi » Tue Apr 27, 2004 4:16 am

ok...my probleme is more difficult...
I don't think it's your file that is incorrect.

I export as a file toto.xml and import this file and i have again a xml parse error...

websi
Posts: 37
Joined: Wed Apr 21, 2004 7:50 am
Contact:

#10 Post by websi » Tue Apr 27, 2004 4:16 am

Guest = Websi

Zap

#11 Post by Zap » Wed Apr 28, 2004 6:37 pm

Thanks for the Ethernet Stats templates, they were just what I was looking for.

I have them working but I have run into one issue. When I gather stats from a Cisco 2950, 24 port switch the names at the top of the graphs are incorrect for any interface that has two digits for the port number. Interfaces with a single digit port number are fine.

For example

hostname(FastEthernet0//10) - dot3Stats(RFC1642)
becomes...
hostname(FastEthernet0//1) - dot3Stats(RFC1642)

hostname(FastEthernet0//21) - dot3Stats(RFC1642)
becomes...
hostname(FastEthernet0//2) - dot3Stats(RFC1642)

I am a beginner at using cati and I know even less about xml. I had a look at the xml templates and I cannot find what is causing this. I have tried it on three different cacti installs with the same results. I have also tried a Cisco 2924 and a 2950 switch.

I did notice that when I create the graphs and select the interfaces I want to graph that the port names are correct, they only drop the second digit when the graphs are actually created.

Dan

Guest

#12 Post by Guest » Thu Apr 29, 2004 7:27 am

nobody has an xml parse error whith the 3 xml of the temmplates_rfc1643.tar?

What is the exact way to add them?
why does it not work with me?

I'va done a new install end it's the same result!

I install cacti, and i go quickly on the import menu... i choose data_query_rfc1643.xml and...and ...and... Error: XML parse error...

Whyyyyyyyyy??? :cry:

Thanks :)

k.c.o.r.e
Posts: 6
Joined: Sun Apr 18, 2004 10:31 am

Ethernet Stats(RFC1643) - XML

#13 Post by k.c.o.r.e » Mon May 03, 2004 9:05 am

Hi Zap,

I don't have Cisco 2950 in my network so i cannot test it. Can you send me the output of
"snmpwalk -c <Community> <IP-Address> .1.3.6.1.2.1.2.2.1.2"?

Chris

User avatar
egarnel
Cacti Pro User
Posts: 703
Joined: Thu Nov 21, 2002 8:55 am
Location: Austin, TX

from a 2950 running 12.1.9

#14 Post by egarnel » Mon May 03, 2004 9:17 am

IF-MIB::ifDescr.1 = STRING: FastEthernet0/1
IF-MIB::ifDescr.2 = STRING: FastEthernet0/2
IF-MIB::ifDescr.3 = STRING: FastEthernet0/3
IF-MIB::ifDescr.4 = STRING: FastEthernet0/4
IF-MIB::ifDescr.5 = STRING: FastEthernet0/5
IF-MIB::ifDescr.6 = STRING: FastEthernet0/6
IF-MIB::ifDescr.7 = STRING: FastEthernet0/7
IF-MIB::ifDescr.8 = STRING: FastEthernet0/8
IF-MIB::ifDescr.9 = STRING: FastEthernet0/9
IF-MIB::ifDescr.10 = STRING: FastEthernet0/10
IF-MIB::ifDescr.11 = STRING: FastEthernet0/11
IF-MIB::ifDescr.12 = STRING: FastEthernet0/12
IF-MIB::ifDescr.13 = STRING: FastEthernet0/13
IF-MIB::ifDescr.14 = STRING: FastEthernet0/14
IF-MIB::ifDescr.15 = STRING: FastEthernet0/15
IF-MIB::ifDescr.16 = STRING: FastEthernet0/16
IF-MIB::ifDescr.17 = STRING: FastEthernet0/17
IF-MIB::ifDescr.18 = STRING: FastEthernet0/18
IF-MIB::ifDescr.19 = STRING: FastEthernet0/19
IF-MIB::ifDescr.20 = STRING: FastEthernet0/20
IF-MIB::ifDescr.21 = STRING: FastEthernet0/21
IF-MIB::ifDescr.22 = STRING: FastEthernet0/22
IF-MIB::ifDescr.23 = STRING: FastEthernet0/23
IF-MIB::ifDescr.24 = STRING: FastEthernet0/24
IF-MIB::ifDescr.25 = STRING: FastEthernet0/25
IF-MIB::ifDescr.26 = STRING: FastEthernet0/26
IF-MIB::ifDescr.27 = STRING: Null0
IF-MIB::ifDescr.28 = STRING: Vlan1
IF-MIB::ifDescr.29 = STRING: Vlan10

k.c.o.r.e
Posts: 6
Joined: Sun Apr 18, 2004 10:31 am

Ethernet Stats(RFC1643) - XML

#15 Post by k.c.o.r.e » Mon May 03, 2004 1:53 pm

Hi Zap,


What a fuck, had same problem with Nortel Passport 8000. After analysing all scripts for hours, i found that the function substitute_snmp_query_data in lib/variables.php is the reason. The problem is, all field_values read out from the host_snmp_cache table will be truncated to 15 characters and written to graph_template_graph.title_cache...

The solution is easy: Go into Cacti Settings -> Visual and change the Data Queries - Maximum Field Length to some other value than 15.
(had some problems with "old" devices, discovered before changed the setting. In worst case, delete all data sources/graphs & devices discovered with the data query and play around. I'm not sure, when the graph_template_graph.title_cache will be updated and how to do it right) .

Chris

Post Reply