Suse + SNMP

Hi everybody

I need help with with SNMP daemon for Suse Linux. The simple situation - a have to send traps to 2 hosts if something is wrong in my OS.

Config snmpd.conf:

[CODE]mta-in-00:~/bck # cat /etc/snmp/snmpd.conf
syslocation mta-in-00.localdomain
syscontact Customer Name admin@customer.com
sysservices 78

rocommunity “public” default

agentaddress udp:161,tcp:161

trapcommunity “public”
trapsess -v 2c -c “public” 192.168.47.1:8165
trapsess -v 2c -c “public” 192.168.47.2:8165
[/CODE]

Log:

mta-in-00:~ # tail -f /var/log/net-snmpd.log could not open /proc/net/if_inet6 cannot open /proc/net/snmp6 ... NET-SNMP version 5.4.2.1

Ports are up:

mta-in-00:/etc/snmp # netstat -ntupl | grep snmp tcp 0 0 0.0.0.0:161 0.0.0.0:* LISTEN 7774/snmpd tcp 0 0 127.0.0.1:199 0.0.0.0:* LISTEN 7774/snmpd udp 0 0 0.0.0.0:37797 0.0.0.0:* 7774/snmpd udp 0 0 0.0.0.0:45044 0.0.0.0:* 7774/snmpd udp 0 0 0.0.0.0:161 0.0.0.0:* 7774/snmpd

During starting, SNMP sends “cold” traps:

mta-in-00:~ # tcpdump -i any -s0 -n host 192.168.47.1 or host 192.168.47.2 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on any, link-type LINUX_SLL (Linux cooked), capture size 65535 bytes 16:52:44.077940 IP 192.168.45.11.45044 > 192.168.47.1.8165: UDP, length 95 16:52:44.077949 IP 192.168.45.11.45044 > 192.168.47.1.8165: UDP, length 95 16:52:44.077952 IP 192.168.45.11.45044 > 192.168.47.1.8165: UDP, length 95 16:52:44.077998 IP 192.168.45.11.37797 > 192.168.47.2.8165: UDP, length 95 16:52:44.078001 IP 192.168.45.11.37797 > 192.168.47.2.8165: UDP, length 95 16:52:44.078003 IP 192.168.45.11.37797 > 192.168.47.2.8165: UDP, length 95 16:52:44.232191 IP 192.168.45.11.33207 > 192.168.47.1.8165: UDP, length 94 16:52:44.232196 IP 192.168.45.11.33207 > 192.168.47.1.8165: UDP, length 94 16:52:44.232198 IP 192.168.45.11.33207 > 192.168.47.1.8165: UDP, length 94 16:52:44.232308 IP 192.168.45.11.42188 > 192.168.47.2.8165: UDP, length 94 16:52:44.232310 IP 192.168.45.11.42188 > 192.168.47.2.8165: UDP, length 94 16:52:44.232312 IP 192.168.45.11.42188 > 192.168.47.2.8165: UDP, length 94

But if something is wrong in my system - ethernet cables are removed, hdd is full, sendmail is shutdown - there is no any traps.

Installed pkg:

mta-in-00:~ # rpm -qa | grep snmp libsnmp15-5.4.2.1-8.12.6.1 snmp-mibs-5.4.2.1-8.12.6.1 net-snmp-5.4.2.1-8.12.6.1 rsyslog-module-snmp-5.8.7-0.5.5

Kernel:

mta-in-00:~ # uname -a Linux mta-in-00 3.0.13-0.27-default #1 SMP Wed Feb 15 13:33:49 UTC 2012 (d73692b) x86_64 x86_64 x86_64 GNU/Linux

MIBs in the system:

mta-in-00:~ # ll /usr/share/snmp/mibs/
total 1764
-rw-r--r-- 1 root root   2140 Nov 26 17:59 .index
-rw-r--r-- 1 root root  17455 Jan 27  2012 AGENTX-MIB.txt
-rw-r--r-- 1 root root  50948 Jan 27  2012 BRIDGE-MIB.txt
-rw-r--r-- 1 root root  68177 Jan 27  2012 DISMAN-EVENT-MIB.txt
-rw-r--r-- 1 root root  24613 Jan 27  2012 DISMAN-SCHEDULE-MIB.txt
-rw-r--r-- 1 root root  64311 Jan 27  2012 DISMAN-SCRIPT-MIB.txt
-rw-r--r-- 1 root root  84492 Jan 27  2012 EtherLike-MIB.txt
-rw-r--r-- 1 root root   4660 Jan 27  2012 HCNUM-TC.txt
-rw-r--r-- 1 root root  52544 Jan 27  2012 HOST-RESOURCES-MIB.txt
-rw-r--r-- 1 root root  10583 Jan 27  2012 HOST-RESOURCES-TYPES.txt
-rw-r--r-- 1 root root   4743 Jan 27  2012 IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt
-rw-r--r-- 1 root root   4299 Jan 27  2012 IANA-LANGUAGE-MIB.txt
-rw-r--r-- 1 root root   3518 Jan 27  2012 IANA-RTPROTO-MIB.txt
-rw-r--r-- 1 root root  24065 Jan 27  2012 IANAifType-MIB.txt
-rw-r--r-- 1 root root   5066 Jan 27  2012 IF-INVERTED-STACK-MIB.txt
-rw-r--r-- 1 root root  71691 Jan 27  2012 IF-MIB.txt
-rw-r--r-- 1 root root  16782 Jan 27  2012 INET-ADDRESS-MIB.txt
-rw-r--r-- 1 root root  46366 Jan 27  2012 IP-FORWARD-MIB.txt
-rw-r--r-- 1 root root 185928 Jan 27  2012 IP-MIB.txt
-rw-r--r-- 1 root root  15936 Jan 27  2012 IPV6-ICMP-MIB.txt
-rw-r--r-- 1 root root  48703 Jan 27  2012 IPV6-MIB.txt
-rw-r--r-- 1 root root   2367 Jan 27  2012 IPV6-TC.txt
-rw-r--r-- 1 root root   7257 Jan 27  2012 IPV6-TCP-MIB.txt
-rw-r--r-- 1 root root   4400 Jan 27  2012 IPV6-UDP-MIB.txt
-rw-r--r-- 1 root root   5931 Jan 27  2012 LM-SENSORS-MIB.txt
-rw-r--r-- 1 root root  15732 Jan 27  2012 NET-SNMP-AGENT-MIB.txt
-rw-r--r-- 1 root root   9160 Jan 27  2012 NET-SNMP-EXAMPLES-MIB.txt
-rw-r--r-- 1 root root   9198 Jan 27  2012 NET-SNMP-EXTEND-MIB.txt
-rw-r--r-- 1 root root   2036 Jan 27  2012 NET-SNMP-MIB.txt
-rw-r--r-- 1 root root   4495 Jan 27  2012 NET-SNMP-TC.txt
-rw-r--r-- 1 root root   5039 Jan 27  2012 NET-SNMP-VACM-MIB.txt
-rw-r--r-- 1 root root  24723 Jan 27  2012 NOTIFICATION-LOG-MIB.txt
-rw-r--r-- 1 root root   1174 Jan 27  2012 RFC-1215.txt
-rw-r--r-- 1 root root   3067 Jan 27  2012 RFC1155-SMI.txt
-rw-r--r-- 1 root root  79667 Jan 27  2012 RFC1213-MIB.txt
-rw-r--r-- 1 root root 147822 Jan 27  2012 RMON-MIB.txt
-rw-r--r-- 1 root root  45323 Jan 27  2012 SCTP-MIB.txt
-rw-r--r-- 1 root root   4595 Jan 27  2012 SMUX-MIB.txt
-rw-r--r-- 1 root root  15490 Jan 27  2012 SNMP-COMMUNITY-MIB.txt
-rw-r--r-- 1 root root  22342 Jan 27  2012 SNMP-FRAMEWORK-MIB.txt
-rw-r--r-- 1 root root   5496 Jan 27  2012 SNMP-MPD-MIB.txt
-rw-r--r-- 1 root root  20014 Jan 27  2012 SNMP-NOTIFICATION-MIB.txt
-rw-r--r-- 1 root root   9106 Jan 27  2012 SNMP-PROXY-MIB.txt
-rw-r--r-- 1 root root  22769 Jan 27  2012 SNMP-TARGET-MIB.txt
-rw-r--r-- 1 root root  39201 Jan 27  2012 SNMP-USER-BASED-SM-MIB.txt
-rw-r--r-- 1 root root   2205 Jan 27  2012 SNMP-USM-AES-MIB.txt
-rw-r--r-- 1 root root  21106 Jan 27  2012 SNMP-USM-DH-OBJECTS-MIB.txt
-rw-r--r-- 1 root root  34162 Jan 27  2012 SNMP-VIEW-BASED-ACM-MIB.txt
-rw-r--r-- 1 root root   8263 Jan 27  2012 SNMPv2-CONF.txt
-rw-r--r-- 1 root root  29305 Jan 27  2012 SNMPv2-MIB.txt
-rw-r--r-- 1 root root   8924 Jan 27  2012 SNMPv2-SMI.txt
-rw-r--r-- 1 root root  38034 Jan 27  2012 SNMPv2-TC.txt
-rw-r--r-- 1 root root   5775 Jan 27  2012 SNMPv2-TM.txt
-rw-r--r-- 1 root root  28564 Jan 27  2012 TCP-MIB.txt
-rw-r--r-- 1 root root  16414 Jan 27  2012 TRANSPORT-ADDRESS-MIB.txt
-rw-r--r-- 1 root root    284 Nov 26 17:59 TRAP-TEST-MIB.txt
-rw-r--r-- 1 root root   2163 Jan 27  2012 UCD-DEMO-MIB.txt
-rw-r--r-- 1 root root   4402 Jan 27  2012 UCD-DISKIO-MIB.txt
-rw-r--r-- 1 root root   3010 Jan 27  2012 UCD-DLMOD-MIB.txt
-rw-r--r-- 1 root root   8118 Jan 27  2012 UCD-IPFWACC-MIB.txt
-rw-r--r-- 1 root root  46443 Jan 27  2012 UCD-SNMP-MIB.txt
-rw-r--r-- 1 root root  20882 Jan 27  2012 UDP-MIB.txt
-rw-r--r-- 1 root root  22571 Jan 27  2012 VELOCITY-MIB.txt
-rw-r--r-- 1 root root    680 Jan 27  2012 VELOCITY-TYPES.txt

Interfaces and routing table:

[CODE]mta-in-00:~ # ifconfig
bond1 Link encap:Ethernet HWaddr 10:10:3E:A1:01:00
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:1547270 errors:0 dropped:772543 overruns:0 frame:0
TX packets:34057 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:92565948 (88.2 Mb) TX bytes:3289193 (3.1 Mb)

bond1.600 Link encap:Ethernet HWaddr 10:10:3E:A1:01:00
inet addr:192.168.61.11 Bcast:192.168.63.255 Mask:255.255.240.0
UP BROADCAST RUNNING MULTICAST MTU:1496 Metric:1
RX packets:944 errors:0 dropped:0 overruns:0 frame:0
TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:40990 (40.0 Kb) TX bytes:42 (42.0 b)

bond1.700 Link encap:Ethernet HWaddr 10:10:3E:A1:01:00
inet addr:192.168.45.11 Bcast:192.168.47.255 Mask:255.255.240.0
UP BROADCAST RUNNING MULTICAST MTU:1496 Metric:1
RX packets:167533 errors:0 dropped:106 overruns:0 frame:0
TX packets:8739 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:6679605 (6.3 Mb) TX bytes:2079606 (1.9 Mb)

bond1.800 Link encap:Ethernet HWaddr 10:10:3E:A1:01:00
inet addr:192.168.29.11 Bcast:192.168.31.255 Mask:255.255.240.0
UP BROADCAST RUNNING MULTICAST MTU:1496 Metric:1
RX packets:570 errors:0 dropped:0 overruns:0 frame:0
TX packets:155 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:35780 (34.9 Kb) TX bytes:16521 (16.1 Kb)

eth1 Link encap:Ethernet HWaddr 10:10:3E:A1:01:00
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:770559 errors:0 dropped:770379 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:46305279 (44.1 Mb) TX bytes:84 (84.0 b)

eth3 Link encap:Ethernet HWaddr 10:10:3E:A1:01:00
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:776711 errors:0 dropped:125 overruns:0 frame:0
TX packets:34055 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:46260669 (44.1 Mb) TX bytes:3289109 (3.1 Mb)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:244 errors:0 dropped:0 overruns:0 frame:0
TX packets:244 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:14620 (14.2 Kb) TX bytes:14620 (14.2 Kb)

mta-in-00:~ # route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.30.2 0.0.0.0 UG 0 0 0 bond1.800
10.49.128.0 192.168.46.2 255.255.255.0 UG 0 0 0 bond1.700
10.53.0.0 192.168.46.2 255.255.0.0 UG 0 0 0 bond1.700
10.60.0.0 192.168.46.2 255.255.0.0 UG 0 0 0 bond1.700
10.61.0.0 192.168.46.2 255.255.0.0 UG 0 0 0 bond1.700
10.80.137.208 192.168.46.2 255.255.255.240 UG 0 0 0 bond1.700
10.81.17.0 192.168.46.2 255.255.255.0 UG 0 0 0 bond1.700
10.81.34.0 192.168.46.2 255.255.255.0 UG 0 0 0 bond1.700
10.81.220.0 192.168.46.2 255.255.255.224 UG 0 0 0 bond1.700
82.182.8.6 192.168.46.2 255.255.255.255 UGH 0 0 0 bond1.700
loopback * 255.0.0.0 U 0 0 0 lo
192.168.16.0 * 255.255.240.0 U 0 0 0 bond1.800
192.168.32.0 * 255.255.240.0 U 0 0 0 bond1.700
192.168.48.0 * 255.255.240.0 U 0 0 0 bond1.600
217.174.65.0 192.168.46.2 255.255.255.224 UG 0 0 0 bond1.700
217.174.65.136 192.168.46.2 255.255.255.248 UG 0 0 0 bond1.700
[/CODE]
Of course, i don’t have any firewall, Iptables is clear
It looks that everyting is ok, but daemon doen’t know when and what to send. I guess i missed something.

I need your help :slight_smile: Thanks and br/// Ilya

On 11/29/2014 04:34 PM, surgutor wrote:[color=blue]

I need help with with SNMP daemon for Suse Linux. The simple situation -
a have to send traps to 2 hosts if something is wrong in my OS.

Config snmpd.conf:

Code:

mta-in-00:~/bck # cat /etc/snmp/snmpd.conf

syslocation mta-in-00.localdomain
syscontact Customer Name admin@customer.com
sysservices 78

rocommunity “public” default

agentaddress udp:161,tcp:161

trapcommunity “public”
trapsess -v 2c -c “public” 192.168.47.1:8165
trapsess -v 2c -c “public” 192.168.47.2:8165

--------------------[/color]

This looks fine to me, and matches what the LAN trace shows; send stuff to
these two hosts on port 8165 (UDP). This apparently works since that’s
what the LAN trace shows.
[color=blue]

Ports are up:

Code:

mta-in-00:/etc/snmp # netstat -ntupl | grep snmp

tcp 0 0 0.0.0.0:161 0.0.0.0:* LISTEN 7774/snmpd
tcp 0 0 127.0.0.1:199 0.0.0.0:* LISTEN 7774/snmpd
udp 0 0 0.0.0.0:37797 0.0.0.0:* 7774/snmpd
udp 0 0 0.0.0.0:45044 0.0.0.0:* 7774/snmpd
udp 0 0 0.0.0.0:161 0.0.0.0:* 7774/snmpd

--------------------[/color]

I’m not sure what you are showing here. This is from the system that is
supposed to be SENDING the messages to the 192.168.47.(1|2) systems,
right? What do listening ports have to do with sending data? Nothing, so
this confuses me.
[color=blue]

During starting, SNMP sends “cold” traps:

Code:

mta-in-00:~ # tcpdump -i any -s0 -n host 192.168.47.1 or host 192.168.47.2

tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on any, link-type LINUX_SLL (Linux cooked), capture size 65535 bytes
16:52:44.077940 IP 192.168.45.11.45044 > 192.168.47.1.8165: UDP, length 95
16:52:44.077949 IP 192.168.45.11.45044 > 192.168.47.1.8165: UDP, length 95
16:52:44.077952 IP 192.168.45.11.45044 > 192.168.47.1.8165: UDP, length 95
16:52:44.077998 IP 192.168.45.11.37797 > 192.168.47.2.8165: UDP, length 95
16:52:44.078001 IP 192.168.45.11.37797 > 192.168.47.2.8165: UDP, length 95
16:52:44.078003 IP 192.168.45.11.37797 > 192.168.47.2.8165: UDP, length 95
16:52:44.232191 IP 192.168.45.11.33207 > 192.168.47.1.8165: UDP, length 94
16:52:44.232196 IP 192.168.45.11.33207 > 192.168.47.1.8165: UDP, length 94
16:52:44.232198 IP 192.168.45.11.33207 > 192.168.47.1.8165: UDP, length 94
16:52:44.232308 IP 192.168.45.11.42188 > 192.168.47.2.8165: UDP, length 94
16:52:44.232310 IP 192.168.45.11.42188 > 192.168.47.2.8165: UDP, length 94
16:52:44.232312 IP 192.168.45.11.42188 > 192.168.47.2.8165: UDP, length 94

--------------------[/color]

So it is working, and sending to the specified port. Are you listening,
on the other machines, on this non-standard port? I presume so.
[color=blue]

But if something is wrong in my system - ethernet cables are removed,
hdd is full, sendmail is shutdown - there is no any traps.[/color]

How are you determining that there are not any traps? If the network
cable is unplugged that may not be surprising (maybe snmpd is clever and
caches things… I do not know as I am not an SNMP expert) but if the
service is shutdown, and if that should normally cause a trap, then I
cannot think of why that would not work. Could you help a newbie
understand how to configure certain types of traps? Have you tried
continuing the LAN trace on this box when doing things like stopping the
service to see if an attempt is even made to send something (I presume so,
but would like confirmation on what “there is no any traps” really means)?
[color=blue]

Installed pkg:

Code:

mta-in-00:~ # rpm -qa | grep snmp

libsnmp15-5.4.2.1-8.12.6.1
snmp-mibs-5.4.2.1-8.12.6.1
net-snmp-5.4.2.1-8.12.6.1
rsyslog-module-snmp-5.8.7-0.5.5


Kernel:

Code:

mta-in-00:~ # uname -a

Linux mta-in-00 3.0.13-0.27-default #1 SMP Wed Feb 15 13:33:49 UTC 2012 (d73692b) x86_64 x86_64 x86_64 GNU/Linux


MIBs in the system:

Code:

mta-in-00:~ # ll /usr/share/snmp/mibs/
total 1764
-rw-r–r-- 1 root root 2140 Nov 26 17:59 .index
-rw-r–r-- 1 root root 17455 Jan 27 2012 AGENTX-MIB.txt
-rw-r–r-- 1 root root 50948 Jan 27 2012 BRIDGE-MIB.txt
-rw-r–r-- 1 root root 68177 Jan 27 2012 DISMAN-EVENT-MIB.txt
-rw-r–r-- 1 root root 24613 Jan 27 2012 DISMAN-SCHEDULE-MIB.txt
-rw-r–r-- 1 root root 64311 Jan 27 2012 DISMAN-SCRIPT-MIB.txt
-rw-r–r-- 1 root root 84492 Jan 27 2012 EtherLike-MIB.txt
-rw-r–r-- 1 root root 4660 Jan 27 2012 HCNUM-TC.txt
-rw-r–r-- 1 root root 52544 Jan 27 2012 HOST-RESOURCES-MIB.txt
-rw-r–r-- 1 root root 10583 Jan 27 2012 HOST-RESOURCES-TYPES.txt
-rw-r–r-- 1 root root 4743 Jan 27 2012 IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt
-rw-r–r-- 1 root root 4299 Jan 27 2012 IANA-LANGUAGE-MIB.txt
-rw-r–r-- 1 root root 3518 Jan 27 2012 IANA-RTPROTO-MIB.txt
-rw-r–r-- 1 root root 24065 Jan 27 2012 IANAifType-MIB.txt
-rw-r–r-- 1 root root 5066 Jan 27 2012 IF-INVERTED-STACK-MIB.txt
-rw-r–r-- 1 root root 71691 Jan 27 2012 IF-MIB.txt
-rw-r–r-- 1 root root 16782 Jan 27 2012 INET-ADDRESS-MIB.txt
-rw-r–r-- 1 root root 46366 Jan 27 2012 IP-FORWARD-MIB.txt
-rw-r–r-- 1 root root 185928 Jan 27 2012 IP-MIB.txt
-rw-r–r-- 1 root root 15936 Jan 27 2012 IPV6-ICMP-MIB.txt
-rw-r–r-- 1 root root 48703 Jan 27 2012 IPV6-MIB.txt
-rw-r–r-- 1 root root 2367 Jan 27 2012 IPV6-TC.txt
-rw-r–r-- 1 root root 7257 Jan 27 2012 IPV6-TCP-MIB.txt
-rw-r–r-- 1 root root 4400 Jan 27 2012 IPV6-UDP-MIB.txt
-rw-r–r-- 1 root root 5931 Jan 27 2012 LM-SENSORS-MIB.txt
-rw-r–r-- 1 root root 15732 Jan 27 2012 NET-SNMP-AGENT-MIB.txt
-rw-r–r-- 1 root root 9160 Jan 27 2012 NET-SNMP-EXAMPLES-MIB.txt
-rw-r–r-- 1 root root 9198 Jan 27 2012 NET-SNMP-EXTEND-MIB.txt
-rw-r–r-- 1 root root 2036 Jan 27 2012 NET-SNMP-MIB.txt
-rw-r–r-- 1 root root 4495 Jan 27 2012 NET-SNMP-TC.txt
-rw-r–r-- 1 root root 5039 Jan 27 2012 NET-SNMP-VACM-MIB.txt
-rw-r–r-- 1 root root 24723 Jan 27 2012 NOTIFICATION-LOG-MIB.txt
-rw-r–r-- 1 root root 1174 Jan 27 2012 RFC-1215.txt
-rw-r–r-- 1 root root 3067 Jan 27 2012 RFC1155-SMI.txt
-rw-r–r-- 1 root root 79667 Jan 27 2012 RFC1213-MIB.txt
-rw-r–r-- 1 root root 147822 Jan 27 2012 RMON-MIB.txt
-rw-r–r-- 1 root root 45323 Jan 27 2012 SCTP-MIB.txt
-rw-r–r-- 1 root root 4595 Jan 27 2012 SMUX-MIB.txt
-rw-r–r-- 1 root root 15490 Jan 27 2012 SNMP-COMMUNITY-MIB.txt
-rw-r–r-- 1 root root 22342 Jan 27 2012 SNMP-FRAMEWORK-MIB.txt
-rw-r–r-- 1 root root 5496 Jan 27 2012 SNMP-MPD-MIB.txt
-rw-r–r-- 1 root root 20014 Jan 27 2012 SNMP-NOTIFICATION-MIB.txt
-rw-r–r-- 1 root root 9106 Jan 27 2012 SNMP-PROXY-MIB.txt
-rw-r–r-- 1 root root 22769 Jan 27 2012 SNMP-TARGET-MIB.txt
-rw-r–r-- 1 root root 39201 Jan 27 2012 SNMP-USER-BASED-SM-MIB.txt
-rw-r–r-- 1 root root 2205 Jan 27 2012 SNMP-USM-AES-MIB.txt
-rw-r–r-- 1 root root 21106 Jan 27 2012 SNMP-USM-DH-OBJECTS-MIB.txt
-rw-r–r-- 1 root root 34162 Jan 27 2012 SNMP-VIEW-BASED-ACM-MIB.txt
-rw-r–r-- 1 root root 8263 Jan 27 2012 SNMPv2-CONF.txt
-rw-r–r-- 1 root root 29305 Jan 27 2012 SNMPv2-MIB.txt
-rw-r–r-- 1 root root 8924 Jan 27 2012 SNMPv2-SMI.txt
-rw-r–r-- 1 root root 38034 Jan 27 2012 SNMPv2-TC.txt
-rw-r–r-- 1 root root 5775 Jan 27 2012 SNMPv2-TM.txt
-rw-r–r-- 1 root root 28564 Jan 27 2012 TCP-MIB.txt
-rw-r–r-- 1 root root 16414 Jan 27 2012 TRANSPORT-ADDRESS-MIB.txt
-rw-r–r-- 1 root root 284 Nov 26 17:59 TRAP-TEST-MIB.txt
-rw-r–r-- 1 root root 2163 Jan 27 2012 UCD-DEMO-MIB.txt
-rw-r–r-- 1 root root 4402 Jan 27 2012 UCD-DISKIO-MIB.txt
-rw-r–r-- 1 root root 3010 Jan 27 2012 UCD-DLMOD-MIB.txt
-rw-r–r-- 1 root root 8118 Jan 27 2012 UCD-IPFWACC-MIB.txt
-rw-r–r-- 1 root root 46443 Jan 27 2012 UCD-SNMP-MIB.txt
-rw-r–r-- 1 root root 20882 Jan 27 2012 UDP-MIB.txt
-rw-r–r-- 1 root root 22571 Jan 27 2012 VELOCITY-MIB.txt
-rw-r–r-- 1 root root 680 Jan 27 2012 VELOCITY-TYPES.txt


Interfaces and routing table:
[/color]

You really should use the ‘ip’ command, just for the record. ifconfig is
outdated (see its manpage) and has been for years.

ip addr    #ip a
ip route   #ip r
ip -s link
ip neigh

[color=blue]

Code:

mta-in-00:~ # ifconfig

bond1 Link encap:Ethernet HWaddr 10:10:3E:A1:01:00
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:1547270 errors:0 dropped:772543 overruns:0 frame:0
TX packets:34057 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:92565948 (88.2 Mb) TX bytes:3289193 (3.1 Mb)

bond1.600 Link encap:Ethernet HWaddr 10:10:3E:A1:01:00
inet addr:192.168.61.11 Bcast:192.168.63.255 Mask:255.255.240.0
UP BROADCAST RUNNING MULTICAST MTU:1496 Metric:1
RX packets:944 errors:0 dropped:0 overruns:0 frame:0
TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:40990 (40.0 Kb) TX bytes:42 (42.0 b)

bond1.700 Link encap:Ethernet HWaddr 10:10:3E:A1:01:00
inet addr:192.168.45.11 Bcast:192.168.47.255 Mask:255.255.240.0
UP BROADCAST RUNNING MULTICAST MTU:1496 Metric:1
RX packets:167533 errors:0 dropped:106 overruns:0 frame:0
TX packets:8739 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:6679605 (6.3 Mb) TX bytes:2079606 (1.9 Mb)

bond1.800 Link encap:Ethernet HWaddr 10:10:3E:A1:01:00
inet addr:192.168.29.11 Bcast:192.168.31.255 Mask:255.255.240.0
UP BROADCAST RUNNING MULTICAST MTU:1496 Metric:1
RX packets:570 errors:0 dropped:0 overruns:0 frame:0
TX packets:155 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:35780 (34.9 Kb) TX bytes:16521 (16.1 Kb)

eth1 Link encap:Ethernet HWaddr 10:10:3E:A1:01:00
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:770559 errors:0 dropped:770379 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:46305279 (44.1 Mb) TX bytes:84 (84.0 b)

eth3 Link encap:Ethernet HWaddr 10:10:3E:A1:01:00
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:776711 errors:0 dropped:125 overruns:0 frame:0
TX packets:34055 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:46260669 (44.1 Mb) TX bytes:3289109 (3.1 Mb)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:244 errors:0 dropped:0 overruns:0 frame:0
TX packets:244 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:14620 (14.2 Kb) TX bytes:14620 (14.2 Kb)

mta-in-00:~ # route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.30.2 0.0.0.0 UG 0 0 0 bond1.800
10.49.128.0 192.168.46.2 255.255.255.0 UG 0 0 0 bond1.700
10.53.0.0 192.168.46.2 255.255.0.0 UG 0 0 0 bond1.700
10.60.0.0 192.168.46.2 255.255.0.0 UG 0 0 0 bond1.700
10.61.0.0 192.168.46.2 255.255.0.0 UG 0 0 0 bond1.700
10.80.137.208 192.168.46.2 255.255.255.240 UG 0 0 0 bond1.700
10.81.17.0 192.168.46.2 255.255.255.0 UG 0 0 0 bond1.700
10.81.34.0 192.168.46.2 255.255.255.0 UG 0 0 0 bond1.700
10.81.220.0 192.168.46.2 255.255.255.224 UG 0 0 0 bond1.700
82.182.8.6 192.168.46.2 255.255.255.255 UGH 0 0 0 bond1.700
loopback * 255.0.0.0 U 0 0 0 lo
192.168.16.0 * 255.255.240.0 U 0 0 0 bond1.800
192.168.32.0 * 255.255.240.0 U 0 0 0 bond1.700
192.168.48.0 * 255.255.240.0 U 0 0 0 bond1.600
217.174.65.0 192.168.46.2 255.255.255.224 UG 0 0 0 bond1.700
217.174.65.136 192.168.46.2 255.255.255.248 UG 0 0 0 bond1.700


Of course, i don’t have any firewall, Iptables is clear
It looks that everyting is ok, but daemon doen’t know when and what to
send. I guess i missed something.

I need your help :slight_smile: Thanks and br/// Ilya[/color]

Did you configure your system to send those other types of traps? See the
snmpd.conf manpage, but I stole this from there, which seems to imply you
need t specify something, at least to a newb like me:

Process Monitoring
The hrSWRun group of the Host Resources MIB provides information
about individual processes running on the local system.  The prTable of
the UCD-SNMP-MIB complements this by reporting on selected  services
(which  may  involve  multiple  processes).   This
requires that the agent was built with support for the
ucd-snmp/proc module (which is included as part of the default build
configuration).

proc NAME [MAX [MIN]]
monitors the number of processes called NAME (as reported by
" -acx") running on the local system.

If the number of NAMEd processes is less than MIN or greater
than MAX, then the corresponding prErrorFlag instance will be set to 1,
and a suitable description message reported via the prErrMessage instance.

Note:  This situation will not automatically trigger a trap
to report the problem - see the DisMan Event MIB section later.

If  neither  MAX nor MIN are specified, they will default to
infinity and 1 respectively ("at least one").  If only MAX is specified,
MIN will default to 0 ("no more than MAX").  If MAX is 0 (and MIN is not),
this indicates infinity ("at least MIN").
If both MAX and MIN are 0, this indicates a process that
should not be running.

procfix NAME PROG ARGS
registers a command that can be run to fix errors with the
given process NAME.  This will be invoked when the corresponding prErrFix
instance is set to 1.

Note:  This command will not be invoked automatically.

The procfix directive must be specified after the matching
proc directive, and cannot be used on its own.

If no proc directives are defined, then walking the prTable will
fail (noSuchObject).


Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below…

Hi *,

[QUOTE=ab;25158]On 11/29/2014 04:34 PM, surgutor wrote:[COLOR=blue]

[/COLOR][COLOR=blue] But if something is wrong in my system - ethernet cables are removed,
hdd is full, sendmail is shutdown - there is no any traps.[/COLOR]
[…]
Did you configure your system to send those other types of traps? See the
snmpd.conf manpage, but I stole this from there, which seems to imply you
need t specify something[/QUOTE]

ab has it right: snmpd will (except for some very basic traps concerning itself) not send traps all by itself, unless configuring “DisMan” properly.

Again from the snmpd.conf man page, a bit above from what ab quoted:

ACTIVE MONITORING The usual behaviour of an SNMP agent is to wait for incoming SNMP requests and respond to them - if no requests are received, an agent will typically not initiate any actions. This section describes various directives that can configure snmpd to take a more active role.