|
|
| Author |
Message |
fratzeskos
Joined: 21 Sep 2007 Posts: 9 Location: GR
|
Posted: Tue Nov 20, 2007 4:22 am Post subject: Juniper COS statistics - help needed |
|
|
Hi all,
I need a little help here.
I want to graph the jnxCosIfqTxedBytes
The OID for this is: 1.3.6.1.4.1.2636.3.15.1.1.9
If I walk this OID from CLI, I get back four results for each interface.
1: jnxCosIfqTxedBytes.22.11.98.101.115.116.45.101.102.102.111.114.116 (counter64) 154575730545
2: jnxCosIfqTxedBytes.22.15.110.101.116.119.111.114.107.45.99.111.110.116.114.111.108 (counter64) 16873826042
3: jnxCosIfqTxedBytes.22.18.97.115.115.117.114.101.100.45.102.111.114.119.97.114.100.105.110.103 (counter64) 0
4: jnxCosIfqTxedBytes.22.20.101.120.112.101.100.105.116.101.100.45.102.111.114.119.97.114.100.105.110.103 (counter64) 0
I want to make a data query that I can add in every router from the devices menu.
That data query has to print me back all the interfaces of the router (as if I was polling the main OID: 1.3.6.1.4.1.2636.3.15.1.1.9), I want then to be able to select the interfaces I need and graph the four results in one graph.
The hard part for me is to make the .XML file that will do the main job. Can someone give me directions for that?
Sorry for my bad English. If you need more info please ask.
|
|
| Back to top |
|
 |
fratzeskos
Joined: 21 Sep 2007 Posts: 9 Location: GR
|
Posted: Tue Nov 20, 2007 7:20 am Post subject: |
|
|
Here is the XML file with the snmpwalk information and the XML from the graph template..
i must be missing lot of things!
i dont know if anyone can help.
| Description: |
|
 Download |
| Filename: |
juniper_COS.xml |
| Filesize: |
843 Bytes |
| Downloaded: |
174 Time(s) |
| Description: |
|
 Download |
| Filename: |
cacti_graph_template_juniper_cos.xml |
| Filesize: |
20.73 KB |
| Downloaded: |
146 Time(s) |
|
|
| Back to top |
|
 |
Tybio Cacti User
Joined: 16 Feb 2006 Posts: 79
|
Posted: Tue Nov 20, 2007 9:10 am Post subject: |
|
|
Ok, few bits of advice when working with Junipers. Be VERY SURE that you have the MIB being loaded....those strings represent the "Names" of the COS levels...here is what mine look like:
JUNIPER-COS-MIB::jnxCosIfqTxedBytes.101."best-effort" = Counter64: 1764626886793836
JUNIPER-COS-MIB::jnxCosIfqTxedBytes.101."network-control" = Counter64: 2616771586866
JUNIPER-COS-MIB::jnxCosIfqTxedBytes.101."assured-forwarding" = Counter64: 0
JUNIPER-COS-MIB::jnxCosIfqTxedBytes.101."expedited-forwarding" = Counter64: 0
My guess is that "101" is the ifIndex, but I don't have time to dig for that right now . So, that means that your "Index" for the snmp walk is everything after 1.3.6.1.4.1.2636.3.15.1.1.9 is the index. Let me do some walking and see what I come up with.
|
|
| Back to top |
|
 |
Tybio Cacti User
Joined: 16 Feb 2006 Posts: 79
|
Posted: Tue Nov 20, 2007 9:14 am Post subject: |
|
|
Yep, ok..here is an example XML for Juniper routers for something similar. This one returns the MPLS LSP Names and lets you graph inOctets and RSVP Reservation. But if you look at the top for the index lines you will see that it says "Take everything after the 27th character and make it the Index." Which is exactly what you need, just change the base OID and add in the proper Input and Output sections.
Again, I can't stress how vital it is to be sure that php is loading your SNMP MIBs with Juniper routers. You can ask the people around here, I fought for months to get this going and had it correct the /whole/ time. Without the MIB however, Cacti had no idea how to parse the Juniper MIB so it was always failing and returning "HEX" rather then text.
| Description: |
|
 Download |
| Filename: |
Example-Juniper-MIB.xml |
| Filesize: |
1.32 KB |
| Downloaded: |
175 Time(s) |
|
|
| Back to top |
|
 |
fratzeskos
Joined: 21 Sep 2007 Posts: 9 Location: GR
|
Posted: Tue Nov 20, 2007 1:23 pm Post subject: |
|
|
Hi Tybio,
that will be really useful, i will try it tomorrow though.
Thank you very very much
i will let you know about the results.
|
|
| Back to top |
|
 |
mcanales
Joined: 25 Jan 2008 Posts: 1
|
Posted: Mon Jan 28, 2008 12:03 pm Post subject: |
|
|
Hi,
who work with routers juniper M40 with COS and has deployment the scripts correct for monitoring interfaces with CaCti??
I charge the template cacti_graph_template_juniper_cos.xml and I get the following error:
Error: XML: Hash version does not exist.
my version of cacti is 0.8.6h
Greetings.
| Description: |
|
 Download |
| Filename: |
cacti_graph_template_juniper_cos.xml |
| Filesize: |
20.73 KB |
| Downloaded: |
97 Time(s) |
|
|
| Back to top |
|
 |
fratzeskos
Joined: 21 Sep 2007 Posts: 9 Location: GR
|
Posted: Wed Feb 27, 2008 11:40 am Post subject: |
|
|
I am coming back to this because I still haven’t found the solution and it is taking me so much time and resources to make 4 different graphs for each interface.
Lets take things from the begging:.
I want to take COS statistics from juniper routers.
The OID is:
1.3.6.1.4.1.2636.3.15.4.1.9.0
When I poll the router with this OID I get back smth like this:
1: jnxCosQstatTxedBytes.50.0 (counter64) 348422381542486
2: jnxCosQstatTxedBytes.50.1 (counter64) 1044388029519
3: jnxCosQstatTxedBytes.50.2 (counter64) 2209
4: jnxCosQstatTxedBytes.50.3 (counter64) 2701484254
5: jnxCosQstatTxedBytes.51.0 (counter64) 143901361389
6: jnxCosQstatTxedBytes.51.1 (counter64) 106060531305
7: jnxCosQstatTxedBytes.51.2 (counter64) 0
8: jnxCosQstatTxedBytes.51.3 (counter64) 1702559624
9: jnxCosQstatTxedBytes.52.0 (counter64) 320206697206108
10: jnxCosQstatTxedBytes.52.1 (counter64) 1520259812400
11: jnxCosQstatTxedBytes.52.2 (counter64) 1295
12: jnxCosQstatTxedBytes.52.3 (counter64) 90766195
13: jnxCosQstatTxedBytes.53.0 (counter64) 2042613757011
14: jnxCosQstatTxedBytes.53.1 (counter64) 852665693457
15: jnxCosQstatTxedBytes.53.2 (counter64) 16026900664
16: jnxCosQstatTxedBytes.53.3 (counter64) 6191834338
17: jnxCosQstatTxedBytes.54.0 (counter64) 234990
18: jnxCosQstatTxedBytes.54.1 (counter64) 1038802498824
19: jnxCosQstatTxedBytes.54.2 (counter64) 85334
20: jnxCosQstatTxedBytes.54.3 (counter64) 0
50,51,52 etc is the index number of the interface
I want to have in the same graph the four results of each interface.
Each result is explained like this:
BestEffort
1.3.6.1.4.1.2636.3.15.4.1.9.x.0
EF
1.3.6.1.4.1.2636.3.15.4.1.9.x.1
AF
1.3.6.1.4.1.2636.3.15.4.1.9.x.2
NetworkControl
1.3.6.1.4.1.2636.3.15.4.1.9.x.3
Where x is the interface index.
The steps that I follow are:
a) make a data template with four data source items
b) make a graph template for the four data sources.
c) Trying to write the .xml file that will give me back all the info I need
Till now I had no luck with the xml file. I have no idea how to make it work.
So, please give me some hints and ideas.
Thank you all
| Description: |
|
| Filesize: |
151.04 KB |
| Viewed: |
3819 Time(s) |

|
| Description: |
|
| Filesize: |
145.79 KB |
| Viewed: |
3819 Time(s) |

|
|
|
| Back to top |
|
 |
fratzeskos
Joined: 21 Sep 2007 Posts: 9 Location: GR
|
Posted: Fri Feb 29, 2008 2:27 am Post subject: |
|
|
no ideas ?
|
|
| Back to top |
|
 |
BSOD2600 Cacti Moderator
Joined: 08 May 2004 Posts: 6769 Location: WA, USA
|
Posted: Fri Feb 29, 2008 4:13 am Post subject: |
|
|
| Post the verbose query of the xml file you've created, from within Cacti. Does it properly enumerate all the data you're after?
|
|
| Back to top |
|
 |
johnrembo Cacti User
Joined: 24 Apr 2006 Posts: 198
|
|
| Back to top |
|
 |
