Hi
I am rather new to the whole world of Nagios.
I've been setting up 10-15 machines and haven't had to hard a time doing so, but now I have a problem.
I imagine it is a rather easy question to answer.
I have a Mac OS X 10.9.5 server running on nagios just fine. I have a nfs drive attached and would like to check if the drive is mounted.
I thought that this would do the trick:
check_nrpe!check_disk!-a '-w 20% -c 10% -p /Volumes/Example\ Digital\ Delivery'
I think the problem is the name of the drive, it contains spaces between the words, as it is called "Example Digital Delivery"
How can I make the nagios server see the nfs drive?
Nagios XI disk name problem
Re: Nagios XI disk name problem
Try this:
And what error do you get when using the one you currently have?
Code: Select all
check_nrpe!check_disk!-a '-w 20% -c 10% -p "/Volumes/Example Digital Delivery"'
Former Nagios employee
Re: Nagios XI disk name problem
Thank for replying.
here is what I get on the string suggested:
COMMAND: /usr/local/nagios/libexec/check_nrpe -H 10.0.0.191 -t 30 -c check_disk -a '-w 20% -c 10% -p -a '-w 20% -c 10% -p "/Volumes/Example Digital Delivery\\"\'
OUTPUT: Incorrect command line arguments supplied
And this is what I got on the other
COMMAND: /usr/local/nagios/libexec/check_nrpe -H 10.0.0.191 -t 30 -c check_disk -a '-w 20% -c 10% -p /Volumes/Postyr\\ Digital\\ Delivery'
OUTPUT: CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.
here is what I get on the string suggested:
COMMAND: /usr/local/nagios/libexec/check_nrpe -H 10.0.0.191 -t 30 -c check_disk -a '-w 20% -c 10% -p -a '-w 20% -c 10% -p "/Volumes/Example Digital Delivery\\"\'
OUTPUT: Incorrect command line arguments supplied
And this is what I got on the other
COMMAND: /usr/local/nagios/libexec/check_nrpe -H 10.0.0.191 -t 30 -c check_disk -a '-w 20% -c 10% -p /Volumes/Postyr\\ Digital\\ Delivery'
OUTPUT: CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.
Re: Nagios XI disk name problem
You may not be able to pass the partition through nrpe as quotes are illegal characters. Your best bet may be to hardcode the path for the command in the remote in nrpe.cfg and then run the check from nagios without the path declared. There is a branch of nrpe around that removes quotes from the illegal characters, but do understand that this has serious potential security consequences.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Nagios XI disk name problem
OK, try the following:
1. Modify the "check_disk" command definition on the client in the "/usr/local/nagios/etc/nrpe/common.cfg" (or nrpe.cfg) to look like this:
Note: Basically, wrap the arg in double quotes.
Restart xinetd so that changes can take effect (or restart nrpe if it is running as a standalone daemon):
2. Test your command from the command line on the Nagios XI server (don't test from within CCM; do it in a ssh/putty terminal):
Let me know if this worked.
1. Modify the "check_disk" command definition on the client in the "/usr/local/nagios/etc/nrpe/common.cfg" (or nrpe.cfg) to look like this:
Code: Select all
command[check_disk]=/usr/local/nagios/libexec/check_disk "$ARG1$"Restart xinetd so that changes can take effect (or restart nrpe if it is running as a standalone daemon):
Code: Select all
service xinetd restartCode: Select all
/usr/local/nagios/libexec/check_nrpe -H 10.0.0.191 -t 30 -c check_disk -a '-w 20% -c 10% -p /Volumes/Example Digital Delivery'Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Nagios XI disk name problem
Hi again
It doesn't work. It is conflicting with the fact that it is a VMware machine.
DISK CRITICAL - /Volumes/VMware Shared Folders is not accessible: Input/output error
It doesn't work. It is conflicting with the fact that it is a VMware machine.
DISK CRITICAL - /Volumes/VMware Shared Folders is not accessible: Input/output error
Re: Nagios XI disk name problem
Strange...this is working for me:
on the client:
on the Nagios XI server:
I am not sure why it's not working for you. Can you show us how the "check_disk" is defined on the client and how you test it from the XI server?
on the client:
Code: Select all
[root@speedking ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_speedking-lv_root
18G 12G 4.9G 71% /
tmpfs 2.0G 0 2.0G 0% /dev/shm
/dev/sda1 477M 104M 348M 23% /boot
tmpfs 50M 0 50M 0% /Volumes/Example Digital Delivery
[root@speedking ~]# grep "check_disk" /usr/local/nagios/etc/nrpe/common.cfg
command[check_disk]=/usr/local/nagios/libexec/check_disk "$ARG1$"Code: Select all
[root@testbox etc]# /usr/local/nagios/libexec/check_nrpe -H 192.168.x.x -t 30 -c check_disk -a '-w 20% -c 10% -p /Volumes/Example Digital Delivery'
DISK OK - free space: / 4953 MB (29% inode=72%); /dev/shm 1962 MB (100% inode=99%); /boot 347 MB (77% inode=99%); /Volumes/Example Digital Delivery 50 MB (100% inode=99%);| /=11698MB;14035;;0;17544 /dev/shm=0MB;1569;;0;1962 /boot=103MB;380;;0;476 '/Volumes/Example Digital Delivery'=0MB;40;;0;50Be sure to check out our Knowledgebase for helpful articles and solutions!