checking unix load/disk space

Jeff Scott jeff at skislave.com
Thu May 5 18:00:35 CEST 2005


I also fixed a very minor bug where the script didn't exit if the -e
parameter wasn't specified.  I just upload 4 new scripts to nagiosexchange.

Sorry,
Jeff

-----Original Message-----
From: nagios-users-admin at lists.sourceforge.net
[mailto:nagios-users-admin at lists.sourceforge.net] On Behalf Of Jeff Scott
Sent: Thursday, May 05, 2005 9:48 AM
To: 'Jain, Rajeev'; admin at jpk236.com; nagios-users at lists.sourceforge.net
Subject: RE: [Nagios-users] checking unix load/disk space

I'm very sorry...my bad.  I'm updating the usage information right now.  You
need to specify the "shell" to use with the "-e", so either "-e ssh" or "-e
rsh".

Jeff

-----Original Message-----
From: nagios-users-admin at lists.sourceforge.net
[mailto:nagios-users-admin at lists.sourceforge.net] On Behalf Of Jain, Rajeev
Sent: Thursday, May 05, 2005 9:19 AM
To: admin at jpk236.com; nagios-users at lists.sourceforge.net
Subject: RE: [Nagios-users] checking unix load/disk space

I think its something else. I think this has something to do with POSIX,
is that a wrong assumption.

[root at NGMON downloads]# ./check_disk_remote -w 20 -c 25 -v
Usage: check_disk_remote -H <hostname> [-w <warn>] [-c <crit>] [-t
<timeout>] [-v verbose]

[root at NGMON downloads]# ./check_disk_remote -H localhost -w 20 -c 25 -v
Use of uninitialized value in concatenation (.) or string at
./check_disk_remote line 55.
Can't exec "localhost": No such file or directory at ./check_disk_remote
line 55.
Use of uninitialized value in scalar chomp at ./check_disk_remote line
56.
Use of uninitialized value in string eq at ./check_disk_remote line 58.
Use of uninitialized value in string eq at ./check_disk_remote line 58.
Use of uninitialized value in concatenation (.) or string at
./check_disk_remote line 70.
Can't exec "localhost": No such file or directory at ./check_disk_remote
line 70.
ERROR: could not open /usr/bin/df -k on localhost

[root at NGMON downloads]# ./check_disk_remote -H 10.101.104.47 -w 20 -c 25
-v
Use of uninitialized value in concatenation (.) or string at
./check_disk_remote line 55.
Can't exec "206.201.104.47": No such file or directory at
./check_disk_remote line 55.
Use of uninitialized value in scalar chomp at ./check_disk_remote line
56.
Use of uninitialized value in string eq at ./check_disk_remote line 58.
Use of uninitialized value in string eq at ./check_disk_remote line 58.
Use of uninitialized value in concatenation (.) or string at
./check_disk_remote line 70.
Can't exec "206.201.104.47": No such file or directory at
./check_disk_remote line 70.
ERROR: could not open /usr/bin/df -k on 206.201.104.47

-----Original Message-----
From: nagios-users-admin at lists.sourceforge.net
[mailto:nagios-users-admin at lists.sourceforge.net] On Behalf Of
admin at jpk236.com
Sent: Thursday, May 05, 2005 9:49 AM
To: nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] checking unix load/disk space

Rajeev,
	The only thing I can think of is that you're using "blade1" --
which is 
set in the host_name variable for that host in your .cfg's.  I'm not 
convinced that when you run a plugin from the command line, it knows to 
look up what the actual IP/hostname is of blade1 in the cfg's.  I would 
try running the plugin from the command line with the actual IP/hostname

