Hi all,
i would like to display the SNMP location field in the body of the email when the interface goes down.
So, i have created a dynamic group, added all the interfaces in to the group, created an advanced alert based on the group name and the group member status being down.
Now when i go to create the email contents, there is no built in variable available for the Node Location. So i have attempted to build my own SQL variable but it is not working...
This is what I have at the moment....
INTERFACE NAME: ${GroupMemberFullName}
STATUS: ${OperStatus}
DATE & TIME: ${DateTime}
SITE ADDRESS: ${SQL:Select nodes.location, interfaces.nodeid from nodes, interfaces where interfaces.nodeid = ${NodeID}}
However in the email the SITE ADDRESS is displayed like so...
SITE ADDRESS: ${SQL:Select nodes.location, interfaces.nodeid from nodes, interfaces where interfaces.nodeid = $@NodeID@}
Now... i did have this half working when i changed the SQL code to this...
${SQL:Select nodes.location, interfaces.nodeid from nodes, interfaces where interfaces.nodeid = nodes.nodeid}
which then displayed the below address... which is wrong...
SITE ADDRESS: 0KLT0, LYSANDER HOUSE TEMPSFORD HALL, SANDY, BEDFORDSHIRE
When i input that same query in to the solarwinds Database manager, the script displays every interface and its associated site address. Because the address above is the first address all the time, no matter what interface goes down, it always displays that same address.
So i guess i need to find a way to map the Interface ID to the Node ID & Node Location.
Can anyone help?
thanks
Mario