Page 3 of 4
Re: Issue with Receiving SNMP Traps
Posted: Thu Nov 17, 2016 5:08 pm
by Box293
There might be two things going on here. When your service says
OK: No data received yet. this is most likely the freshness checks resetting the state of the service. More information on that is here:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
What we need to know, when the trap is received, what log file is the trap recorded in? snmptt.log or snmpttunknown.log and what is logged?
Re: Issue with Receiving SNMP Traps
Posted: Thu Nov 17, 2016 5:08 pm
by ssax
Is this a new issue or related to the original issue?
Are they showing up in
Admin > Unconfigured Objects?
Are they still showing up in the
/var/log/snmpttunknown.log?
Are you using check freshness on your service?
https://assets.nagios.com/downloads/nag ... hness.html
The
No data received yet. message is likely from the freshness check that resets it, please post the output of this command:
Code: Select all
grep -R 'No data received' /usr/local/nagios/etc/*
Please open your
/usr/local/nagios/var/objects.cache and find the service in question, please paste the entire service configuration so that we can review it.
Thank you
Re: Issue with Receiving SNMP Traps
Posted: Thu Nov 17, 2016 6:04 pm
by msmulpuri
Below is the output for the requested command. Hope this helps.
grep -R 'No data received' /usr/local/nagios/etc/*
/usr/local/nagios/etc/hosttemplates.cfg: check_command check_dummy!
0!"No data received yet."
/usr/local/nagios/etc/servicetemplates.cfg: check_command chec
k_dummy!0!"No data received yet."
/usr/local/nagios/etc/servicetemplates.cfg: check_command chec
k_dummy!0!"No data received yet."
Is this a new issue or related to the original issue? - This is not a new issue.
Are they showing up in Admin > Unconfigured Objects? They were earlier for the new hosts added in Nagios Sending Server.
Are they still showing up in the /var/log/snmpttunknown.log? - They no longer show up in this log.
Are you using check freshness on your service? - Not sure. How do I check this?
Please open your /usr/local/nagios/var/objects.cache and find the service in question, please paste the entire service configuration so that we can review it.
define host {
host_name 192.168.1.10
alias 192.168.1.10
address 192.168.1.10
check_period xi_timeperiod_24x7
check_command check_dummy!0!"No data received yet."
contacts nagiosadmin
notification_period xi_timeperiod_24x7
initial_state o
importance 0
check_interval 5.000000
retry_interval 1.000000
max_check_attempts 5
active_checks_enabled 0
passive_checks_enabled 1
obsess 1
event_handler_enabled 1
low_flap_threshold 0.000000
high_flap_threshold 0.000000
flap_detection_enabled 1
flap_detection_options a
freshness_threshold 0
check_freshness 0
notification_options a
notifications_enabled 1
notification_interval 60.000000
first_notification_delay 0.000000
stalking_options n
process_perf_data 1
icon_image passiveobject.png
statusmap_image passiveobject.png
retain_status_information 1
retain_nonstatus_information 1
_XIWIZARD passiveobject
}
I can attach the entire cache file if needed.
Re: Issue with Receiving SNMP Traps
Posted: Thu Nov 17, 2016 6:08 pm
by msmulpuri
Here is the more appropriate from the cache file.
define service {
host_name 192.168.1.10
service_description SNMP Trap - Current Load
check_period xi_timeperiod_24x7
check_command check_dummy!0!"No data received yet."
contacts nagiosadmin
notification_period xi_timeperiod_24x7
initial_state o
importance 0
check_interval 1.000000
retry_interval 1.000000
max_check_attempts 1
is_volatile 0
parallelize_check 1
active_checks_enabled 0
passive_checks_enabled 1
obsess 1
event_handler_enabled 1
low_flap_threshold 0.000000
high_flap_threshold 0.000000
flap_detection_enabled 0
flap_detection_options a
freshness_threshold 0
check_freshness 0
notification_options a
notifications_enabled 1
notification_interval 60.000000
first_notification_delay 0.000000
stalking_options n
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
_XIWIZARD passiveobject
}
Re: Issue with Receiving SNMP Traps
Posted: Fri Nov 18, 2016 11:19 am
by ssax
Please run this command and send me the resulting
/tmp/snmpfiles.zip file:
Code: Select all
zip -r /tmp/snmpfiles.zip /etc/snmp
Do you see them going into your
/usr/local/nagios/var/nagios.log?
Re: Issue with Receiving SNMP Traps
Posted: Fri Nov 18, 2016 11:59 am
by msmulpuri
Please find the attached. I don't see them written to the nagios.log
Re: Issue with Receiving SNMP Traps
Posted: Fri Nov 18, 2016 12:07 pm
by ssax
Try restarting snmptt:
Send the output of these commands:
Code: Select all
ls -l /usr/sbin/snmptthandler
ls -l /usr/local/bin/snmptraphandling.py
ls -ld /usr/local/bin
Please run this tail command:
Let the tail command run, generate some traps, and send me the entire output.
Thank you
Re: Issue with Receiving SNMP Traps
Posted: Fri Nov 18, 2016 3:59 pm
by msmulpuri
Below is what I have gathered per your request. It is does not make sense why the log file does not update anything which is why we are seeing the "No data received yet". I let that tail command run for quite some time but no updates.
[root@DevMon ~]# ls -l /usr/sbin/snmptthandler
-rwxr-xr-x. 1 root root 6493 Oct 22 2012 /usr/sbin/snmptthandler
[root@DevMon ~]# ls -l /usr/local/bin/snmptraphandling.py
-rwxr-xr-x. 1 root root 2451 Oct 4 16:34 /usr/local/bin/snmptraphandling.py
[root@DevMon ~]# ls -ld /usr/local/bin
drwxr-xr-x. 2 root root 4096 Dec 1 2011 /usr/local/bin
[root@DevMon ~]# tail -fn0 /var/log/snmptt/*
==> /var/log/snmptt/snmptt.log <==
==> /var/log/snmptt/snmptt.log-20161016 <==
==> /var/log/snmptt/snmptt.log-20161102 <==
==> /var/log/snmptt/snmptt.log-20161106 <==
==> /var/log/snmptt/snmptt.log-20161113 <==
==> /var/log/snmptt/snmpttsystem.log <==
==> /var/log/snmptt/snmpttsystem.log-20161023 <==
==> /var/log/snmptt/snmpttsystem.log-20161101 <==
==> /var/log/snmptt/snmpttsystem.log-20161106 <==
==> /var/log/snmptt/snmpttsystem.log-20161115 <==
==> /var/log/snmptt/snmpttunknown.log <==
==> /var/log/snmptt/snmpttunknown.log-20161016 <==
==> /var/log/snmptt/snmpttunknown.log-20161023 <==
==> /var/log/snmptt/snmpttunknown.log-20161030 <==
==> /var/log/snmptt/snmpttunknown.log-20161106 <==
Re: Issue with Receiving SNMP Traps
Posted: Mon Nov 21, 2016 1:24 pm
by ssax
Let's move this into a ticket, please email
[email protected] with a descriptive subject and detailed body and please include a link back to this thread so that we can get a remote session setup.
Thank you
Re: Issue with Receiving SNMP Traps
Posted: Mon Nov 21, 2016 1:31 pm
by msmulpuri
Just sent the e-mail as per your request. Please help.