Re: [Nagios-users] shell script not working properly as Nagios plugin

2012-07-20 Thread vishesh kumar
Thanks for reply , I am able to run command as nagios and its returning right value 120 to me -- [nagios@monitor ~]$ /usr/bin/sudo /sbin/iptables -vL|/bin/grep ':ssh'|/bin/awk '{print $1}' 120

Re: [Nagios-users] shell script not working properly as Nagios plugin

2012-07-20 Thread Mike Clark
Second that response. From: vishesh kumar [mailto:linuxtovish...@gmail.com] Sent: Friday, July 20, 2012 6:42 AM To: Nagios Users List Subject: [Nagios-users] shell script not working properly as Nagios plugin Hi Members, I wrote below script to monitor ssh traffic ++

Re: [Nagios-users] Installing n2rrd with Nagios on Centos 6.2

2012-07-20 Thread Paul Dubuc
I'll second that! Randal, Phil wrote: > Can't help but think that using pnp4nagios would be easier :-) > > Phil > > -- > Phil Randal > Infrastructure Engineer > Hoople Ltd | Thorn Office Centre | Hereford HR2 6JT > Tel: 01432 260415 | Email: phil.ran...@hoopleltd.co.uk > > -Original Message---

Re: [Nagios-users] shell script not working properly as Nagios plugin

2012-07-20 Thread Voigt, Thomas
Hi, is your nagios user allowed to run the sudo command from the first line in your script? Please login as and execute the command /usr/bin/sudo /sbin/iptables -vL|/bin/grep ':ssh'|/bin/awk '{print $1}' directly. Do you see any output? -- Regards Thomas Voigt --

Re: [Nagios-users] shell script not working properly as Nagios plugin

2012-07-20 Thread vishesh kumar
Yes , Its defined and script running fine when i run it via bash from user nagios . On Fri, Jul 20, 2012 at 5:47 PM, Assaf Flatto wrote: > ** > On 20/07/12 12:41, vishesh kumar wrote: > > Hi Members, > > I wrote below script to monitor ssh traffic > > ++

Re: [Nagios-users] shell script not working properly as Nagios plugin

2012-07-20 Thread Assaf Flatto
On 20/07/12 12:41, vishesh kumar wrote: Hi Members, I wrote below script to monitor ssh traffic +++ a=$(/usr/bin/sudo /sbin/iptables -vL|/bin/grep ':ssh'|/bin/awk '{print $1}') if [ $a -gt 3 ]; then echo "SSH aatempt is TOO High | $a" exit 2 else if [ $

[Nagios-users] shell script not working properly as Nagios plugin

2012-07-20 Thread vishesh kumar
Hi Members, I wrote below script to monitor ssh traffic +++ a=$(/usr/bin/sudo /sbin/iptables -vL|/bin/grep ':ssh'|/bin/awk '{print $1}') if [ $a -gt 3 ]; then echo "SSH aatempt is TOO High | $a" exit 2 else if [ $a -gt 2 ]; then echo "SSH aatempt is Average

Re: [Nagios-users] Installing n2rrd with Nagios on Centos 6.2

2012-07-20 Thread Randal, Phil
Can't help but think that using pnp4nagios would be easier :-) Phil -- Phil Randal Infrastructure Engineer Hoople Ltd | Thorn Office Centre | Hereford HR2 6JT Tel: 01432 260415 | Email: phil.ran...@hoopleltd.co.uk -Original Message- From: nelson [mailto:tnels...@comcast.net] Sent: 20 Jul

[Nagios-users] Installing n2rrd with Nagios on Centos 6.2

2012-07-20 Thread nelson
I am in the process of building a Centos 6.2 system to run Nagios and n2rrd. It is a virtual machine / sandbox. Centos 6.2 is installed as is Nagios 3.4.1 and Nagios Plugins 1.4.15. Nagios and the Nagios Plugins were installed following the Fedora Quick Start instructions at http://nagios.sour