Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
define command{
command_name check_hard_disks
command_line /usr/lib/monitoring-plugins/check_disk -w '$ARG1$' -c '$ARG2$' -e -r '^/media/.*' --exclude-type=tracefs --exclude-type=cgroup
}
define service{
use generic-service ; Name of service template to use
host_name localhost
service_description Disk Space for Hard disks
check_command check_hard_disks!204800!102400
}
However, I'm getting the following error in the GUI
All of that looks good. Can you try executing the command as nagios one more time, except this time use su - nagios to get to the nagios user. From what I can tell, the runuser application should do this properly, but it's the only unknown I'm seeing right off the bat.
Also, it looks like you've installed the distribution's Nagios Core package, which means you're probably on Nagios Core v3.something. We're on 4.4.5. We'll still help out, of course. It's all Nagios after all. But sometimes it's good to know that there are updated versions out there.
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!
mbellerue wrote:Also, it looks like you've installed the distribution's Nagios Core package, which means you're probably on Nagios Core v3.something. We're on 4.4.5. We'll still help out, of course. It's all Nagios after all. But sometimes it's good to know that there are updated versions out there.
Sorry, I actually should have mentioned that. Yes, I installed the distro package. However, I'm using Arch Linux, so it's actually running Nagios 4.4.5.
Sorry, I wasn't very clear there. What I meant was, you should become root, and then su - nagios, and then run the command. Then it should give us some decent output. Unless the core of the problem is that nagios just doesn't have a home directory.
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!
$ sudo su - nagios
su: warning: cannot change directory to /dev/null: Not a directory
$ sudo su
# su - nagios
su: warning: cannot change directory to /dev/null: Not a directory
I then tried actually letting the system know the location of the home directory by editing /etc/passwd, changing /dev/null to /home/nagios, then restarting, but it still fails. FWIW there was nothing created in the home directory byt the service.