On one of the client machines following is the disk command defined in nrpe.cfg file
command[check_disk]=/usr/lib64/nagios/plugins/check_disk -w $ARG1$ -c $ARG2$ -e -l -x /dev/shm
I tried the following at command prompt on client machine and following is the output.
Where can we define the file systems and where can we set the threshold values.
[root@host1 ]# /usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -e -l -x /dev/shm
DISK CRITICAL - free space: /u01/app/nebdev6/datafile 108370 MB (15.57% inode=100%); /u01/app/nebdev 70099 MB (10.15% inode=96%); /u01/app/nebdev8/datafile 43650 MB (5.66% inode=100%); /u01/app/nebdev5/datafile 98700 MB (14.38% inode=100%); /u01/app/nebdev2/datafile 108370 MB (15.57% inode=100%); /u01/app/nebdev9/datafile 98802 MB (14.39% inode=100%); /u01/app/nebdev7/datafile 89133 MB (13.17% inode=100%); /u01/app/nebdev10/datafile 98802 MB (14.39% inode=100%); /u01/app/nebdev3/datafile 33878 MB (4.45% inode=100%); /u01/app/nebdev11/datafile 98802 MB (14.39% inode=100%); /u01/app/nebdev4/datafile 108370 MB (15.57% inode=100%);| /=13835MB;24175;27197;0;30219 /boot=161MB;396;446;0;496 /u01/app/nebdev6/temp=8836MB;16024;18027;0;20030 /u01/app/nebdev3/temp=67MB;24087;27098;0;30109 /u01/app/nebdev10/temp=2133MB;16024;18027;0;20030 /u01/app/nebdev6/datafile=587376MB;580464;653022;0;725580 /u01/app/nebdev7/temp=1212MB;16024;18027;0;20030 /u01/app/nebdev=620094MB;576432;648486;0;720540 /u01/app/nebdev8/datafile=726655MB;642552;722871;0;803191 /u01/app/nebdev11/temp=891MB;16024;18027;0;20030 /u01/app/nebdev5/datafile=587376MB;572400;643950;0;715501 /u01/app/nebdev2/datafile=587376MB;580464;653022;0;725580 /u01/app/nebdev9/datafile=587376MB;572400;643950;0;715501 /u02/oradata/nebdev13=576348MB;644971;725592;0;806214 /u02/oradata/nebdev12=588368MB;644971;725592;0;806214 /u01/app/nebdev1/temp=1308MB;16024;18027;0;20030 /u01/app/nebdev7/datafile=587376MB;564336;634878;0;705421 /u01/app/nebdev5/temp=1744MB;24087;27098;0;30109 /u01/app/nebdev10/datafile=587376MB;572400;643950;0;715501 /u01/app/nebdev3/datafile=726655MB;634488;713799;0;793111 /u01/app/nebdev11/datafile=587376MB;572400;643950;0;715501 /u01/nebdev/archives=347103MB;564336;634878;0;705421 /u01/app/nebdev8/temp=67MB;16024;18027;0;20030 /u03/oradata/nebdev12=28910MB;241800;272025;0;302250 /u01/app/nebdev4/datafile=587376MB;580464;653022;0;725580 /u01/app/nebdev4/temp=1499MB;24087;27098;0;30109 /u02/app/oracle=1991MB;7960;8955;0;9951 /u01/app/nebdev2/temp=1074MB;24087;27098;0;30109 /u01/app/nebdev9/temp=891MB;16024;18027;0;20030 /u03/oradata/nebdev13=50860MB;241800;272025;0;302250 /mnt/resource=41020MB;206320;232110;0;257901
How can this be set
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: How can this be set
Usage:
So if you just want to monitor a few paths with different warning and critical levels you would use syntax like the following:
Where the warning and critical precede the -p flag for the path that matches them
Code: Select all
Usage: check_disk -w limit -c limit [-W limit] [-K limit] {-p path | -x device}
[-C] [-E] [-e] [-g group ] [-k] [-l] [-M] [-m] [-R path ] [-r path ]
[-t timeout] [-u unit] [-v] [-X type]
Options:
-h, --help
Print detailed help screen
-V, --version
Print version information
-w, --warning=INTEGER
Exit with WARNING status if less than INTEGER units of disk are free
-w, --warning=PERCENT%
Exit with WARNING status if less than PERCENT of disk space is free
-c, --critical=INTEGER
Exit with CRITICAL status if less than INTEGER units of disk are free
-c, --critical=PERCENT%
Exit with CRITCAL status if less than PERCENT of disk space is free
-W, --iwarning=PERCENT%
Exit with WARNING status if less than PERCENT of inode space is free
-K, --icritical=PERCENT%
Exit with CRITICAL status if less than PERCENT of inode space is free
-p, --path=PATH, --partition=PARTITION
Path or partition (may be repeated)
-x, --exclude_device=PATH <STRING>
Ignore device (only works if -p unspecified)
-C, --clear
Clear thresholds
-E, --exact-match
For paths or partitions specified with -p, only check for exact paths
-e, --errors-only
Display only devices/mountpoints with errors
-g, --group=NAME
Group pathes. Thresholds apply to (free-)space of all partitions together
-k, --kilobytes
Same as '--units kB'
-l, --local
Only check local filesystems
-L, --stat-remote-fs
Only check local filesystems against thresholds. Yet call stat on remote filesystems
to test if they are accessible (e.g. to detect Stale NFS Handles)
-M, --mountpoint
Display the mountpoint instead of the partition
-m, --megabytes
Same as '--units MB'
-A, --all
Explicitly select all pathes. This is equivalent to -R '.*'
-R, --eregi-path=PATH, --eregi-partition=PARTITION
Case insensitive regular expression for path/partition (may be repeated)
-r, --ereg-path=PATH, --ereg-partition=PARTITION
Regular expression for path or partition (may be repeated)
-I, --ignore-eregi-path=PATH, --ignore-eregi-partition=PARTITION
Regular expression to ignore selected path/partition (case insensitive) (may be repeated)
-i, --ignore-ereg-path=PATH, --ignore-ereg-partition=PARTITION
Regular expression to ignore selected path or partition (may be repeated)
-t, --timeout=INTEGER
Seconds before connection times out (default: 10)
-u, --units=STRING
Choose bytes, kB, MB, GB, TB (default: MB)
-v, --verbose
Show details for command-line debugging (Nagios may truncate output)
-X, --exclude-type=TYPE
Ignore all filesystems of indicated type (may be repeated)
Examples:
check_disk -w 10% -c 5% -p /tmp -p /var -C -w 100000 -c 50000 -p /
Checks /tmp and /var at 10% and 5%, and / at 100MB and 50MB
check_disk -w 100M -c 50M -C -w 1000M -c 500M -g sidDATA -r '^/oracle/SID/data.*$'
Checks all filesystems not matching -r at 100M and 50M. The fs matching the -r regex
are grouped which means the freespace thresholds are applied to all disks together
check_disk -w 100M -c 50M -C -w 1000M -c 500M -p /foo -C -w 5% -c 3% -p /bar
Checks /foo for 1000M/500M and /bar for 5/3%. All remaining volumes use 100M/50MCode: Select all
check_disk -w 100M -c 50M -C -w 1000M -c 500M -p /foo -C -w 5% -c 3% -p /barRe: How can this be set
Thank you.
You may lock this thread.
You may lock this thread.
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: How can this be set
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!