Hi All - First of all thanks for trying to help me out. We have a Customer owned SolarWinds Orion NPM 12.1 installation which is integrated to an upstream OSS aggregation solution via SNMP. We are leveraging a custom SNMP Alert Template to work around some of the contextualisation issues the default one OOTB provided by SolarWinds has. In the AlertMessage we are defining a custom message leveraging AlertVariable inserted into a Custom defined JSON format. The JSON Message which we have defined is pasted below:
<SNMPTrap>
<Application Name="SolarWinds SNMP Trap Engine" Version="1.0.28" Copyright="Copyright 1995-2003 SolarWinds.Net All rigths reserved." ReleaseDate="October 2003" TimeStamp="16-Sep-04 01:06 PM"></Application>
<Trap SourceHostname="" SourceIPAddress="" DestinationHostname="" DestinationIPAddress="" CommunityString="" DateTime="12:00:00 AM 12:00 AM">
<OIDs>
<OID OID="1.3.6.1.2.1.1.3.0" MIB="RFC1213-MIB" Name="sysUpTime.0" Value="0" DataType="67" ValueName="0" HexValue=""></OID>
<OID OID="1.3.6.1.6.3.1.1.4.1.0" MIB="SNMPv2-MIB" Name="snmpTrapOID.0" Value="1.3.6.1.4.1.11307.10" DataType="6" ValueName="SOLARWINDS-TRAPS" HexValue=""></OID>
<OID OID="1.3.6.1.6.3.1.1.4.3.0" MIB="SNMPv2-MIB" Name="snmpTrapEnterprise.0" Value="1.3.6.1.4.1.11307" DataType="6" ValueName="SolarWinds" HexValue=""></OID>
<OID OID="1.3.6.1.4.1.11307.10.1" MIB="SNMPv2-SMI" Name="enterprises.11307.10.1" Value="${AlertMessage}" DataType="4" ValueName="${AlertMessage}" HexValue=""></OID>
<OID OID="1.3.6.1.4.1.11307.10.2" MIB="SNMPv2-SMI" Name="enterprises.11307.10.2" Value="${Node.Caption}" DataType="4" ValueName="${Node.Caption}" HexValue=""></OID>
<OID OID="1.3.6.1.4.1.11307.10.3" MIB="SNMPv2-SMI" Name="enterprises.11307.10.3" Value="${Node.IP_Address}" DataType="4" ValueName="${Node.IP_Address}" HexValue=""></OID>
<OID OID="1.3.6.1.4.1.11307.10.4" MIB="SNMPv2-SMI" Name="enterprises.11307.10.4" Value="${Node.NodeID}" DataType="4" ValueName="${Node.NodeID}" HexValue=""></OID>
<OID OID="1.3.6.1.4.1.11307.10.5" MIB="SNMPv2-SMI" Name="enterprises.11307.10.5" Value="${ObjectName}" DataType="4" ValueName="${ObjectName}" HexValue=""></OID>
<OID OID="1.3.6.1.4.1.11307.10.6" MIB="SNMPv2-SMI" Name="enterprises.11307.10.6" Value="${ObjectType}" DataType="4" ValueName="${ObjectType}" HexValue=""></OID>
<OID OID="1.3.6.1.4.1.11307.10.7" MIB="SNMPv2-SMI" Name="enterprises.11307.10.7" Value="${NetObjectID}" DataType="4" alueName="${NetObjectID}" HexValue=""></OID>
</OIDs>
</Trap>
</SNMPTrap>
Customizations:
<OID OID="1.3.6.1.4.1.11307.10.2" MIB="SNMPv2-SMI" Name="enterprises.11307.10.2" Value="${Node.Caption}" DataType="4" ValueName="${Node.Caption}" HexValue=""></OID>
<OID OID="1.3.6.1.4.1.11307.10.5" MIB="SNMPv2-SMI" Name="enterprises.11307.10.5" Value="${ObjectName}" DataType="4" ValueName="${ObjectName}" HexValue=""></OID>
ALERT TRIGGER:
{
"AlertID":"${N=Alerting;M=AlertID}",
"Severity":"${N=Alerting;M=Severity}",
"DateTime":"${N=Alerting;M=AlertTriggerTime}",
"AlertTriggerCount":"${N=Alerting;M=AlertTriggerCount}",
"AlertName":"${N=Alerting;M=AlertName}",
"AlertMessage":"${N=Alerting;M=AlertMessage}",
"AlertDescription":"${N=Alerting;M=AlertDescription}"
}
ALERT RESET:
{
"AlertID":"${N=Alerting;M=AlertID}",
"Severity":"${N=Alerting;M=Severity}",
"DateTime":"${N=Alerting;M=AlertTriggerTime}",
"AlertTriggerCount":"${N=Alerting;M=AlertTriggerCount}",
"AlertName":"${N=Alerting;M=AlertName}",
"AlertMessage":"${N=Alerting;M=AlertMessage}",
"AlertDescription":"${N=Alerting;M=AlertDescription}",
"AlertReset":"1"
}
We have done the testing of the integration in our test installation and everything is found to be working as expected. But I believe, there is a dependency of some sought on the installation environment, the OS level configuration which determines the format of DateTime and AlertTriggerTime. From the Customer Instance, the SNMP Trap message received has the below DateTime format, which is not compliant with the expected DateTime format.
Customer Installation DateTime Format
sysUpTime=0.00 second
snmpTrapOID=SOLARWINDS-PRODUCTS:SolarWinds.10
snmpTrapEnterprise=SOLARWINDS-PRODUCTS:SolarWinds
SolarWinds.10.1={
"AlertID":"567",
"Severity":"Critical",
"DateTime":"Wednesday, October 31, 2018 12:40 PM",
"AlertTriggerCount":"2",
"AlertName":"WLC - Interface Down",
"AlertMessage":"WLC Interface Down",
"AlertDescription":""
}
SolarWinds.10.2=XXXXXXXXX
SolarWinds.10.3=XX.XX.XX.XXX
SolarWinds.10.4=5055
SolarWinds.10.5=Unit: 0 Slot: 0 Port: 1 Gigabit - Level 0x6070001 - GigabitEthernet0/0/1
SolarWinds.10.6=Interface
SolarWinds.10.7=44046
From our test installation the below is what I'm seeing. The DateTime and AlertTriggerTime format is in lines with the expectation.
The expected format is "dd Month YYYY HH:MM" a sample value being "05 November 2017 16:08". We have tried leveraging the formatter "F=" options in the AlertVariable, nothing seems to work. To me, there seems to be 2 ways out:-
1. Some configuration change has to be done at the OS level, either at Control Panel or in the Registry. Not sure what exactly will have to be done to accomplish the above format outcome.
2. Define a Custom SQL/SWQL variable to format the output from "${N=Alerting;M=AlertTriggerCount}" or Orion.Alerts Entity. But the problem we are running into here is month doesn't come out like "November", instead it comes out as a numerical value of 11 and CASE statements THEN clause expects a Integer I believe.
Any help to fix this issue will be highly appreciated. Currently due to this format issue, the integration is failing and we had to STOP the inflow of SNMP Traps into our OSS solution, reducing visibility of operations team to real-time Network faults.
Thank you.
Regards,
Sriraj M