device template for ruijie switch

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

Moderators: Developers, Moderators

Post Reply
hendranata
Posts: 9
Joined: Thu Feb 06, 2020 5:18 am

device template for ruijie switch

Post by hendranata »

device template for ruijie switch
does anyone having that?
we face vlan issue, cant draw graph for specific vlan.. meanwhile we can draw graph for port and aggregate.

if u have ruijie device template would be good i guess

thanks.
ddunlap123
Posts: 28
Joined: Fri May 15, 2015 7:08 pm

Re: device template for ruijie switch

Post by ddunlap123 »

I don't personally have a Ruijie switch but have you tested basic Mib-2 interfaces query to see if anything is returned?

An example of this would be:
snmpwalk -c CNELAB -v2c 192.168.70.2 interfaces

You'd normally see the vlan interfaces (ours are vlan 15, 20, 25, etc.):
IF-MIB::ifNumber.0 = INTEGER: 64
IF-MIB::ifIndex.1 = INTEGER: 1
IF-MIB::ifIndex.7 = INTEGER: 7
IF-MIB::ifIndex.15 = INTEGER: 15
IF-MIB::ifIndex.20 = INTEGER: 20
IF-MIB::ifIndex.25 = INTEGER: 25
IF-MIB::ifIndex.30 = INTEGER: 30
IF-MIB::ifIndex.35 = INTEGER: 35
IF-MIB::ifIndex.40 = INTEGER: 40

and counters:
IF-MIB::ifOutOctets.1 = Counter32: 29269614
IF-MIB::ifOutOctets.7 = Counter32: 448
IF-MIB::ifOutOctets.15 = Counter32: 448
IF-MIB::ifOutOctets.20 = Counter32: 1664
IF-MIB::ifOutOctets.25 = Counter32: 1664
IF-MIB::ifOutOctets.30 = Counter32: 5862016
IF-MIB::ifOutOctets.35 = Counter32: 1664
IF-MIB::ifOutOctets.40 = Counter32: 448
hendranata
Posts: 9
Joined: Thu Feb 06, 2020 5:18 am

Re: device template for ruijie switch

Post by hendranata »

IF-MIB::ifIndex.4167 = INTEGER: 4167
IF-MIB::ifIndex.4168 = INTEGER: 4168

IF-MIB::ifOutOctets.4167 = Counter32: 0
IF-MIB::ifOutOctets.4168 = Counter32: 0


that is vlan 71 and 72.
so what next?
ddunlap123
Posts: 28
Joined: Fri May 15, 2015 7:08 pm

Re: device template for ruijie switch

Post by ddunlap123 »

You see how your values are 0:
IF-MIB::ifOutOctets.4167 = Counter32: 0
IF-MIB::ifOutOctets.4168 = Counter32: 0
whereas mine are incrementing?
IF-MIB::ifOutOctets.15 = Counter32: 448
IF-MIB::ifOutOctets.20 = Counter32: 1664

ifOutOctets is 1.3.6.1.2.1.2.2.1.16.
If that returns values for physical interfaces but not for vlan interfaces on your Ruijie switch, then Cacti graph will be flat.

You could check with the vendor to see why no results are returned.

It looks like there's a list of mibs that Ruijie switches support at:
http://www.mibdepot.com/cgi-bin/vendor_ ... i?r=ruijie

In addition to the RFC 1213 support (1.3.6.1.2.1.2.2.1.16), it lists a VLAN mib. But reading the VLAN mix, I don't see anything about traffic counters.
And there's the interface mib:
http://www.mibdepot.com/cgi-bin/vendor_ ... i?r=ruijie

Basically if the switch isn't populating any queryable value in snmp, then this is a switch problem, not a Cacti problem.
Make sense?
hendranata
Posts: 9
Joined: Thu Feb 06, 2020 5:18 am

Re: device template for ruijie switch

Post by hendranata »

So we need to change interface.xml with other ifOutOctets ?
I dont understand what is 1.3.6.1.2.1.2.2.1.16
Should we change to other value? Sorry nubie.

I also see that the table show for snmp v1.
In this case i enable snmp v2.

Any idea? Am i set wrong snmp version?
ddunlap123
Posts: 28
Joined: Fri May 15, 2015 7:08 pm

Re: device template for ruijie switch

Post by ddunlap123 »

I'm thinking how to draw a comparison here.
It's like if you have thermostats in your house to see the temperature and one of the thermostats is broken and always shows 0 degrees temperature that is a problem.

If the broken thermostat is cloud-monitored, the cloud will always show it is 0 degrees in your house.

If the cloud monitored a working thermostat, the cloud would show accurate information.

Cacti is the cloud.
The thermostats in your house are the mibs - "management information base" in snmp speak.

You need to read through the Ruijie switch mib list to see if there are any mib variables (the OIDs are always represented by dotted decimal like 1.3.5.1.2 is {iso(1) identified-organization(3) dod(6) internet(1) mgmt(2) mib-2(1)} in a tree) which count the octets of traffic on the vlan. Once you've determined what OID shows the information then you tell Cacti to query it.

Resources for snmp are Stallings (https://www.amazon.com/Snmp-Snmpv2-Snmp ... 0201485346) and for Cacti, Thomas Urban (https://www.amazon.com/Cacti-Beginners- ... 1849513929).

Good luck with your switches!
hendranata
Posts: 9
Joined: Thu Feb 06, 2020 5:18 am

Re: device template for ruijie switch

Post by hendranata »

ddunlap123 wrote: Tue Oct 11, 2022 11:21 am I'm thinking how to draw a comparison here.
It's like if you have thermostats in your house to see the temperature and one of the thermostats is broken and always shows 0 degrees temperature that is a problem.

If the broken thermostat is cloud-monitored, the cloud will always show it is 0 degrees in your house.

If the cloud monitored a working thermostat, the cloud would show accurate information.

Cacti is the cloud.
The thermostats in your house are the mibs - "management information base" in snmp speak.

You need to read through the Ruijie switch mib list to see if there are any mib variables (the OIDs are always represented by dotted decimal like 1.3.5.1.2 is {iso(1) identified-organization(3) dod(6) internet(1) mgmt(2) mib-2(1)} in a tree) which count the octets of traffic on the vlan. Once you've determined what OID shows the information then you tell Cacti to query it.

Resources for snmp are Stallings (https://www.amazon.com/Snmp-Snmpv2-Snmp ... 0201485346) and for Cacti, Thomas Urban (https://www.amazon.com/Cacti-Beginners- ... 1849513929).

Good luck with your switches!
so in this case ruijie switch, which OID that suit with ruijie switch? ifOutOctets 1.3.6.1.2.1.2.2.1.16 ??
if using that..how do we change in order cacti to query using that OID ?

i can see RFC1213-MIB is using v1.. not v2.. so do we need to enable snmp v1? not v2 ?

also in interface.xml i can see:

<ifHCOutOctets>
<name>Bytes Out - 64-bit Counters</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.2.1.31.1.1.1.10</oid>
</ifHCOutOctets>

<ifOutOctets>
<name>Bytes Out</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.2.1.2.2.1.16</oid>
</ifOutOctets>

i cant see ifHCOutOctets value in result snmpwalk...
ddunlap123
Posts: 28
Joined: Fri May 15, 2015 7:08 pm

Re: device template for ruijie switch

Post by ddunlap123 »

In results of your snmpwalk query, you showed that the Ruijie switch returned "0" for ifOutOctets (1.3.6.1.2.1.2.2.1.16).
IF-MIB::ifOutOctets.4167 = Counter32: 0. << zero
IF-MIB::ifOutOctets.4168 = Counter32: 0 << zero

So if the vlan was up and traffic flowing on it, there would be no point in querying ifOutOctets because it would always be "0", right?

Have you asked the Ruijie switch peopled why ifOutOctets is 0?
Or if there is a different mib variable that you can query for vlan traffic?
You could do an snmpwalk then grep for "Counter" if you don't want to read mibs but...

It is snmp v2 but that would not make a difference here...
hendranata
Posts: 9
Joined: Thu Feb 06, 2020 5:18 am

Re: device template for ruijie switch

Post by hendranata »

ddunlap123 wrote: Tue Oct 11, 2022 7:43 pm In results of your snmpwalk query, you showed that the Ruijie switch returned "0" for ifOutOctets (1.3.6.1.2.1.2.2.1.16).
IF-MIB::ifOutOctets.4167 = Counter32: 0. << zero
IF-MIB::ifOutOctets.4168 = Counter32: 0 << zero

So if the vlan was up and traffic flowing on it, there would be no point in querying ifOutOctets because it would always be "0", right?

Have you asked the Ruijie switch peopled why ifOutOctets is 0?
Or if there is a different mib variable that you can query for vlan traffic?
You could do an snmpwalk then grep for "Counter" if you don't want to read mibs but...

It is snmp v2 but that would not make a difference here...
here is example our ruijie:

IF-MIB::ifOutOctets.112 = Counter32: 68112222
IF-MIB::ifOutOctets.113 = Counter32: 558367035
IF-MIB::ifOutOctets.114 = Counter32: 82081087
IF-MIB::ifOutOctets.115 = Counter32: 1100806086
IF-MIB::ifOutOctets.4096 = Counter32: 0
IF-MIB::ifOutOctets.4165 = Counter32: 0
IF-MIB::ifOutOctets.4166 = Counter32: 0
IF-MIB::ifOutOctets.4167 = Counter32: 0
IF-MIB::ifOutOctets.4168 = Counter32: 0

vlan start from 4096 .....
interface start from 1-115

i am not sure why

if i found the correct mib.. then how to change that? change under interface.xml ?
Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests