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 .

Connected modems (dcxUsStatsRegComplete) .

Upstream Indexes: .
Network Interface Status .
Description of network interfaces .
Network Interface Name .

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

Mibs for upstream power-level:

Number of modems on the upstream:

(dcxUsStatsOther) .
(dcxUsStatsRanging) .
(dcxUsStatsRngAborted) .
(dcxUsStatsRngComplete) .
(dcxUsStatsIpComplete) .
(dcxUsStatsAccessDenied) .

(UpstreamNum) .
(dcxUsStatsAvgUtil) .
(dcxUsStatsAvgContSlots) .
(docsIfSigQUnerroreds) .
(docsIfSigQCorrecteds) .
(docsIfSigQUncorrectables) .
(dcxUsStatsNumActiveUGS) .
(dcxUsStatsAvgUGSLastOneHour) .
(dcxUsStatsMaxUGSLastFiveMins) .

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 (

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