Quantcast
Channel: THWACK: Discussion List - All Communities
Viewing all articles
Browse latest Browse all 16365

Help with some custom SQL Alerts?

$
0
0

Howdy!

 

Solarwinds support directed me here for assistance. I'm looking to do some custom alerts for my company; and admittedly I'm not very skilled with SQL. I was hoping someone could help me out, or at least point me in the right direction.


I've attached some pseudocode and explanations for what I'm trying to do in these alerts.

 

 

 

1.An alert that checks both an interface's Interface Status and Administrative Status; and returns the status of whichever of the two triggered the alert in the email. Basically, I'm trying to avoid having an alert that says "P1 CRITICAL ALARM - The eth0.0 interface on the production firewall is UP." because the administrative status is shutdown.


IF ${Interface.Status}=DOWN

     ${Combined.Status}="is down"

ELSE IF $(Interface.Status}=UNPLUGGED

     ${Combined.Status}="has been unplugged"

ELSE IF ${Administrative.Status}=SHUTDOWN

     ${Combined.Status}="has been administratively shutdown"


Alert Text: The ${InterfaceName} on ${NodeName} ${Combined.Status}. The current state for the node itself is ${Node.Status}. Please investigate ASAP.


2.This is an attempt to narrow down the target for an alert overall. Right now we have a number of alerts that trigger for all devices (EX: Node is Down); however the Backups team doesn't need to know when a monitoring server goes down. We have a custom value, "Department_Name" which dictates the owner of the device; I'd like to be able to determine recipients for email alerts based on that field, rather than configuring 12 separate individual alerts for "Node is Down", and another 12 for "CPU Usage Critical", etc.


IF ${Department_Name}=NETWORK

     Alert To Field: network@company.com

ELSE IF ${Department_Name}=TOOLS

     Alert To Field: tools@company.com

ELSE IF etc...


3.Similar to the above, we're trying to reduce the non-actionable items we get in our inboxes every day. This logic would configure two different sets of actions based on two different thresholds; only sending an email if the CPU Load was critical, yet still generating an NPM event in both a critical and warning state.


IF ${CPULoad}>90

     Generate Email Alert AND Generate NPM Event

ELSE IF ${CpuLoad}>75 AND ${CpuLoad}<91

     Generate NPM Event


Thanks in advance for your help!

 


Viewing all articles
Browse latest Browse all 16365

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>