cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 7

Going NUTS part 2 - Component Monitor Output Data

I'm sure the bulk of my issues are rooted in the fact I've jumped into Solarwinds with both feet AFTER the system was put in place and I've not had any formal training.  That being said, I feel like the issues/questions I keep coming up with revolve around deeper functionality within Solarwinds not covered by the training videos I've seen  which are done at a higher level like the basics of managing a node or creating a node status alert and, they don't answer the deep questions I keep encountering.  However, maybe I'm wrong and I'm just an idiot...lol.  If someone can point me in the right direction for more complex issues, I'd REALLY appreciate it.  So, onto my current question...

The person who set up our install created a SAM Application Monitor where a Perl script is looking at various services on a Linux box (Using component Type Linux/Unix Script Monitor) and simply returning a 0 (up) or 1 (down).  However, for the life of me, I cannot find a way to trigger on that value.  Does it store it in the Status field? Statistic Data? Are the other values created in the Application Monitor and Component Monitor also accessible from the Alert Manager?  I've created a test alert sending the resulting trigger action email to myself and I've included SOOOOO many of the available values from the Alert Manager but none of them are resulting in the values I'm seeing in the fields populated when building the two monitors.  So far, using the trigger condition Component - Statistic Data (Component Alerting Properties) is not equal to 0, I've tried these fields and none of them give me what I would expect...

ComponentsWithStatus: LNPINX99::
COmponentsWithProblems: LNPINX99::
ComponentType: Performance Counter
ComponentAlert.StatisticData: 3067 ::
MultipleStatisticData.NumericData: ::
MultipleStatisticData.Label: ::
MultipleStatisticData.StringData: ::
MultipleStatisticData.Name:
Comp ID:1497 ::
Comp Alerting ID:1497
AlertID: 80
Application.ApplicationID: 255

Thanks,

Mike

0 Kudos
11 Replies
Level 11

Did you ever get your answer?

0 Kudos
MVP
MVP

Can you show me the script you're using?

--

Steven W. Klassen

Programmer Analyst @ Loop1 Systems

http://www.loop1systems.com/

http://www.linkedin.com/in/mrxinu

0 Kudos
Level 7

Steve et al, I think I've made headway overnight. 

I sat down and literally watched 3 hours of Solarwinds training videos last...my eyes began to cross but I finally got my alert to trigger the way I want the only issue I have now is getting the value of the Output file into an alert.  What is corresponding variable for the output file above?  If the script is spitting out:

     Message.810:rsync = 0

     Statistic.810:0

What are the corresponding variables in the Alert Manager to throw those values into an emailed alert?

Thanks for your help!

Mike

0 Kudos
MVP
MVP

Hey mistervapor​ - sorry about that. I got distracted by something shiny and forgot to come back to this. I don't know offhand but I'll loop it through the folks here and see what they say. I've written a lot of these multi-statistic scripts but I don't think I've ever had to pull in the named statistic before.

Also, I did do a training for AT&T Mobility (I think that was it) around 2008 or 2009. It was a tiny conference room packed to the gills with a whiteboard and a projector. And two doors. There were definitely two doors. And a break room on the other side of the wall. The things you remember, right?

--

Steven W. Klassen

Programmer Analyst @ Loop1 Systems

http://www.loop1systems.com/

http://www.linkedin.com/in/mrxinu

0 Kudos
Level 7

Yep, that was it....and most of us needed more help with what a CIDR is before we learned Solarwinds....lol.  I felt bad for you during that training session.  You walked in expecting one thing and ended up doing something completely different.

So, back to my issue...I actually think I've figured it out.  Once I'm completely done, I will come and post where I found my answer (or at least what helped get me there) on Thwack.  The only issue I have left is trying to determine if I can do any kind of logical conversion formulas in the Alert.  The value being sent to the alert is 0 (zero) and I need that to say 'Up' instead.  So, I'm off to search that answer...lol.

0 Kudos
MVP
MVP

That's right! I totally remember now. I gave a mini CCNA primer with IP addressing and all that. Small world. Let me know how you get on with that and I'll have another look as soon as I get done with this PowerShell I'm writing this morning.

--

Steven W. Klassen

Programmer Analyst @ Loop1 Systems

http://www.loop1systems.com/

http://www.linkedin.com/in/mrxinu

0 Kudos
Level 7

Hey Steven - any luck getting more details on the MultipleStatisticsData?  I'm still going a bit nuts with this one.  An SA who is more familar with .pl than I am has said the key is "is stopped" as the script will spit out the value "is stopped" for a process that has stopped, based on the execution of the script.  So, I need to figure out how to get that value so I can apply logic to it.

Thanks,

Mike

0 Kudos
MVP
MVP

Hey mistervapor​ - sorry for fading on this one. I looked at the script and it's not obvious to me what went into the %cfm_process_status_query hash. I assume that's the part of the code that you can't show me? Can you dummy up the hash with some sample values so I have a point of reference?

2016-05-17_12-53-19.png

0 Kudos
Level 7

Steve Klassen....I think I attended a high level Solarwinds training class with you.  Did we suitcase you into AT&T?

Anyway, I cannot share the entire script but I can share part of it...

#Process CFM processor information

if (grep /cfm/i, $HOSTNAME) {

#KST Processor check

  foreach $key (keys %cfm_process_status_query) {

    if (grep /$cfm_process_status_query{$key}/, `service $key status`) {

      print "Message.$cfm_process_status_stat_number{$key}:$key = $is_running\n"

;

      print "Statistic.$cfm_process_status_stat_number{$key}:$is_running\n";

      }

    else {

      print "Message.$cfm_process_status_stat_number{$key}:$key = $not_running\n

";

      print "Statistic.$cfm_process_status_stat_number{$key}:$not_running\n";

    }

  }

#Look for process that do not respond to service command

  foreach $key (keys %cfm_running_process_query) {

    if (!(grep /$key}/, @running_process_array)) {

      print "Message.$cfm_running_process_query{$key}:$key = $is_running\n";

      print "Statistic.$cfm_running_process_query{$key}:$is_running\n";

    }

    else {

      print "Message.$cfm_running_process_query{$key}:$key = $not_running\n";

      print "Statistic.$cfm_running_process_query{$key}:$not_running\n";

    }

  }

}#end

Which results in something like this...

Message.810:rsync = 0

Statistic.810:0

Where 810 is the UniqueID assigned in the Component Monitor setup.  Based on the output, I want to create different alerts with different corresponding Team actions.

0 Kudos
Level 13

I can't answer your particular question (I'll leave that to one of the more knowledgable peeps on here), but I do have a couple docs that you can peruse for other types of questions. One of our MVP's has pulled together a ton of different threads/blogs/videos to help with customizing and getting to know your SolarWinds products. Maybe you can find an answer to a future question.

How to do various customizations with your Solarwinds

Solarwinds Labs - One Stop Shop 

Level 7

Thank you for sharing the knowledge!!!  I really appreciate it.

0 Kudos