Hi,
I have defined trap (In "add a Trap-definition", on UI) as below:
Trap Details:
Event Name: Alarm_1
OID: .1.x.x.x.x.x.x.x.x.1.7.1.0.1
Category: XEventNotify
Severity: Critical
Description: The Trap is related to Alarm_1
Passive Service Setup:
Enable Passive Service Setup
Host Name: $1
Service Description: Alarm_1
Severity: Critical
Service Output: Received trap from Host: $1 with Alarm: $N at Time: $5 with severity: $7 and Category: $10
Exec: /usr/local/bin/snmptraphandling.py "$0" "Alarm_1" "$s" "$@" "$-*" "The SNMP trap that is generated as a result of an event with the service $*" MATCH $9:Fault MATCH $N:ETH_LOS MATCH MODE=and
and I have defined for recovery state of the alarm as below:
Trap Details:
Event Name: Alarm_1_cleared
OID: .1.x.x.x.x.x.x.x.x.1.7.1.0.1
Category: XEventNotify
Severity: Normal
Description: The Trap is related to Alarm_1 when has been cleared
Passive Service Setup:
Enable Passive Service Setup
Host Name: $0
Service Description: Alarm_1
Severity: OK
Service Output: Received trap from Host: $0 with Alarm: $N at Time: $5 with severity: $7 and Category: $10
Exec: /usr/local/bin/snmptraphandling.py "$0" "Alarm_1" "$s" "$@" "$-*" "The SNMP trap that is generated as a result of an event with the service $*" MATCH $9:Recovery MATCH $N:ETH_LOS MATCH MODE=and
but when I checked "snmptt.conf.nxti", the trap is as below:
Code: Select all
EVENT Alarm_1 .1.x.x.x.x.x.x.x.x.1.7.1.0.1 "XEventNotify" Critical
FORMAT Received trap "$N" with variables "$+*"
EXEC php /usr/local/nagiosxi/scripts/nxti.php --event_name="$N" --event_oid="$i" --numeric_oid="$o" --symbolic_oid="$O" --community="$C" --trap_hostname="$R" --trap_ip="$aR" --agent_hostname="$A" --agent_ip="$aA" --category="$c" --severity="$s" --uptime="$T" --datetime="$x $X" --unixtime="$@" --bindings="$+*"
EXEC /usr/local/bin/snmptraphandling.py "$0" "Alarm_1" "$s" "$@" "" "Received trap from Host: $1 with Alarm: $N at Time: $5 with severity: $7 and Category: $10"
EXEC /usr/local/bin/snmptraphandling.py "$0" "Alarm_1" "$s" "$@" "$-*" "The SNMP trap that is generated as a result of an event with the service $*" MATCH $9:Fault MATCH $N:Alarm_1 MATCH MODE=and
SDESC
The Trap is related to Alarm_1
EDESC
and:
Code: Select all
EVENT ETH_LOS_Cleared .1.3.6.1.4.1.2011.2.15.1.7.1.0.1 "hwNmNorthboundEventNotify" Normal
FORMAT Received trap "$N" with variables "$+*"
EXEC php /usr/local/nagiosxi/scripts/nxti.php --event_name="$N" --event_oid="$i" --numeric_oid="$o" --symbolic_oid="$O" --community="$C" --trap_hostname="$R" --trap_ip="$aR" --agent_hostname="$A" --agent_ip="$aA" --category="$c" --severity="$s" --uptime="$T" --datetime="$x $X" --unixtime="$@" --bindings="$+*"
EXEC /usr/local/bin/snmptraphandling.py "$0" "Alarm_1" OK $@ "" "Received trap from Host: $1 with Alarm: $N at Time: $5 with severity: $7 and Category: $10"
EXEC /usr/local/bin/snmptraphandling.py "$0" "Alarm_1" "$s" "$@" "$-*" "The SNMP trap that is generated as a result of an event with the service $*" MATCH $9:Recovery MATCH $N:Alarm_1 MATCH MODE=and
SDESC
The Trap is related to Alarm_1 has been cleared
EDESC
Note: Alarm_1 is a service too (service_1)
And snmptt.conf.nxti is not edited by hand, when edit it , after restart snmptt.service, it comeback to previous configuration.
And also Match statements don't work, because I add it in "Additional Raw Data" field of "Add a Trap Definition", it is shown as below and don't work:
Code: Select all
EVENT Alarm_1 .1.x.x.x.x.x.x.x.x.1.7.1.0.1 "XEventNotify" Critical
FORMAT Received trap "$N" with variables "$+*"
EXEC php /usr/local/nagiosxi/scripts/nxti.php --event_name="$N" --event_oid="$i" --numeric_oid="$o" --symbolic_oid="$O" --community="$C" --trap_hostname="$R" --trap_ip="$aR" --agent_hostname="$A" --agent_ip="$aA" --category="$c" --severity="$s" --uptime="$T" --datetime="$x $X" --unixtime="$@" --bindings="$+*"
EXEC /usr/local/bin/snmptraphandling.py "$0" "Alarm_1" "$s" "$@" "" "Received trap from Host: $1 with Alarm: $N at Time: $5 with severity: $7 and Category: $10"
EXEC /usr/local/bin/snmptraphandling.py "$0" "Alarm_1" "$s" "$@" "$-*" "The SNMP trap that is generated as a result of an event with the service $*"
MATCH $9:Fault^M
MATCH $N:Alarm_1^M
MATCH MODE=and
"^M" is added when I press Enter key.( even it don't work as follow: MATCH $9:Fault MATCH $N:Alarm_1 MATCH MODE=and )
And now I'm not able to delete it ( MATCH statemnets) via GUI.
Would you please tell me How I can use snmptt.conf instead of snmptt.conf.nxti to be able edit traps as hand-edit.
when upload MIB by SNMPTT (not SNMP Trap Interface), there is "This trap definition is being managed by NXTI" on top of each trap.
Thanks