Nagios - 4.0.7
OS - Redhat Enterprise 5.9
SNMPTT - v1.4beta2
I have just installed SNMPTT on my Test Nagios server and wish to use it to reiceve snmptraps and pass them into Nagios. As far as I can see I have set up everything correctly but I am not seeing the alerts coming into Nagios. The Traps do arrive in the Nagios server in the snmptt.log
Here are the log entries in /var/log/snmp/snmptt.log
Code: Select all
[root@PSVUK2LNAC002 snmptt]# cat snmptt.log.2
Wed Oct 15 10:52:49 2014 .1.3.6.1.4.1.24117.1.2.0.99 Normal "Status Events" sqlhost - This is a test message triggered from the Idera SQLdm product for Microsoft SQL Server. This is a test SNMP Trap from the SQLdm product.
Wed Oct 15 10:56:11 2014 .1.3.6.1.4.1.24117.1.2.0.99 Normal "Status Events" sqlhost - This is a test message triggered from the Idera SQLdm product for Microsoft SQL Server. This is a test SNMP Trap from the SQLdm product.
Code: Select all
traphandle default /usr/sbin/snmptt
disableAuthorization yes
donotlogtraps yes
db-hosts.cfg
Code: Select all
define host{
host_name sqlhost
use sql_hosts
alias sqlhost
address sqlhost
passive_checks_enabled 1
}
/usr/local/nagios/etc/objects/services.cfg
Code: Select all
define service{
name SNMP_TRAP
use base-service
service_description SNMP_TRAP
process_perf_data 0
obsess_over_service 0
notifications_enabled 0
flap_detection_enabled 0
is_volatile 1
max_check_attempts 1
normal_check_interval 1
retry_check_interval 1
contact_groups admins
icon_image snmp.png
icon_image_alt SNMP
register 0
}
Code: Select all
define service{
use SNMP_TRAP
name TRAP
service_description TRAP
host_name sqlhost
check_command check-host-alive
active_checks_enabled 0
passive_checks_enabled 1
check_period 24x7
notification_interval 31536000
notification_period 24x7
notification_options w,u,c
notifications_enabled 1
}
Code: Select all
[General]
snmptt_system_name = nagios
mode = standalone
multiple_event = 1
dns_enable = 1
strip_domain = 1
strip_domain_list = <<END
domain.com
END
resolve_value_ip_addresses = 0
net_snmp_perl_enable = 0
net_snmp_perl_cache_enable = 1
net_snmp_perl_best_guess = 2
translate_log_trap_oid = 0
translate_value_oids = 1
translate_enterprise_oid_format = 1
translate_trap_oid_format = 1
translate_varname_oid_format = 1
translate_integers = 1
mibs_environment = ALL
wildcard_expansion_separator = " "
allow_unsafe_regex = 0
remove_backslash_from_quotes = 0
dynamic_nodes = 0
description_mode = 0
description_clean = 1
threads_enable = 0
threads_max = 10
[DaemonMode]
daemon_fork = 1
daemon_uid = snmptt
pid_file = /var/run/snmptt.pid
spool_directory = /var/spool/snmptt/
sleep = 5
use_trap_time = 1
keep_unlogged_traps = 1
duplicate_trap_window = 0
[Logging]
stdout_enable = 0
log_enable = 1
log_file = /var/log/snmptt/snmptt.log
log_system_enable = 1
log_system_file = /var/log/snmptt/snmpttsystem.log
unknown_trap_log_enable = 0
unknown_trap_log_file = /var/log/snmptt/snmpttunknown.log
statistics_interval = 0
syslog_enable = 0
syslog_facility = local0
syslog_level_debug = <<END
END
syslog_level_info = <<END
END
syslog_level_notice = <<END
END
syslog_level_warning = <<END
END
syslog_level_err = <<END
END
syslog_level_crit = <<END
END
syslog_level_alert = <<END
END
syslog_level = warning
syslog_system_enable = 1
syslog_system_facility = local0
syslog_system_level = warning
[Exec]
exec_enable = 1
pre_exec_enable = 1
unknown_trap_exec =
unknown_trap_exec_format =
exec_escape = 1
[Debugging]
DEBUGGING = 0
DEBUGGING_FILE = /var/log/snmptt/snmptt.debug
DEBUGGING_FILE_HANDLER = /var/log/snmptt/snmptthandler.debug
[TrapFiles]
snmptt_conf_files = <<END
/etc/snmp/snmptt.conf
END
Cheers
Tom