Page 1 of 1

check_disk_inode

Posted: Fri Sep 16, 2016 7:00 am
by gselvakumar
Hi,

I want find the inode usage for Aix server.I tried the plugin mentioned in url below.

https://exchange.nagios.org/directory/P ... es/details

Code: Select all

$ ./check_disk_inode -w 60 -c 85 -p /
Error! Disk partition / can't be checked. Does it exist?
$ df
Filesystem    512-blocks      Free %Used    Iused %Iused Mounted on
/dev/hd4         1048576    831272   21%     5505     6% /
/dev/hd2         7864320   1929176   76%    47891    17% /usr
/dev/hd9var      6291456   5883992    7%     1745     1% /var
/dev/hd3         6291456   6151864    3%      698     1% /tmp
/dev/hd1         2097152   2058056    2%      189     1% /home
/dev/hd11admin     262144    261384    1%       11     1% /admin
When I run the plugin I am getting an error.Please help me with this

Code: Select all

$ ./check_disk_inode -w 60 -c 85 -p /
Error! Disk partition / can't be checked. Does it exist?

Re: check_disk_inode

Posted: Fri Sep 16, 2016 11:53 am
by mcapra
From the CLI of your Nagios XI machine, can you share the output of:

Code: Select all

df -Pi /; echo $?

Re: check_disk_inode

Posted: Mon Sep 19, 2016 7:52 am
by gselvakumar
This is output of my AIX servers on which I want to monitor to inode usage

Code: Select all

$ df -Pi /; echo $?
Usage: df  [-P] | [-IMitv] [-gkm] [-s] [filesystem ...] [file ...]
1
This is output of CLI of my Nagios machine.

Code: Select all

$ df -Pi /; echo $?
Filesystem                           Inodes  IUsed   IFree IUse% Mounted on
/dev/mapper/vg_uusrcdlsbx00-lv_root 6254640 202840 6051800    4% /
0

Re: check_disk_inode

Posted: Mon Sep 19, 2016 4:15 pm
by tgriep
Try running the example below on the AIX server.

Code: Select all

df -P -i /; echo $?
If it works, you would have to edit the check_disk_inodes script and change line 173 from

Code: Select all

USEDTXT=`$DF -Pi $Partition 2>&1`
to

Code: Select all

USEDTXT=`$DF -P -i $Partition 2>&1`
The df command on the AIX server may have to have the arguments separated to work.

Re: check_disk_inode

Posted: Tue Sep 20, 2016 1:46 am
by gselvakumar
Hi tgriep,

Thanks for the update

I tried running the below command and I got the output

Code: Select all

df -P  /; echo $?
Filesystem    512-blocks      Used Available Capacity Mounted on
/dev/hd4         1048576    217704    830872      21% /
0
Then I edited the check_disk_inodes script and change line 173 from

Code: Select all

USEDTXT=`$DF -Pi $Partition 2>&1`
to

Code: Select all

USEDTXT=`$DF -P - $Partition 2>&1`
And the script is working now :D

Re: check_disk_inode

Posted: Tue Sep 20, 2016 9:56 am
by tgriep
That is good to hear that it is working now, Shall we close and lock up this post as solved?

Re: check_disk_inode

Posted: Wed Sep 21, 2016 12:06 am
by gselvakumar
sure :D