and see what happens.

  - Justin Kulikowski
	[ http://www.jpk236.com ]

Jain, Rajeev wrote:
> I am using trusted SSH connection but getting the following error
while
> running the script. Is there a pre-requisite for these scripts?
> 
> 
> [root at NGMON downloads]# ./check_disk_remote -H blade1 -w 20 -c 25 -v
> Use of uninitialized value in concatenation (.) or string at
> ./check_disk_remote line 55.
> Can't exec "blade1": No such file or directory at ./check_disk_remote
> line 55.
> Use of uninitialized value in scalar chomp at ./check_disk_remote line
> 56.
> Use of uninitialized value in string eq at ./check_disk_remote line
58.
> Use of uninitialized value in string eq at ./check_disk_remote line
58.
> Use of uninitialized value in concatenation (.) or string at
> ./check_disk_remote line 70.
> Can't exec "blade1": No such file or directory at ./check_disk_remote
> line 70.
> ERROR: could not open /usr/bin/df -k on blade1
> 
> 
> -----Original Message-----
> From: nagios-users-admin at lists.sourceforge.net
> [mailto:nagios-users-admin at lists.sourceforge.net] On Behalf Of Jeff
> Scott
> Sent: Wednesday, May 04, 2005 5:26 PM
> To: nagios-users at lists.sourceforge.net
> Subject: RE: [Nagios-users] checking unix load/disk space
> 
> 
> I have uploaded a few "network" aware scripts to nagiosexchange.org to
> do
> just this.  They check disk, load, etc...via ssh, with trusted keys
> setup,
> or with rsh (if .rhost/host.equiv are setup).  Obviously ssh is
> preferred
> method.  
> 
> Jeff
> 
> -----Original Message-----
> From: nagios-users-admin at lists.sourceforge.net
> [mailto:nagios-users-admin at lists.sourceforge.net] On Behalf Of Marc
> Powell
> Sent: Wednesday, May 04, 2005 10:53 AM
> To: nagios-users at lists.sourceforge.net
> Subject: RE: [Nagios-users] checking unix load/disk space
> 
> 
> 
> 
>>-----Original Message-----
>>From: nagios-users-admin at lists.sourceforge.net [mailto:nagios-users-
>>admin at lists.sourceforge.net] On Behalf Of HP Geeza
>>Sent: Wednesday, May 04, 2005 11:34 AM
>>To: Bill_Akins at emoryhealthcare.org; nagios-users at lists.sourceforge.net
>>Subject: Re: [Nagios-users] checking unix load/disk space
>>
>>I belive that would work...and i understand the syntax in that
> 
> command.
> 
>>However that command will check the disk space on /, /tmp, /var, /boot
> 
> on
> 
>>the localhost though?
>>
>>The problem i am having is that how do i tell nagios to run a command
> 
> such
> 
>>as:
>>check_disk -w 25% -c 10% -p / -p /tmp -p /var -p /boot
>>
>>on a remote host and return values?..a simple ping command seems to
> 
> work
> 
>>fine
>>
>>Do i need to add a -h $HOSTNAME$ in the checkcommands file?....also
> 
> just
> 
>>to
> 
> 
> Only if the plugin is network aware and understands -h parameters ;)
In
> this case, it won't work as check_disk is a local check only and not
> network aware.
> 
> 
>>make sure which client software should i be running on my remote host?
> 
> i.e
> 
>>on windows i installed the PNSClient when i was using netsaint this
> 
> seems
> 
>>to
>>be working fine when switching to nagios....do i have to do something
>>different for unix machines?
> 
> 
> Yes, you do. The host-resource plugins are not network aware. You can
> always see if a plugin is network aware by running it with '--help'.
In
> this case, check_disk must be run on the host you intend to check.
There
> are a number of ways to do that but the most common are NRPE or
> check-by-ssh.
> 
> --
> Marc
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: NEC IT Guy Games.
> Get your fingers limbered up and give it your best shot. 4 great
events,
> 4
> opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
> win an NEC 61 plasma display. Visit http://www.necitguy.com/?r 
> _______________________________________________
> 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
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: NEC IT Guy Games.
> Get your fingers limbered up and give it your best shot. 4 great
events,
> 4
> opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
> win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
> _______________________________________________
> 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
> 
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: NEC IT Guy Games.
> Get your fingers limbered up and give it your best shot. 4 great
events, 4
> opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
> win an NEC 61 plasma display. Visit http://www.necitguy.com/?r 
> _______________________________________________
> 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


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events,
4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
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





-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r 
_______________________________________________
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



-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
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



-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
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