This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Advanced Alert Reporting part 4: Creating an Acknowledge Link Where Once There Was None


We've arrived at the final installment of my technical deep-dive into advanced OrionRegistered web-based report techniques, which all started when a customer asked if I knew anyone who could help build an "impossible" feature for them.

Spoiler: it was neither impossible nor was it even a feature.

In my first post I introduced the whole concept (Advanced Reporting Part 1: Re-Creating the "All Alerts" Resource With Extras ). In the second (Advanced Reporting part 2: Making Web-Based Reports Do Your Bidding ), I showed how to add custom fields, such as "importance," to an existing report using the SolarWinds Query Language (SWQL). And in the third post (Advanced Alert Reporting part 3: Hyperlinks in Data Output ) I dug into ways to make data elements clickable by combining HTML with the SWQL output.

And here, in this last post, I'm going to show how to use those two techniques to add an Acknowledge option, so that a report showing the current active alerts can be used by NOC staff to also manage those alerts, in addition to simply listing them out.

As a reminder, I've already built this report and posted it to the Content Exchange (Report: All Active Alerts with Acknowledge action ), in case you'd like to use it as a starting point for your own custom reporting adventure.

Be Alert. The World Needs More Lerts.

When you look at the original "All Active Alerts" page in a standard Orion installation (here's an example from our live demo: ), there's a few things that you may notice about the "Acknowledge" item:

  1. It's modal—meaning it pops up on top of everything else
  2. It's interactive—you can add notes, set a permanent option not to be prompted, cancel out, etc.

...and, if you look at the underlying code on the Alerts.aspx page, you'll note that

  1. It's actually JavaScript.

Now I'm certain that some enterprising person could embed JavaScript into an Orion custom report. In fact, I challenge you readers to do so, and post your results to the THWACKRegistered product forums and the Content Exchange to share with everyone. But I'm a man who knows his limitations—both in terms of programming skill and the time I have to devote to this side project—so I'm going to go with an easier option: I'm going to use the "Acknowledge" link you can find in an email alert.

What? You've never set up an email alert with an embedded "acknowledge" link? Well let's rectify that situation right now.

First, create a new alert.


It doesn't really matter what we call it, and it doesn't even really matter what the alert triggers on, as long as it triggers at least once. The most important step is to set up an email alert and embed the acknowledge alert link variable.

<IMG email trigger action with acknowledge link>

Once it's done, I'll kick off that alert, receive the email, and see what that link looks like.


Let's SWQL One More Time

Now that I know what the link looks like, I have to go back to SWQL studio and see if I can find that link or at least a portion of it embedded SOMEWHERE. After just a bit of searching, I found it in the AlertObjects table, where there's an AlertDefID field that matches up with the tail-end of the standard alert URL "/Orion/Netperfmon/AckAlert.aspx?AlertDefID=".


By concatenating the AlertDefID onto the end of that URL, I'm in busine...

Hang on, it threw an error.


The issue here is that the URL is a word-based object (a "string" or "varchar" in in more technical parlance) but the AlertDefID is a numeric value. So, we need to convert them to match. Since you can't make words into numbers, we'll have to convert the AlertDefID number so that it's treated as a string:


The final field description would look like this:

'<A HREF="/Orion/Netperfmon/AckAlert.aspx?AlertDefID='+tostring(AlertObjects.AlertObjectID)+'" target="_blank">ClickToAck</a>' AS AcknowledgeIt

I'll add that to my SWQL statement, update it in the report definition, add the "AcknowledgeIt field to the report, and I have something that looks like this:


The Mostly Un-Necessary Summary

Throughout this series, I hope I've shown that seemingly challenging, "advanced" tasks are nothing more than the combining of relatively simple, common skills or bits of knowledge in new and creative ways. While every IT practitioner cannot be expected to have every combination of these techniques and concepts, what IS true is that you can take what you have now and think about how it can be re-used; and as you grow in your skills, knowledge, and experience, that base of creativity only grows.

But that's not all!

In my next post (which will appear over on GeekSpeak), I'll take an introspective turn, and talk about what I learned in all of this from a philosophical, rather than technical, point of view.

  • This was a great series Leon Adato Expert thanks for posting it. I'm working on some improvements to the All Alerts dashboard so I can have a notes section added.

  • THAT'S the best feedback I could possibly hope for - that this someone helped or just inspired folks to make something you have and use even better.

  • Good golly adatole​... Take a break for a minute, man! Breathe... Relax... Stop being so helpful already, it's only 7am! emoticons_mischief.png

    I really like the series you're doing here. Very informative, as well as useful. Thank you!

  • Your fourth post didn't disappoint, Cheers adatole​.

    I would caution the readers to ensure that their processes include a check of each alert before they are acknowledged via the magic link. Receipt of a notification and clicking the helpful link is not the same as taking ownership. You have to understand what you're taking responsibility for, as that's what acknowledging an alert does. This is especially important if your alerts have escalation rules applied!

  • As always, interesting, useful, and informative.  Leon, you never fail at your communication tasks.  One day, let the winds of change blow to help make us more like you.

  • Thanks for the article. Looking to use this in a slightly modified way. As we have multiple customers looking to reduce the alerts down to an individual customer so we can present just the relevant alerts to the customer's help desk.

  • @ Leon Adato

    Great series.

    I'm trying to make a similar dashboard, not to acknowledge the alert but to perform an alert action to make a ticket to our ticketing system after the NOC has reviewed the alert.

    My thought is if I can add another resource to the Active Alert Details page that lists the current alerts and lets you click it to make a ticket.

    There are a couple ways I can automagically make tickets today, one is a VBScript, the other is through email to what we call Mail Eater. Both work equally good.

    The page you created is very close to doing what I need, If I could change it from Acknowledge Alert to Create Email or Run Script.

    In your example I see you used the AckAlert.aspx in this line:

    '<A HREF="/Orion/Netperfmon/AckAlert.aspx?AlertDefID='+tostring(AlertObjects.AlertObjectID)+'" target="_blank">ClickToAck</a>' AS AcknowledgeIt,

    Any ideas on how I could change that line to run a script or send an email? I already have the code I need to execute or email to send as a custom property.

    Any help would be greatly appreciated!

  • I've managed to create the basis of the report I was trying to generate but I'm struggling to get this onto the NOC view. A quick search around the website suggests that there isn't an easy way to get the web based report onto the view. Given the deprecation of report writer this seems a bit of an oversight. I'm hoping I've just missed something long the way and there is an easy way of getting web based reports into a NOC view.

  • This series helped me out greatly in learning how to modify resources.