1 Reply Latest reply on Jul 4, 2015 3:31 AM by HolyGuacamole

    Run a linux script


      Hi All,

      I want solarwinds SAM to run a linux script, but I am a complete newbie at this so not sure how to go about.


      This is the script mysql -uroot -e"show slave status\G;" | grep "Seconds_Behind_Master" | awk -F": " {' print $2 '} if it returns a value of NULL, I want to send an alert and if it's anything other than null (it's an integer value) all is ok.


      I've made the following script component but doesn't appear to work.



      status= 'mysql -uroot -e"show slave status\G;" | grep "Seconds_Behind_Master" | awk -F": " {' print $2 '}'


      if [[$Status = NULL]]; then

          echo "Statistic: 1"



         echo "Statistic: 0"



      Thanks in advance.