shell script not working properly as Nagios plugin

vishesh kumar linuxtovishesh at gmail.com
Fri Jul 20 14:58:24 CEST 2012


Thanks for reply ,

I am able to run command as nagios and its returning right value 120 to me

----------------------------------------------------------------------------------------------------------
[nagios at monitor ~]$  /usr/bin/sudo /sbin/iptables -vL|/bin/grep
':ssh'|/bin/awk '{print $1}'
120
----------------------


On Fri, Jul 20, 2012 at 5:33 PM, Voigt, Thomas <Thomas.Voigt at netkom.de>wrote:

> Hi,
>
> is your nagios user allowed to run the sudo command from the first line in
> your script?
>
> Please login as <your nagios user> 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
>
>
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> 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
>



-- 
http://linuxmantra.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20120720/5fc31915/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
-------------- 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