solarwinds  |  thwack
in
Search 44,753 posts and 623 resources contributed by 21,540 members or post a topic.

Already Joined? Sign in
Orion 8.1 Advanced Alerting variable from other DB tables?

rated by 0 users
Not Answered This post has 0 verified answers | 7 Replies | 2 Followers


11 Posts
Points 30
AaronK posted on 06-13-2007 12:01 PM
rated by 0 users

I need to populate an advanced alert email with data from another table in the database.  For example, I have an advanced alert on a custom MIB poller for an APC UPS.  This alerts when the temp gets over 85 degrees in an IDF.  When it triggers, I want it to send an email that says "IDF b28-1 is 87 Degrees"  where "b28-1" is a value in ${Nodes.Closet} and the "87" is stored in ${CustomPollerStatus.Rate}

I can only seem to access data in the table holding the data that was alerted on.

 

How can I pull data from a different table in the database?
 

All Replies


67 Posts
Points 164
SolarWinds Employee
SteveSW replied on 06-13-2007 6:49 PM

Assuming closet is set up as a custom property Try ${SQL: select Closet from Nodes where NodeID = ${NodeID}} instead of ${Nodes.Closet}

 For a non-custom property like 'Location' you can use ${Node.Location}.

  • | Post Points: 5

25 Posts
Points 86
bashley replied on 06-14-2007 12:15 AM
rated by 0 users

I have tried the above mentioned SQL variable and wasn't able to get this to work.  For some reason, It did not like the embedded variable within the SQL variable and never worked.  I created a custome property for each node called Service and was able to access this field from within the email message using ${Node.Service}.  Even though this field was in the Nodes (plural) table, I was only able to access this value using the Node.Service macro variable.  If Closet is a custom property on Nodes, I would try ${Node.Closet} (singular) in the message.

  • | Post Points: 3

67 Posts
Points 164
SolarWinds Employee
SteveSW replied on 08-08-2007 4:29 PM
rated by 0 users

The SQL macro should work. I use it all the time. Make sure that you are including the colon and have a closing curly brace for each opening curly brace.

  • | Post Points: 3

99 Posts
Points 580
WINNT replied on 08-10-2007 3:28 PM
rated by 0 users

This actually works! 

  • | Post Points: 1

99 Posts
Points 580
WINNT replied on 09-15-2007 1:09 PM
rated by 0 users

I am running a SQL query in 8.5 and it is only returning the first result. Is anyone else experiencing this? 

  • | Post Points: 3

67 Posts
Points 164
SolarWinds Employee
SteveSW replied on 02-28-2008 12:34 PM
rated by 0 users

It is designed to only return the first record in the dataset. You should use the where clause to filter to the object you want. If you are interested in the number of records you would get you can get the count(*).

  • | Post Points: 1

7 Posts
Points 7
Tuchux replied on 07-11-2008 2:24 PM
rated by 0 users

Have you ever used a custom property within a Advanced Alert Trap??? I have created a custom Trap for Advanced Alerts and would like to include a custom Property field.

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