Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This appears to be because it's reading /proc/$PID/stat and simply splitting on space and then grabbing the third element,
which would normally be the process status, but when the process name contains a space, this is no longer true.


Code Block
NMIS# systemctl status omkd
● omkd.service - Opmantek Webserver
   Loaded: loaded (/etc/systemd/system/omkd.service; enabled; vendor preset: disabled)
   Active: active (running) since Thu 2020-09-24 11:02:54 UTC; 10h ago
 Main PID: 3137 (opmantek.pl web)
   CGroup: /system.slice/omkd.service
           ├─3137 opmantek.pl webserver                                                        -f -p /var/run/opmantek.exe.pid -r
           ├─3253 opmantek.pl webserver                                                        -f -p /var/run/opmantek.exe.pid -r
           ├─3254 opmantek.pl webserver                                                        -f -p /var/run/opmantek.exe.pid -r
           ├─3255 opmantek.pl webserver                                                        -f -p /var/run/opmantek.exe.pid -r
           ├─3256 opmantek.pl webserver                                                        -f -p /var/run/opmantek.exe.pid -r
           └─3257 opmantek.pl webserver                                                        -f -p /var/run/opmantek.exe.pid -r

Sep 24 11:02:22 omk-vm9-centos7 systemd[1]: Starting Opmantek Webserver...
Sep 24 11:02:54 omk-vm9-centos7 systemd[1]: Started Opmantek Webserver.

NMIS# snmpd --version
NET-SNMP version:  5.7.2

NMIS# cat /proc/3253/stat
3253 (opmantek.pl web) S 3137 3137 3137 0 -1 4202816 5749 0 0 0 390 43 0 0 20 0 1 0 4442 543064064 64976 18446744073709551615 1 1 0 0 0 0 0 4224 5 18446744073709551615 0 0 17 0 0 0 0 0 0 0 0 0 0 0 0 0 0

NMIS# snmpwalk -v 2c -c COMMUNITYSTRING 127.0.0.1 1.3.6.1.2.1.25.4.2.1.7.3253
HOST-RESOURCES-MIB::hrSWRunStatus.3253 = INTEGER: invalid(4)

...

A consequence of this issue is that NMIS when an affected version of snmp is installed,
MMIS will report a monitored service as 'down' when it is 'running' if the process name contains a space.

Max Message size too small/large

snmp_max_msg_size

Go to /usr/local/nmis9/Conf/

vim Conf.nmis

Image Added


The primary tunable NMIS configuration setting for SNMP is snmp_max_msg_size, which controls how large a single SNMP packet may be.

This can be set as a system-wide default (in the System menu, under System Configuration), or as a per-host setting (in the Edit Node menu, under Advanced Options).

The default for snmp_max_msg_size is 1472 bytes, just below the 1500 byte packet limit for normal Ethernets. In LAN-only scenarios it is possible to increase this past 1500 bytes: this causes IP fragments and packet reassembly, but unless your LAN is saturated and starving for bandwidth fragmentation is not a problem. The benefit of a larger SNMP packet would be that the data to be collected fits into fewer packets.

To quickly adjust this setting you could run the following command using the node_admin.pl tool that ships with NMIS. The max_msg_size value of course can be increased or decreased as desired.

Code Block
/usr/local/nmis9/admin/node_admin.pl act=set node=nodename entry.configuration.max_msg_size=2800

SNMP Partially Working in NMIS but SNMPWALK works no problem

Many SNMP agents to not comply to the SNMPv2c specifications so do not support multiple SNMP PDU's in a single packet.  This feature can be disabled by setting max_repetitions to 1, which means one SNMP PDU per SNMP packet.

Code Block
/usr/local/nmis9/admin/node_admin.pl act=set node=nodename entry.configuration.max_repetitions=1