check_by_ssh.cfg check_disk.cfg
chbaker at powersystems.rockwell.com
chbaker at powersystems.rockwell.com
Fri Apr 4 17:12:12 CEST 2003
Here is my ssh_disk command string:
/usr/lib/nagios/plugins/check_by_ssh -H $HOSTNAME$ -i $ARG1$ -C
'/usr/lib/nagios/plugins/check_disk -w 15% -c 5% -p $ARG2$'
If I run it as nagios from the command line, substituting the actual path
to the identity file for $ARG1$ and the actual path to the device for $ARG2
$ it produces the following output:
DISK OK [17979 kb (63%) free on /dev/hda3]
If I run the command enclosed in quotes, again making appropriate
substitutions, on the remote machine it works just fine also.
My service definition calls ssh_disk passing it the path to the identity
file and the partition to check. I may try it your way though and see if I
get better results.
Charles H. Baker
chbaker at powersystems dot rockwell dot com
work: 864.281.2409 fax: 864.281.2487 cell: 864.363.5302
BOFH excuse #207:
We are currently trying a new concept of using a live mouse.
Unfortunately, one has yet to survive being hooked up to the
computer.....please bear with us.
Jonathan Nichols
<jnichols at pbp.ne To: chbaker at powersystems.rockwell.com
t> cc: nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] check_by_ssh.cfg check_disk.cfg
04/03/2003 10:13
PM
> notification_options w,u,c,r
> check_command
> ssh_disk!/var/log/nagios/.ssh/identity!dev/hda2
> }
>
That looks strange to me. Here's what I have for a host called "jezebel":
define service{
use generic-service ; Name of
service template to use
host_name jezebel
service_description Disk Usage
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 5
retry_check_interval 1
contact_groups admins
notification_interval 360
notification_period 24x7
notification_options c,r
check_command check_disk_ssh!20%!20%
}
If disk space gets below 20%, it'll squawk at me.
Here's the hostcommand:
# 'check_disk_ssh' command definition
define command{
command_name check_disk_ssh
command_line $USER1$/check_by_ssh -H $HOSTADDRESS$ -C
'./check_disk -w $ARG1$ -c $ARG2$'
}
I make a "nagios" user on each machine, and I let it SSH in (shared key)
and run the plugin that's in /home/nagios. Works great for me!
-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb:
Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
_______________________________________________
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