Nagios Plugins
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

check_reversetunnel 521B

123456789101112131415161718
  1. #!/bin/sh
  2. #
  3. AUTOSSH_PIDs=$(pidof autossh)
  4. if [ -z $AUTOSSH_PIDs ]; then
  5. # no autossh process running
  6. echo "No autossh process is running!"
  7. exit 2
  8. else
  9. # there is an autossh process
  10. ps x -q $AUTOSSH_PIDs | grep "\-R 10022:localhost:22.*mount-mockery.de$" 2>&1 > /dev/null
  11. if [ $? -eq 0 ]; then
  12. echo "The required autossh process is running"
  13. exit 0
  14. else
  15. echo "There are autossh processes, but none of them fit to the required connection details"
  16. exit 2
  17. fi
  18. fi