The SNMP category allows you to read out the SNMP values of objects and display them in realtime. Using the example scenario of querying a switch we will discuss the requirements and execution in this article.


i-doit requires the SNMP module of PHP in order to use this category. In Debian you can install the module with the following command:

sudo apt-get install php5-snmp

Afterwards, you have to assign the SNMP category to the desired object type in the Quick Configuration Wizard. In our example we only used the Switch object type.

Furthermore, we need a valid host address which in turn needs to be documented in the respective category of course.

In order to avoid failed attempts we test the SNMP connection "manually" by accessing the console of the server via SSH. For this purpose, we install the "snmp" package in order to be provided with the "snmpwalk" command. Afterwards, we use a standard call of the switch which will supply us with the list of all interfaces.

sudo apt-get install snmpsnmpwalk -v 2c -c public .

At this point we omit the details on the subject of SNMP and this call. Information about the OID . can be found here for example:

In our case the results look like this:

iso. = INTEGER: 1

iso. = INTEGER: 2

iso. = INTEGER: 3

iso. = INTEGER: 4

iso. = INTEGER: 5

iso. = INTEGER: 6

iso. = INTEGER: 7

iso. = INTEGER: 8

iso. = INTEGER: 9

iso. = INTEGER: 10

iso. = INTEGER: 11

iso. = INTEGER: 12

iso. = INTEGER: 13

iso. = INTEGER: 14

iso. = INTEGER: 15

iso. = INTEGER: 16

iso. = INTEGER: 17

iso. = INTEGER: 18

iso. = INTEGER: 19

iso. = INTEGER: 20

iso. = INTEGER: 21

iso. = INTEGER: 22

iso. = INTEGER: 23

iso. = INTEGER: 24

The query was successful and we are dealing with a 24port switch. If timeouts or similar issues arise at this point, you should check the network connectivity to verify whether SNMP is allowed under the firewall rules, the SNMP server is running and whether the i-doit server has access permissions for the SNMP server. Of course also the selected SNMP community (in our example public) has to be available.

Now we switch back to the SNMP category in i-doit. The primary IP address of the switch is automatically shown there and the standard SNMP community public is offered.

Since we are not interested in the interface indices, we will concern ourselves with the OID for the list of faulty packets per interface. This has the OID ., where x stands for the index of the respective interface.

With these details we build 24 entries for the corresponding interfaces:

Afterwards, we save the category.


In the command line example the OIDs are shown with a dot. This is not necessary in the SNMP category and is therefore optional.

When you click on the category again, the SNMP values are loaded and displayed in realtime. Unfortunately, the test shows that there are packet errors in two interfaces. Therefore we conclude the practical example at this point and begin to search for the reason of the packet errors.