2 Replies Latest reply on Oct 6, 2010 2:09 PM by MikeAsthalter

    Linux/Unix Script Monitor w/ Shell script

    jedatt01

      Hey everybody, i'm a newbie to Solarwinds and have a question about Linux/Unix Script Monitor. What I want to do is be able to remotely execute a shell script from the Linux/Unix Script Monitor. From reading documentation and looking at examples from Solarwinds I only see Perl scripts that are able to execute remotely. Can someone tell if it's possible to execute shell scripts the same way? If so, what is the command line I should use? The default shows "perl ${SCRIPT} arg1 arg2". I'm assuming that you could do something like "sh ${SCRIPT} arg1 arg2" or ./${SCRIPT} arg1 arg2" 

      (Note, I do not want to have to load the script on the machines prior. I want to be able to paste my script into the script body in Linux/Unix Script Monitor and execute remotely from there)

      Thanks for any help

        • Re: Linux/Unix Script Monitor w/ Shell script

          I did a quick test to see if the script can be executed in Unix (I tested with Solaris) by the shell using the "sh ${SCRIPT} arg1 arg2" command line format in the Linux/Unix Script Monitor.

          Remember that the script must have text output that contains the Message on one line of output and the Statistic on the next line of output, for example:

          # Script output comment
          Message: The directory contains too many files.
          Statistic: 5

          The Statistic is then used for setting the status for the Statistic Warning and Critical Thresholds whose value you set in the Linux/Unix Script Monitor.

          See the section "Creating a Linux/Unix Script Monitor" in the "Building Component Monitors and Templates" chapter of the APM Administrator Guide for more information.

          Hope this helps,

          Mike