linuxpig
asked on
Nagios mysql script
I have a small script that runs on a server that has mysql, then nrpe returns the output to the nagios server. I want to change this so that the nagios server runs the script by logging into the mysql db on the remote machine. Im not that good with mysql so maybe someone can look at my mysql script and tell me how to change it to loging and do its check remotely. Thanks!
#!/bin/sh
test=`mysql -P 3306 --socket=/var/mysql/mysql. sock -u mysqlid-pmysqlpw -e 'use mysql_test; show tables;' | wc -l`
echo "OK - $test tables"
#!/bin/sh
test=`mysql -P 3306 --socket=/var/mysql/mysql.
echo "OK - $test tables"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER