Nagios Process Monitor
Justin T Pryzby
justinp at norchemlab.com
Tue Aug 6 23:26:48 CEST 2013
On Mon, Aug 05, 2013 at 10:55:58AM -0700, Farhan Usmani wrote:
> How can we monitor open vpn process through nagios.Thanks
I'm using the attached wrapper script.
Justin
-------------- next part --------------
#! /bin/sh
# Check that ALL vpn daemons are running.
set -e
pp=/usr/lib/nagios/plugins
for a in /etc/openvpn/*.conf
do
b=`basename "$a" .conf`
f=/var/run/openvpn.$b.status
if x=`$pp/check_file_age -w 60 -c 120 -W 150 -C 50 -f "$f"`
then
out="$out, ${f##*/}"
else
err="$err, ${f##*/}"
fi
long=`printf "%s\n%s" "$long" "$x"`
done
[ -z "$err" ] && echo "OK: $out" && echo "$long" && exit
echo "CRITICAL: $err"
echo "$long"
exit 2
-------------- next part --------------
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list