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.
#!/bin/bash
status= 'mysql -uroot -e"show slave status\G;" | grep "Seconds_Behind_Master" | awk -F": " {' print $2 '}'
if [[$Status = NULL]]; then
echo "Statistic: 1"
else
echo "Statistic: 0"
fi
Thanks in advance.
Mas