Re: Nagios Process Monitor
Justin T Pryzby <[email protected]> Tue, 6 Aug 2013 14:26:48 -0700
| Newsgroups | gmane.network.nagios.user |
|---|---|
| Message-ID | <[email protected]> |
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 ------------------------------------------------------------------------------ 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 _______________________________________________ Nagios-users mailing list [email protected] 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
ckvpn-status
(text/plain, 442 B)
#! /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