Hello Community,
I have created an alert to execute an NCM action, see below.
The dialog box states 'Results of this action will be stored in the $[Notes] variable'
Can someone tell me where I can find the $[Notes] variable?
Are you confident that conditions for firing the alert are being met and the credentials you're using to execute against the device are correct?
I believe if you're testing the alert, you may find that the script does not execute and you'll get a blank result.
I have an alert to notify when a Cisco device reboots and to execute an NCM action to do a 'show ver'. I've just tested against this and the script doesn't execute, or rather the ${Notes} value doesn't get populated.
If I reboot the same Cisco device, the alert fires and I get the NCM executed action in the ${Notes} field through in an email.
If you're not sure, verify the credentials in the NCM manager (the actual application on the server, not the web console) or run a session trace.
To run a session trace you'll need to turn this on in the NCM web console (Settings > NCM Settings > Advanced Settings and tick 'Enable Session Tracing').
Test or run the alert and then check the C:\Program Files (x86)\SolarWinds\Orion\NCM\Session-Trace folder
Don't forget to turn off session tracing once you've completed your testing!
I've inserted a notes variable, but nothing appears in the email
Put a space before the ${Notes}
Martin
Thanks for responding. I put a space as suggested and still nothing appears
Oh I see.
If that is the case I will compile an alert that will activate the script...
i will let you know...
I meant to include details about my alert for your reference:
On the Trigger Condition tab:
Trigger Alert when all of the following apply
Last Boot has changed
Vendor is equal to Cisco
On the Trigger Actions tab:
Execute the following Actions when the Alert is Triggered:
Execute an NCM action
Command Script to Execute: show ver
Send E-mail with message body containing:
Reboot details for Node ${NodeName} which rebooted at ${LastBoot}.
See below for switch details following reboot:
${Notes}
That's it. Obviously add the correct credentials for your device, email addresses and ensure the alert is enabled.
Just in case anyone comes across this conversation..
I was able to get this to work. The generic ${Notes} variable doesn't necessarily work as intended. You'd have to use the entire variable syntax to get the alert notes to show in your alert, be it email or some kind of integration.
The appropriate syntax is ${N=Alerting;M=Notes}
A good way to test this is to create an alert that points to a Production node and looks to see if it is Up. Set it to trigger immediately without any time constraints.
Create two different escalation levels in the Trigger Actions tab. Ensure the first escalation level is the NCM script execution job. You can just use "show version" as a command to be issued in the script; quick and easy for testing.
Separate the first escalation level from the first by 1 minute (or more, depending on how long your SolarWinds environment takes to issue commands on NCM nodes). Set the escalation level 2 action as the email.
**Make sure you include the full variable syntax that is in bold above in the area of your email that you'd like to display the output.**
This should work. Again, I came across this old discussion this morning looking for answers but didn't really find one that was concrete. Hopefully, my explanation helps you out, you awesome person!!
v/r,
Michael M.