check_disk no output
Marc Powell
marc at ena.com
Fri Jul 15 17:47:01 CEST 2005
> -----Original Message-----
> From: António Coelho [mailto:coelhoapm at gmail.com]
> Sent: Friday, July 15, 2005 10:21 AM
> To: Marc Powell
> Cc: nagios-users at lists.sourceforge.net
> Subject: Re: [Nagios-users] check_disk no output
>
> Sorry for my previous mistake!
> The output I get from nagios machine for the command is:
>
> [admin at sumonitor admin]$
> /servers/nagios/libexec/check_remote_disk_fra.pl sugtwn2 10% 5% "/var
> /home /oracle /oracle/backup"
> admin at sugtwn2's password:
>
> sh: -c: line 1: syntax error near unexpected token `(9'
> sh: -c: line 1: `echo DISK CRITICAL [242016 kB (92%) free on /var]
> [253740 kB (96%) free on /home] [58716 kB (0%) free on /oracle]
> [30756660 kB (86%) free on /oracle/backup]'
> DISK CRITICAL [242016 kB (92%) free on /var] [253740 kB (96%) free on
> /home] [58716 kB (0%) free on /oracle] [30756660 kB (86%) free on
> /oracle/backup]
>
>
> Any help?
Much better. So, it's seems clear that check_remote_disk_fra.pl is trying to ssh to the remote host but you haven't yet set up passwordless ssh access. That's problem number one. Use 'man sshd' and search for 'authorized_keys' and look at the file format. The quickest (but not necessarily most secure) way is --
1 - Run 'ssh-keygen -t dsa' on the nagios host as the nagios user. Use the defaults and do not specify a password. This generates your public/private key pair.
2 - copy ~nagios/.ssh/id_dsa.pub to ~admin/.ssh/authorized_keys on sugtwn2.
3 - chmod 600 ~admin/.ssh/authorized_keys on sugtwn2
4 - as the nagios user on sumonitor - 'ssh admin at sugtwn2.rest.of.host.name' to accept the host key if you haven't already done so. You should not be prompted for a password.
5 - test the plugin again.
I would suggest that you use authorized_keys to restrict the commands that can be executed in this manner. Again, the man page details how to do this.
If you still see errors on sugtwn2 verify that check_disk run locally works as it does on zugtwz2. If check_disk does run correctly, we'll probably need to know exactly what check_remote_disk_fra.pl is doing. I noticed that you also switched hosts between your tests (previously zugtwz2). You'll need to perform the above steps 2-5 for every remote host you are intending to check.
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
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