When alarms are forwarded as traps for rule WebMonitor Transaction Availability Check, the trap is incomplete and missing the fgAgentTypeName / AgentType field.
Enabling debug logging in the Foglight Management Server (FMS) shows that objects 1.3.6.1.4.1.7572.1.4.2 (AgentTypeOID) and 1.3.6.1.4.1.7572.1.4.4 (AgentNameOID) are are blank:
DEBUG [Action-5-thread-9] com.quest.nitro.service.action.impl.fgltrap.FoglightTrapSender - Sending v2 trap TRAP[requestID=0, errorStatus=Success(0), errorIndex=0, VBS[1.3.6.1.2.1.1.3.0 = 0:00:00.00; 1.3.6.1.6.3.1.1.4.1.0 = 1.3.6.1.4.1.7572.1.4.60; 1.3.6.1.4.1.7572.1.4.1 = Service is not available. Cannot access the URL https://hostname.yourdomain.com.; 1.3.6.1.4.1.7572.1.4.2 = ; 1.3.6.1.4.1.7572.1.4.3 = ; 1.3.6.1.4.1.7572.1.4.4 = ; 1.3.6.1.4.1.7572.1.4.5 = f149282b-0ef6-472b-8f6d-9b1c19dfce53; 1.3.6.1.4.1.7572.1.4.6 = WebMonitor Transaction Availability Check; 1.3.6.1.4.1.7572.1.4.7 = 2c8c54c1-ee85-40bd-b388-66ed1d9549cd; 1.3.6.1.4.1.7572.1.4.8 = https://hostname.yourdomain.com; 1.3.6.1.4.1.7572.1.4.9 = 4; 1.3.6.1.4.1.7572.1.4.10 = ; 1.3.6.1.4.1.7572.1.4.11 = ; 1.3.6.1.4.1.7572.1.4.12 = ; 1.3.6.1.4.1.7572.1.4.13 = https://foglight.yourdomain.com:8443/aui/alarm-details/a3d69af5-f182-4f78-814d-8f7ed825dc6d; 1.3.6.1.4.1.7572.1.4.14 = DATE]] to target CommunityTarget[address=TRAP_TARGET_ADDRESS/TRAP_TARGET_PORT,version=1,timeout=1500,retries=2,securityLevel=1,securityModel=1,securityName=public,preferredTransports=null]
The SNMP Trap action is not able to retrieve the monitoringAgent property from the alarm event because the property for the EUWebMonitorTransactionMetrics topology type is a dynamic property and time range sensitive.
WORKAROUND
Option 1:
If only the agent type name is required, a static value for the agent type can be configured for a copy of the SNMP Trap rule that only forwards traps for the WebMonitor alarms.
!@event.get("isCleared") && !@event.get("isAcknowledged") && @event.get("ruleName").equals("WebMonitor Transaction Availability Check")
F5WebMonitorAgent.
Option 2:
If the agent name is required, the values need to be retrieved dynamically from the event using expression variables.
eventAgentType with the Expression/Messages set to:
def endTime = new Date();
def startTime = new Date(endTime.time - 3600000);
def str = new com.quest.wcf.data.wcfdo.SpecificTimeRange(startTime, endTime, -1, 1000, endTime);
topObj = server.TopologyService.getObject(@event.get("topologyObjectID"));
agent = topObj?.get("monitoringAgent", str);
return agent?.getType()?.getName();
@eventAgentType.eventAgentName, use the same expression as in step (3) but replace line 6 in with return agent?.getName() then set the AgentNameValue parameter of the SNMP Trap action to the name of the variable @eventAgentName.
STATUS
This has been logged as defect Id. FOG-12311 and is waiting for a fix in a future release of Foglight.