How to solve the error “Unknown Object Identifier (Index out of range: XXX (ifIndex))”

Once I made a Zabbix template for drawing traffic graphs from GPON ports on Huawei SmartAX MA5683T.

From Linux, I looked at the interface indexes with the command:

Continue reading “How to solve the error “Unknown Object Identifier (Index out of range: XXX (ifIndex))””

Configuring SNMP Traps on D-Link Switches

I will give an example of setting up SNMP Traps sending on D-Link switches.
For example, I will take the switches D-Link DES-3200-x:

Create an SNMP password:

create snmp community public view CommunityView read_only

We indicate which host and with which password the traps should be sent:

create snmp host x.x.x.x v2c public

We indicate the change in the state of which ports to send traps:

config snmp link_traps ports 01-24 disable
config snmp link_traps ports 25-26 enable

Check the configuration of sending snmp traps with the command:

show snmp traps

Check the configuration of sending snmp traps on the status of ports with the command:

show snmp traps link_traps

At the end of the command, you can digitize port numbers.

See also my article:
Installing and using Net-SNMP

OID and MIB list for Arris Cadant C3

I’ll list a few oid below and briefly describe them.
Check the response to oid and mib in linux for example with the following command:

snmpwalk -v 2c -c public 192.168.0.10 .1.3.6.1.4.1.4115.1.4.3.1.1.1.1.6

Connected modems (dcxUsStatsRegComplete) .1.3.6.1.4.1.4115.1.4.3.1.1.1.1.6

Upstream Indexes: .1.3.6.1.4.1.4115.1.4.3.1.1.1.1.8
Network Interface Status .1.3.6.1.2.1.2.2.1.8
Description of network interfaces .1.3.6.1.2.1.2.2.1.2
Network Interface Name .1.3.6.1.2.1.31.1.1.1.1

SignalNoise upstream (docsIfSigQSignalNoise) .1.3.6.1.2.1.10.127.1.1.4.1.5
SignalNoiseSNR upstream (docsIfSigQSignalNoiseSNR) .1.3.6.1.4.1.4115.1.4.3.6.1.3.1.21

Mibs for upstream power-level:
.1.3.6.1.4.1.4115.1.4.3.6.1.3.1.8.11
.1.3.6.1.4.1.4115.1.4.3.6.1.3.1.8.12
.1.3.6.1.4.1.4115.1.4.3.6.1.3.1.8.13
.1.3.6.1.4.1.4115.1.4.3.6.1.3.1.8.14
.1.3.6.1.4.1.4115.1.4.3.6.1.3.1.8.15
.1.3.6.1.4.1.4115.1.4.3.6.1.3.1.8.16

Number of modems on the upstream:
.1.3.6.1.4.1.4998.1.1.20.2.12.1.6.downstreamid.upstreamid

(dcxUsStatsOther) .1.3.6.1.4.1.4115.1.4.3.1.1.1.1.1
(dcxUsStatsRanging) .1.3.6.1.4.1.4115.1.4.3.1.1.1.1.2
(dcxUsStatsRngAborted) .1.3.6.1.4.1.4115.1.4.3.1.1.1.1.3
(dcxUsStatsRngComplete) .1.3.6.1.4.1.4115.1.4.3.1.1.1.1.4
(dcxUsStatsIpComplete) .1.3.6.1.4.1.4115.1.4.3.1.1.1.1.5
(dcxUsStatsAccessDenied) .1.3.6.1.4.1.4115.1.4.3.1.1.1.1.7

(UpstreamNum) .1.3.6.1.2.1.10.127.1.3.11.1.1
(dcxUsStatsAvgUtil) .1.3.6.1.4.1.4115.1.4.3.1.1.1.1.12
(dcxUsStatsAvgContSlots) .1.3.6.1.4.1.4115.1.4.3.1.1.1.1.13
(docsIfSigQUnerroreds) .1.3.6.1.2.1.10.127.1.1.4.1.2
(docsIfSigQCorrecteds) .1.3.6.1.2.1.10.127.1.1.4.1.3
(docsIfSigQUncorrectables) .1.3.6.1.2.1.10.127.1.1.4.1.4
(dcxUsStatsNumActiveUGS) .1.3.6.1.4.1.4115.1.4.3.1.1.1.1.9
(dcxUsStatsAvgUGSLastOneHour) .1.3.6.1.4.1.4115.1.4.3.1.1.1.1.10
(dcxUsStatsMaxUGSLastFiveMins) .1.3.6.1.4.1.4115.1.4.3.1.1.1.1.11

See also:
SNMP OID and MIB for interfaces

Configuring low-level discovery in Zabbix

Low-level discovery allows you to automatically create data items, triggers, graphics.
Massively it is better not to use it, since in practice it noticed that it gives a significant load on the system.

Here is an example of the discovery configuration for viewing the port load of the managed switch.
To start, open the “Settings” – “Templates“, create a new template, or click “Discovery“.
Click “Create rule” and fill out the main parameters:

Continue reading “Configuring low-level discovery in Zabbix”

Installing and Configuring SNMPD + MRTG

MRTG (Multi Router Traffic Grapher) – a tool for displaying various data in graphs.

The installation command in Ubuntu/Debian:

sudo apt-get install mrtg snmp snmpd

In CentOS:

yum install mrtg net-snmp net-snmp-utils

The command below can tell you which additional modules are in the repository:

apt-cache search mrtg

Open the configuration file /etc/snmp/snmpd.conf

sudo nano /etc/snmp/snmpd.conf

Comment on the line:

com2sec paranoid default public

And uncomment the line:

com2sec readonly default public

Restart snmpd so that changes to the configuration file take effect:

sudo /etc/init.d/snmpd restart

You can check snmp by commands:

netstat -nlp | grep snmpd
snmpwalk -v2с -c public localhost

Beginners can generate a simple configuration file with the command:

sudo cfgmaker public@localhost >> /etc/mrtg.cfg

where public is the name of the community (the password is in other words), and localhost is the host address or ip.

Example of starting the configuration file /etc/mrtg.cfg:

WorkDir: /var/www/mrtg
Options[_]: growright, bits, nobanner
Background[_]: #B0C4DE
EnableIPv6: no
Language: russian
EnableSnmpV3: no
Interval: 10
Refresh: 600
Include: /etc/mrtg/server1.cfg
Include: /etc/mrtg/server2.cfg

Create the working directory:

sudo mkdir /var/www/mrtg

Then you must write or generate the index.html file with the command:

sudo indexmaker /etc/mrtg.cfg > /var/www/mrtg/index.html

We look at the log /var/log/mrtg.log so that there are no errors.

Here is an example of setting up SNMP on D-Link switches:

private CommunityView Read Write
public CommunityView Read Only

Example of a manual start script (mrtg.sh):

#!/bin/bash
#run mrtg
LANG=C
export $LANG
/usr/bin/mrtg /etc/mrtg.cfg --logging /var/log/mrtg.log