TECHZEN Zenoss User Community ARCHIVE  

Zenoss 4.2.5 SNMP trap event cannot be display

Subject: Zenoss 4.2.5 SNMP trap event cannot be display
Author: [Not Specified]
Posted: 2016-11-24 05:44

Hi All,

I have a Zenoss server version 4.2.5 which have been up for a almost year. However, I found the Zenoss cannot display the SNMP trap event in the event page such that no email alert is sent out.I follow below steps and the services are up except service zends. Also make sure the the 162/udp is being listened. We also did not do any network change and configuration onthe Zenoss server. Any Idea Thanks a lot.

https://support.zenoss.com/hc/en-us/articles/202193699-How-To-Confirm-Zenoss-Is-Healthy-After-A-Hard-System-Down

[root@zenoss log]# service zends status
zends: unrecognized service
[root@zenoss log]# service memcached status
memcached (pid 1505) is running...
[root@zenoss log]# service rabbitmq-server status
Status of node rabbit@zenoss ...
[{pid,1815},
{running_applications,[{rabbit,"RabbitMQ","2.8.6"},
{os_mon,"CPO CXC 138 46","2.1.8"},
{sasl,"SASL CXC 138 11","2.1.5.4"},
{mnesia,"MNESIA CXC 138 12","4.4.7"},
{stdlib,"ERTS CXC 138 10","1.15.5"},
{kernel,"ERTS CXC 138 10","2.12.5"}]},
{os,{unix,linux}},
{erlang_version,"Erlang (BEAM) emulator version 5.6.5 [source] [64-bit] [smp:4] [async-threads:30] [hipe] [kernel-poll:true]\n"},
{memory,[{total,132740352},
{processes,24362016},
{processes_used,24345448},
{system,108378336},
{atom,1070481},
{atom_used,1055348},
{binary,909840},
{code,11799199},
{ets,93064984}]},
{vm_memory_high_watermark,0.4},
{vm_memory_limit,4149157888},
{disk_free_limit,1000000000},
{disk_free,30646571008},
{file_descriptors,[{total_limit,924},
{total_used,23},
{sockets_limit,829},
{sockets_used,11}]},
{processes,[{limit,1048576},{used,242}]},
{run_queue,0},
{uptime,990}]
...done.
[root@zenoss log]# service zenoss status
Daemon: zeneventserver program running; pid=2645
Daemon: zopectl program running; pid=2902
Daemon: zenrrdcached program running; pid=2914
Daemon: zenhub program running; pid=2987
Daemon: zenjobs program running; pid=3097
Daemon: zeneventd program running; pid=3700
Daemon: zenping program running; pid=3854
Daemon: zensyslog program running; pid=6584
Daemon: zenstatus program running; pid=4708
Daemon: zenactiond program running; pid=5019
Daemon: zentrap program running; pid=6602
Daemon: zenmodeler program running; pid=5100
Daemon: zenperfsnmp program running; pid=5156
Daemon: zencommand program running; pid=5208
Daemon: zenprocess program running; pid=5239
Daemon: zredis program running; pid=5244
Daemon: zenjmx program running; pid=5280
Daemon: zenpython program running; pid=5353

[root@zenoss log]# netstat -nao | grep 162
tcp 0 0 127.0.0.1:11211 127.0.0.1:50792 ESTABLISHED keepalive (6162.90/0/0)
tcp 10 0 ::1:8789 ::1:34162 ESTABLISHED keepalive (15.83/0/0)
tcp 0 0 ::1:34162 ::1:8789 ESTABLISHED keepalive (15.83/0/0)
udp 0 0 :::162 :::* off (0.00/0/0)

[root@zenoss log]# date
Thu Nov 24 19:43:55 HKT 2016

Rgds,

Jacky



Subject: That all looks OK to me.
Author: Jane Curry
Posted: 2016-11-29 13:13

That all looks OK to me.

I have a small trap generation script that I use on the Zenoss server to test TRAPs:

[zenoss@zen42 local]$ cat gen_mytrap_1234.sh
#!/bin/bash
#
# Generate a sample trap
# Send trap using the snmptrap supplied with net-snmp
# Trap here is Enterprise 1.3.6.1.4.1.123, trap 1234
# Ensure you change the line for MANAGER to be your Zenoss Server
# Ensure that the HOST line is an existing device - easiest if same as MANAGER
#
# Uncomment next line for extra debugging
set -x
MANAGER=zen42.class.example.org
HOST=zen42.class.example.org
ENTERPRISE=.1.3.6.1.4.1.123
GENTRAP=6
SPECTRAP=1234
TRAPVAR1=.1.3.6.1.4.1.123.0.1234
VARBIND1="Hello world 4"
TIMESTAMP=1
#
/usr/bin/snmptrap -v 1 -c public $MANAGER $ENTERPRISE $HOST $GENTRAP $SPECTRAP $TIMESTAMP $TRAPVAR1 s "$VARBIND1"
#

You need to change the MANAGER and HOST line to suit your Zenoss server. Note that the/usr/bin/snmptrap line should be one line including the$TRAPVAR1 s "$VARBIND1" Run it as the zenoss user:

./gen_mytrap_1234.sh
+ MANAGER=zen42.class.example.org
+ HOST=zen42.class.example.org
+ ENTERPRISE=.1.3.6.1.4.1.123
+ GENTRAP=6
+ SPECTRAP=1234
+ TRAPVAR1=.1.3.6.1.4.1.123.0.1234
+ VARBIND1='Hello world 4'
+ TIMESTAMP=1
+ /usr/bin/snmptrap -v 1 -c public zen42.class.example.org .1.3.6.1.4.1.123 zen42.class.example.org 6 1234 1 .1.3.6.1.4.1.123.0.1234 s 'Hello world 4'
No log handling enabled - turning on stderr logging
Cannot rename /var/lib/net-snmp/snmpapp.conf to /var/lib/net-snmp/snmpapp.0.conf
Cannot unlink /var/lib/net-snmp/snmpapp.conf
read_config_store open failure on /var/lib/net-snmp/snmpapp.conf
read_config_store open failure on /var/lib/net-snmp/snmpapp.conf
read_config_store open failure on /var/lib/net-snmp/snmpapp.conf

The lines starting with + are the debugging caused by the set -x. The last 6 lines of the output are benign in this case - it is because the zenoss user does not have access to /var/lib/net-snmp/snmpapp.conf . The script DOES work (if you run it as root, you won't get those last 6 lines but running as root is not a good idea).

You should see the TRAP in your event console.

Cheers,

Jane

Email: jane.curry@skills-1st.co.uk    Web: https://www.skills-1st.co.uk



< Previous
SSl configuration of zenoss
  Next
Problem with zenbackup
>