Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Thu Jun 20, 2019 8:13 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 62 posts ]  Go to page 1, 2, 3, 4, 5  Next
Author Message
 Post subject: Ethernet Stats(RFC1643) - XML
PostPosted: Tue Apr 20, 2004 9:01 am 
Offline

Joined: Sun Apr 18, 2004 10:31 am
Posts: 6
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:
File comment: One data/graph template for all OID's - example.
rfc1643.png
rfc1643.png [ 13.23 KiB | Viewed 58871 times ]
File comment: XML-File for SNMP(indexed)
rfc1643.xml [3.45 KiB]
Downloaded 5504 times
Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 23, 2004 3:32 am 
Offline
Cacti User
User avatar

Joined: Wed Jan 14, 2004 3:23 am
Posts: 256
Location: Germany
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:

Quote:
<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:

Quote:
<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


Top
 Profile  
 
 Post subject: Ethernet Stats(RFC1643) - XML
PostPosted: Fri Apr 23, 2004 7:13 am 
Offline

Joined: Sun Apr 18, 2004 10:31 am
Posts: 6
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:
File comment: data/graph templates &amp; data query in xml.
templates_rfc1643.tar [100 KiB]
Downloaded 3984 times
Top
 Profile  
 
 Post subject: error with query
PostPosted: Fri Apr 23, 2004 8:21 am 
Offline

Joined: Tue Apr 20, 2004 8:14 pm
Posts: 4
Location: Atlanta
I am getting this error when the data query runs on my 3640 router and my pix 515e.

Quote:
+ 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?


Top
 Profile  
 
 Post subject: Ethernet Stats(RFC1643) - XML
PostPosted: Fri Apr 23, 2004 9:14 am 
Offline

Joined: Sun Apr 18, 2004 10:31 am
Posts: 6
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


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 27, 2004 3:33 am 
XML parse error on the last 3 ...


Top
  
 
 Post subject: Ethernet Stats(RFC1643) - XML
PostPosted: Tue Apr 27, 2004 4:07 am 
Offline

Joined: Sun Apr 18, 2004 10:31 am
Posts: 6
Which cacti version is installed on your machine?


Top
 Profile  
 
 Post subject:
PostPosted: 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 :)


Top
  
 
 Post subject:
PostPosted: Tue Apr 27, 2004 4:16 am 
Offline

Joined: Wed Apr 21, 2004 7:50 am
Posts: 37
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...


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 27, 2004 4:16 am 
Offline

Joined: Wed Apr 21, 2004 7:50 am
Posts: 37
Guest = Websi


Top
 Profile  
 
 Post subject:
PostPosted: 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


Top
  
 
 Post subject:
PostPosted: 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 :)


Top
  
 
 Post subject: Ethernet Stats(RFC1643) - XML
PostPosted: Mon May 03, 2004 9:05 am 
Offline

Joined: Sun Apr 18, 2004 10:31 am
Posts: 6
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


Top
 Profile  
 
 Post subject: from a 2950 running 12.1.9
PostPosted: Mon May 03, 2004 9:17 am 
Offline
Cacti Pro User
User avatar

Joined: Thu Nov 21, 2002 8:55 am
Posts: 703
Location: Austin, TX
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


Top
 Profile  
 
 Post subject: Ethernet Stats(RFC1643) - XML
PostPosted: Mon May 03, 2004 1:53 pm 
Offline

Joined: Sun Apr 18, 2004 10:31 am
Posts: 6
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 62 posts ]  Go to page 1, 2, 3, 4, 5  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group