HI,
Please any one suggest the steps for define to monitor the linux server partitions in Nagios server and NRPE (Ex: /dev/sda1 ,/dev/xvda1)
-Thanks,
Sudhaharan.M
LInux server Partitions monitoring using Nagios
-
- Posts: 5
- Joined: Mon Dec 04, 2017 6:49 am
Re: LInux server Partitions monitoring using Nagios
check_volume is a good plugin for this. It uses df for its metrics.
As for configuring it with NRPE, give this documentation a look and let us know if any part of it doesn't work or is unclear:
https://support.nagios.com/kb/article/n ... d-612.html
I understand that the documentation says "Nagios XI" a lot, but the same concepts are applicable to Nagios Core.
Code: Select all
[root@capra-docker ~]# /tmp/check_volume.sh -v /dev/sda1 -c 95 -w 90
/dev/sda1 is at 19% capacity, 184M of 1014M
[root@capra-docker ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/cl-root 17G 6.2G 11G 37% /
devtmpfs 1.9G 0 1.9G 0% /dev
tmpfs 1.9G 0 1.9G 0% /dev/shm
tmpfs 1.9G 8.4M 1.9G 1% /run
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
/dev/sda1 1014M 184M 831M 19% /boot
tmpfs 380M 0 380M 0% /run/user/0
https://support.nagios.com/kb/article/n ... d-612.html
I understand that the documentation says "Nagios XI" a lot, but the same concepts are applicable to Nagios Core.
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
-
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: LInux server Partitions monitoring using Nagios
Do you already have NRPE installed? It's hard to know exactly where to start, but once you have NRPE installed, if you could send your nrpe.cfg we can take a look at see if it is configured properly. Are you currently monitoring anything else through NRPE on the device you are monitoring?
This is from the document @mcapra gave you, but it's worth highlighting since you aren't using XI and I don't know how familiar you are with NRPE:
This is from the document @mcapra gave you, but it's worth highlighting since you aren't using XI and I don't know how familiar you are with NRPE:
Please let us know if you run into any further difficulty.Commands are defined in the nrpe.cfg file, this is commonly located at /usr/local/nagios/etc/nrpe.cfg.
They may also be defined in an additional .cfg file referenced in the nrpe.cfgfile, for example:
include_dir=/usr/local/nagios/etc/nrpe
What does a command definition look like? Using the example above, the check_users command is defined as follows:
command[check_users]=/usr/local/nagios/libexec/check_users $ARG1$
The line begins with the word command, this is how the config file knows this line is a command definition
The word between the [square brackets] is the actual command "name"
Everything after the = is the actual plugin that is being executed, along with any arguments
This example only accepts one argument. Arguments are defined as $ARGx$ where x is the argument number received
-
- Posts: 5
- Joined: Mon Dec 04, 2017 6:49 am
Re: LInux server Partitions monitoring using Nagios
HI,
Thanks for your reply. I have checked and i can able to show the output in the local machine. But, how can i configure in Nagios to monitor the remote host partitions.
-Thanks,
Sudhaharan.M
Thanks for your reply. I have checked and i can able to show the output in the local machine. But, how can i configure in Nagios to monitor the remote host partitions.
-Thanks,
Sudhaharan.M
Re: LInux server Partitions monitoring using Nagios
The check_disk_smb can be used:
/usr/local/nagios/libexec/check_disk_smb remote_ip share_volume username password
/usr/local/nagios/libexec/check_disk_smb remote_ip share_volume username password
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
- Posts: 5
- Joined: Mon Dec 04, 2017 6:49 am
Re: LInux server Partitions monitoring using Nagios
HI,
I have checked, i think this check_disk_smb is suitable for Samba shared drives only. But, my requirement is to monitor the remote linux servers partitions which mounted on remote server(Ex: /mnt/hdpx1 )
-Thanks,
Sudhaharan.M
I have checked, i think this check_disk_smb is suitable for Samba shared drives only. But, my requirement is to monitor the remote linux servers partitions which mounted on remote server(Ex: /mnt/hdpx1 )
-Thanks,
Sudhaharan.M
Re: LInux server Partitions monitoring using Nagios
If you wanted to use the check_volume plugin that @mcapra suggested then it would be a good idea to have NRPE installed.
Checked on my remote host.
All I did was have the check_volume plugin on the remote host.
Added a MISC command to the nrpe.cfg file.
Let us know if this helps.
Code: Select all
[root@localhost libexec]# ./check_nrpe -H 192.168.4.174 -c check_volume -a '-v /run -w 94 -c 99'
/run is at 5% capacity, 40M of 918M
[root@localhost libexec]# ./check_nrpe -H 192.168.4.174 -c check_volume -a '-v /dev/sda1 -w 94 -c 99'
/dev/sda1 is at 52% capacity, 255M of 497M
Code: Select all
[root@centos7x64 libexec]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/centos-root 18G 3.7G 14G 21% /
devtmpfs 908M 0 908M 0% /dev
tmpfs 918M 0 918M 0% /dev/shm
tmpfs 918M 40M 879M 5% /run
tmpfs 918M 0 918M 0% /sys/fs/cgroup
/dev/sda1 497M 255M 243M 52% /boot
tmpfs 184M 0 184M 0% /run/user/0
[root@centos7x64 libexec]# hostname -I
192.168.4.174
Added a MISC command to the nrpe.cfg file.
Code: Select all
### MISC SYSTEM METRICS ###
command[check_volume]=/usr/local/nagios/libexec/check_volume $ARG1$