Search 85,812 posts and 651 resources contributed by 43,484 members or post a topic.

Already Joined? Sign in
Send alert variables from database to another program

Page 1 of 1 (9 items) | RSS

rated by 0 users
Answered (Verified) This post has 1 verified answer | 8 Replies | 3 Followers | 585 Views


93 Posts
Points 1,108
dhardy posted on Wed, Jun 24 2009 10:22 AM
rated by 0 users

I'm trying to integrate Orion's alerting system with AlarmPoint. This can easily be done by writing scripts and executing the scripts via command line and sending over the variables. The command line variabls need to be dynamic like the dynamic variable entries you can insert into email. I find that the only reasonable way to do this is to write the alert to system event or to file and extract those variables for insertion into AlarmPoint.

Has anyone done an integration with AlarmPoint?

Anyone know how I'd go about getting these dynamic variables sent over to AlarmPoint?

Answered (Verified) Verified Answer


58 Posts
Points 237
SolarWinds Certified Professional
Answered (Verified) ljenkins replied on Thu, Jun 25 2009 3:57 PM
Verified by dhardy

Ok, the batch file won't have access to your NPM variables...

What you'd want to do is put in your actual command to execute command

\path\to\bath\file.bat "${Status}" etc.

Then the batch would be

apclient --map-data Orion dhardy "%1" etc.

Or better yet, just skip the batch file and call the command directly from the execute program line...

\path\to\apclient --map-data Orion dhardy "${Status}" "${Caption}" "${IAF}" "${IP_Address}" "${TYPE}" "${Coop}" "${Address}" "${Caption} is ${Status

  • | Post Points: 23

All Replies


58 Posts
Points 237
SolarWinds Certified Professional
ljenkins replied on Thu, Jun 25 2009 10:12 AM
rated by 0 users

It shouldn't really be any different from inserting variables into e-mails.  Here's a command I use in a script:

c:\curl-7.19.5\curl.exe --basic --user "user:password" --data-ascii "status=Reset: ${NodeName} is now ${Status}. Outage lasted from ${TimeOfOutage} to ${DateTime}." "http://twitter.com/statuses/update.json"

All the variables seem to work exactly the same in command line as in the e-mail action.

  • | Post Points: 3

93 Posts
Points 1,108
dhardy replied on Thu, Jun 25 2009 10:21 AM
rated by 0 users

Are you just having Orion run an external program pointing to a batch file that executes that command. I was trying to do that, but my ${NodeName} ect. don't populate with the value. What step am I missing here?

  • | Post Points: 3

58 Posts
Points 237
SolarWinds Certified Professional
ljenkins replied on Thu, Jun 25 2009 11:50 AM
rated by 0 users

Not doing anythnig special.

Just an advanced alert, execute external program, with the command line listed above.

I'd think it'd work with basic alerts also, but haven't tested.

V9.5 SP1, but also worked with V9.1

  • | Post Points: 3

93 Posts
Points 1,108
dhardy replied on Thu, Jun 25 2009 1:14 PM
rated by 0 users

Weird. I don't know what I'm doing wrong. I'm making Orion execute a batch file that reads:

apclient --map-data Orion dhardy "${Status}" "${Caption}" "${IAF}" "${IP_Address}" "${TYPE}" "${Coop}" "${Address}" "${Caption} is ${Status}"

but I'm not getting the results I'm looking for. I just get returned the same information I input there, and nothing from the database.

  • | Post Points: 3

58 Posts
Points 237
SolarWinds Certified Professional
ljenkins replied on Thu, Jun 25 2009 3:36 PM
rated by 0 users

That's the command in the execute external program?  Or that's the batch file?

  • | Post Points: 3

93 Posts
Points 1,108
dhardy replied on Thu, Jun 25 2009 3:45 PM
rated by 0 users

That's the command in the batch file. apagent is the external application. It forwards the individual values I want to extract out of Orion to a scripting application in which I've written a script to construct an email with the variables I send over. What I write in the batch file is what show's up in the email though.

The only way I've been able to get the variables sent over to the application correctly is by creating an action to write to file the batch script and using the variable statements there, and a secondary action shortly after to execute the batch file.

  • | Post Points: 3

58 Posts
Points 237
SolarWinds Certified Professional
Answered (Verified) ljenkins replied on Thu, Jun 25 2009 3:57 PM
Verified by dhardy

Ok, the batch file won't have access to your NPM variables...

What you'd want to do is put in your actual command to execute command

\path\to\bath\file.bat "${Status}" etc.

Then the batch would be

apclient --map-data Orion dhardy "%1" etc.

Or better yet, just skip the batch file and call the command directly from the execute program line...

\path\to\apclient --map-data Orion dhardy "${Status}" "${Caption}" "${IAF}" "${IP_Address}" "${TYPE}" "${Coop}" "${Address}" "${Caption} is ${Status

  • | Post Points: 23

93 Posts
Points 1,108
dhardy replied on Thu, Jun 25 2009 5:22 PM
rated by 0 users

Thanks a lot man. I went with your second suggestion there and it works perfectly. I was making it really difficult.

  • | Post Points: 1
Page 1 of 1 (9 items) | RSS

© 2003 - 2010 SolarWinds, Inc. All Rights Reserved.

Who is SolarWinds?

SolarWinds is rewriting the rules for how companies manage their networks. Guided by a global community of network engineers, SolarWinds develops simple and powerful network management software and network monitoring software for networks of all sizes. SolarWinds also offers a network certification program to become a SolarWinds Certified Professional (SCP).

What is thwack?

thwack, SolarWinds online community site, was designed by network engineers, for network engineers. thwack is a vibrant, growing community of more than 30,000 IT pros who share a passion for technology.

Explore Resources, Answers, Templates, and Advice

Download Free Networking Tools


Learn More About SolarWinds Products