Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


Ethernet Stats(RFC1643) - XML
Goto page 1, 2, 3, 4  Next
 
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates
Author Message
k.c.o.r.e



Joined: 18 Apr 2004
Posts: 6

PostPosted: Tue Apr 20, 2004 9:01 am    Post subject: Ethernet Stats(RFC1643) - XML Reply with quote

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



rfc1643.png
 Description:
One data/graph template for all OID's - example.
 Filesize:  13.23 KB
 Viewed:  40683 Time(s)

rfc1643.png



rfc1643.xml
 Description:
XML-File for SNMP(indexed)

Download
 Filename:  rfc1643.xml
 Filesize:  3.45 KB
 Downloaded:  4394 Time(s)

Back to top
Pumpi
Cacti User


Joined: 14 Jan 2004
Posts: 256
Location: Germany

PostPosted: Fri Apr 23, 2004 3:32 am    Post subject: Reply with quote

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
Back to top
k.c.o.r.e



Joined: 18 Apr 2004
Posts: 6

PostPosted: Fri Apr 23, 2004 7:13 am    Post subject: Ethernet Stats(RFC1643) - XML Reply with quote

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



templates_rfc1643.tar
 Description:
data/graph templates & data query in xml.

Download
 Filename:  templates_rfc1643.tar
 Filesize:  100 KB
 Downloaded:  3107 Time(s)

Back to top
ethorn



Joined: 20 Apr 2004
Posts: 4
Location: Atlanta

PostPosted: Fri Apr 23, 2004 8:21 am    Post subject: error with query Reply with quote

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?
Back to top
k.c.o.r.e



Joined: 18 Apr 2004
Posts: 6

PostPosted: Fri Apr 23, 2004 9:14 am    Post subject: Ethernet Stats(RFC1643) - XML Reply with quote

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
Back to top
Guest






PostPosted: Tue Apr 27, 2004 3:33 am    Post subject: Reply with quote

XML parse error on the last 3 ...
Back to top
k.c.o.r.e



Joined: 18 Apr 2004
Posts: 6

PostPosted: Tue Apr 27, 2004 4:07 am    Post subject: Ethernet Stats(RFC1643) - XML Reply with quote

Which cacti version is installed on your machine?
Back to top
Guest






PostPosted: Tue Apr 27, 2004 4:10 am    Post subject: Reply with quote

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
Back to top
websi



Joined: 21 Apr 2004
Posts: 34

PostPosted: Tue Apr 27, 2004 4:16 am    Post subject: Reply with quote

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...
Back to top
websi



Joined: 21 Apr 2004
Posts: 34

PostPosted: Tue Apr 27, 2004 4:16 am    Post subject: Reply with quote

Guest = Websi
Back to top
Zap
Guest





PostPosted: Wed Apr 28, 2004 6:37 pm    Post subject: Reply with quote

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
Back to top
Guest






PostPosted: Thu Apr 29, 2004 7:27 am    Post subject: Reply with quote

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???

Thanks
Back to top
k.c.o.r.e



Joined: 18 Apr 2004
Posts: 6

PostPosted: Mon May 03, 2004 9:05 am    Post subject: Ethernet Stats(RFC1643) - XML Reply with quote

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
Back to top
egarnel
Cacti Pro User


Joined: 21 Nov 2002
Posts: 679
Location: Austin, TX

PostPosted: Mon May 03, 2004 9:17 am    Post subject: from a 2950 running 12.1.9 Reply with quote

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
Back to top
k.c.o.r.e



Joined: 18 Apr 2004
Posts: 6

PostPosted: Mon May 03, 2004 1:53 pm    Post subject: Ethernet Stats(RFC1643) - XML Reply with quote

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
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates All times are GMT - 5 Hours
Goto page 1, 2, 3, 4  Next
Page 1 of 4

 



Powered by phpBB © 2001, 2005 phpBB Group