Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- `#/usr/bin/bash`
- `DB_HOST='192.168.0.1
- DB_USER='user'
- DB_PASS='test'
- DB='arpwatch' `
- `mysql -u "$DB_USER" \ `
- `--host="$DB_HOST" \ `
- `--password="$DB_PASS" \ `
- `--database="$DB" \ `
- `--enable-local-infile \ `
- `--execute="$req1 $req2" $req2 `
- `req1=$"(SELECT count() FROM INFORMATION_SCHEMA.PROCESSLIST AND INFO LIKE '%SELECT %');" `
- `req2=$"(SELECT count() FROM INFORMATION_SCHEMA.PROCESSLIST AND INFO LIKE '%UPDATE %');" `
- `req3=$"(SELECT count() FROM INFORMATION_SCHEMA.PROCESSLIST AND INFO LIKE '%INSERT %');" `
- STATUS=(req1,req2,req3)
- zabbix_sender -k network.status -z 192.168.0.1 -s"device" -o $STATUS
Add Comment
Please, Sign In to add comment