Juniper COS statistics - help needed
Moderators: Developers, Moderators
-
- Posts: 10
- Joined: Fri Sep 21, 2007 1:38 am
- Location: GR
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.
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.
-
- Posts: 10
- Joined: Fri Sep 21, 2007 1:38 am
- Location: GR
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.
i must be missing lot of things!
i dont know if anyone can help.
- Attachments
-
- cacti_graph_template_juniper_cos.xml
- (20.73 KiB) Downloaded 1809 times
-
- juniper_COS.xml
- (843 Bytes) Downloaded 1735 times
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.
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.
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.
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.
- Attachments
-
- Example-Juniper-MIB.xml
- (1.32 KiB) Downloaded 1360 times
-
- Posts: 10
- Joined: Fri Sep 21, 2007 1:38 am
- Location: GR
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.
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.
- Attachments
-
- cacti_graph_template_juniper_cos.xml
- (20.73 KiB) Downloaded 1122 times
-
- Posts: 10
- Joined: Fri Sep 21, 2007 1:38 am
- Location: GR
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
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
- Attachments
-
- cos_datatemplate.JPG (145.79 KiB) Viewed 29107 times
-
- cos_graphtemplate.JPG (151.04 KiB) Viewed 29107 times
Post the verbose query of the xml file you've created, from within Cacti. Does it properly enumerate all the data you're after?
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
i think cos should be deepley realated to qos.
see the code: http://forums.cacti.net/viewtopic.php?t ... uniper+qos
see the code: http://forums.cacti.net/viewtopic.php?t ... uniper+qos
-
- Posts: 10
- Joined: Fri Sep 21, 2007 1:38 am
- Location: GR
here is the debug and the .xml file.
Please give me your help in how i can fix the .xml
thanks
Please give me your help in how i can fix the .xml
thanks
- Attachments
-
- debug.JPG (95.86 KiB) Viewed 28899 times
-
- graph_.JPG (50.02 KiB) Viewed 28899 times
-
- juniper_COS.xml
- (901 Bytes) Downloaded 776 times
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...
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....
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: Select all
OID tree (.9 = jnxCosQstatTxedBytes):
SNMPv2-SMI::enterprises.2636.3.15.4.1.9.<ifIndex>.<CoS Class>
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:
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?
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: Select all
<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>
.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?
- Attachments
-
- Picture3.png (59.13 KiB) Viewed 28212 times
Who is online
Users browsing this forum: No registered users and 4 guests