How to get message from log and/or OID into Alert

Hi

I need to rebuild a trap that sends a test SMS.
The trap is showing up in the log and I got it handled.
The SMS gets send but I don’t know how I can place the string from the trap into the SMS.

/usr/bin/snmptrap -c public  -v 1 ictlibrenmslk01 1.3.6.1.4.1.28116.20 10.5.72.30 6 1013 '' 1.3.6.1.4
.1.28116.20.10013 s "SMS Testalarm neu"
Timestamp Type Hostname Message User
2022-06-07 14:12:02 alert icticingalp01 Issued ok alert for rule ‘Spectrum Test SMS’ to transport ‘hawk’ System
2022-06-07 14:07:08 Spectrum Test SMS icticingalp01 SNMP Trap: Device icticingalp01 : SMS Testalarm neu System
2022-06-07 14:07:08 trap icticingalp01 FOUR-TUNE-MIB::spectrum#.1013 {“DISMAN-EVENT-MIB::sysUpTimeInstance”:“43:3:31:52.65”,“FOUR-TUNE-MIB::spTestSMSAlertMessage”:“SMS Testalarm neu”,“SNMP-COMMUNITY-MIB::snmpTrapAddress.0”:“10.5.72.30”,“SNMP-COMMUNITY-MIB::snmpTrapCommunity.0”:“public”,“SNMPv2-MIB::snmpTrapEnterprise.0”:“FOUR-TUNE-MIB::spectrum”} System

Alert Template:

{{ $alert->title }}
{{ $alert->hostname }} 
@foreach ($alert->faults as $key => $value)
  {{ $key }}: {{ $value['string'] }}
@endforeach

How do I get SMS Testalarm neu into the Alert Template?

Any ideas?
Thanks in advance

I don’t know, why $value['string'] is metioned in the documentation but $value['message'] isn’t.

This works:

{{ $alert->title }}
{{ $alert->hostname }} 
@foreach ($alert->faults as $key => $value)
  {{ $key }}: {{ $value['message'] }}
@endforeach

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.