fratzeskos
Joined: 21 Sep 2007 Posts: 9 Location: GR
|
Posted: Mon Mar 03, 2008 8:33 am Post subject: |
|
|
here is the debug and the .xml file.
Please give me your help in how i can fix the .xml
thanks
| Description: |
|
| Filesize: |
50.02 KB |
| Viewed: |
3611 Time(s) |

|
| Description: |
|
| Filesize: |
95.86 KB |
| Viewed: |
3611 Time(s) |

|
| Description: |
|
 Download |
| Filename: |
juniper_COS.xml |
| Filesize: |
901 Bytes |
| Downloaded: |
90 Time(s) |
|
|
| Back to top |
|
 |
hipster
Joined: 16 Mar 2006 Posts: 16
|
Posted: Sat Apr 19, 2008 3:52 am Post subject: |
|
|
| Did you ever got this working?
|
|
| Back to top |
|
 |
hipster
Joined: 16 Mar 2006 Posts: 16
|
Posted: Sun Apr 20, 2008 3:15 am Post subject: |
|
|
I have managed to create graphs for Cos classes per interface(Hard coded Data query per interface).
E.g.
Graph 1 Ge0 Best Effort:
- jnxCosQstatQedBytes
- jnxCosQstatTxedBytes
- jnxCosQstatTailDropPkts
- jnxCosQstatTotalRedDropPkts
Graph 2 Ge1 Less than Best Effort:
- jnxCosQstatQedBytes
- jnxCosQstatTxedBytes
- jnxCosQstatTailDropPkts
- jnxCosQstatTotalRedDropPkts
Graph 3 Ge2 Penalty class:
- jnxCosQstatQedBytes
- jnxCosQstatTxedBytes
- jnxCosQstatTailDropPkts
- jnxCosQstatTotalRedDropPkts
That works just fine but....
I would like to graph like this:
Graph 1 Ge0 jnxCosQstatTxedBytes:
- Best Effort
- Less than best effort
- Penalty Class
Graph 2 Ge1 jnxCosQstatTxedBytes:
- Best Effort
- Less than best effort
- Penalty Class
Graph 3 Ge3 jnxCosQstatTxedBytes:
- Best Effort
- Less than best effort
- Penalty Class
The problem that I need to solve is...
| Code: |
OID tree (.9 = jnxCosQstatTxedBytes):
SNMPv2-SMI::enterprises.2636.3.15.4.1.9.<ifIndex>.<CoS Class>
|
Is it possible to parse MIB as array and use the results to combine results for graph per interface for each CoS Class??? Otherwise I would have to have graphs: (Interface X Cos Class) = 4 X 4 = 16 pcs. My goal is to have only graph per interface = 4 pcs....
|
|
| Back to top |
|
 |
gandalf Developer
Joined: 02 Dec 2004 Posts: 12186 Location: Muenster, Germany
|
Posted: Sun Apr 20, 2008 2:12 pm Post subject: |
|
|
If there is any SNMP table that includes the indices like you indicated, an SNMP Data Query would be fine. Else, a Script Data Query should fill the gap. Read about both at the first link of my sig (one of the Advanced Chapters)
Reinhard
|
|
| Back to top |
|
 |
hipster
Joined: 16 Mar 2006 Posts: 16
|
Posted: Wed Apr 23, 2008 11:08 am Post subject: |
|
|
Hi,
Thank you Gandalf for the great manual. I must be too incompetent to figure out how to do that all.
I was not able to graph as I wanted to: CoS classes per interface.
Instead I hard coded primary interface OIDs and took the easiest way... Now I have graphs for each CoS class. If anyone is interested in XML file. let me know. (pic attached)
Back to the problem itself. I figured that if based graphs require same kind of indexin as the default interface data query:
| Code: | <interface>
<name>Get Juniper Interfaces for CoS Reporting</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> |
After that I tried to figure out how to append OID <oid>.1.3.6.1.4.1.2636.3.15.4.1.9</oid> which should eventually end up been like this:
.1.3.6.1.4.1.2636.3.15.4.1.9.<ifIndex as result from oid_index>.<Cos Class index>
<Cos Class index> could be snmpwalked e.g. from .1.3.6.1.4.1.2636.3.15.3.1.2
is there a way to first use <oid_index> to get ifIdex, them get the cos class index from .1.3.6.1.4.1.2636.3.15.3.1.2 and finally concatenate these for data query?
| Description: |
|
| Filesize: |
59.13 KB |
| Viewed: |
2924 Time(s) |

|
|
|
| Back to top |
|
 |
|