14 lines
227 B
Bash
Executable File
14 lines
227 B
Bash
Executable File
#!/bin/bash
|
|
|
|
port=31182
|
|
|
|
. /usr/lib/nagios/plugins/utils.sh
|
|
|
|
if lsof -i -n -P | grep jsvc | grep $port | grep -q ESTABLISHED; then
|
|
echo "[OK]"
|
|
exit $STATE_OK
|
|
else
|
|
echo "[CRITICAL] not connected"
|
|
exit $STATE_CRITICAL
|
|
fi
|