Guest User

Untitled

a guest
Nov 22nd, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. `#/usr/bin/bash`
  2.  
  3. `DB_HOST='192.168.0.1
  4. DB_USER='user'
  5. DB_PASS='test'
  6. DB='arpwatch' `
  7.  
  8. `mysql -u "$DB_USER" \ `
  9. `--host="$DB_HOST" \ `
  10. `--password="$DB_PASS" \ `
  11. `--database="$DB" \ `
  12. `--enable-local-infile \ `
  13. `--execute="$req1 $req2" $req2 `
  14. `req1=$"(SELECT count() FROM INFORMATION_SCHEMA.PROCESSLIST AND INFO LIKE '%SELECT %');" `
  15. `req2=$"(SELECT count() FROM INFORMATION_SCHEMA.PROCESSLIST AND INFO LIKE '%UPDATE %');" `
  16. `req3=$"(SELECT count() FROM INFORMATION_SCHEMA.PROCESSLIST AND INFO LIKE '%INSERT %');" `
  17.  
  18. STATUS=(req1,req2,req3)
  19. zabbix_sender -k network.status -z 192.168.0.1 -s"device" -o $STATUS
Add Comment
Please, Sign In to add comment