Page 2 of 3
Re: Disk Critical
Posted: Wed Jun 04, 2014 1:18 pm
by Metalliogre
I started following this tutorial on how to configure nagios to rid the 'critical disk error' and I am being asked to edit/create a checkcommand.cfg that I can't seem to find/do. Any help would be appreciated!
http://devincharge.com/quick-dirty-setup-nrpe-ubuntu/
Re: Disk Critical
Posted: Wed Jun 04, 2014 3:03 pm
by sreinhardt
That file is likely command.cfg instead of checkcommand.cfg. The naming is entirely arbitrary, but command.cfg is the defualt.
Re: Disk Critical
Posted: Thu Jun 05, 2014 6:27 am
by Stuart Watts
The checks run as user "nagios" and you're attempting to check home directories, which "nagios" probably isn't allowed to traverse. You'd need to add an ACL (if possible) or slacken permissions to check these directories.
Re: Disk Critical
Posted: Thu Jun 05, 2014 10:50 am
by Metalliogre
Edited with no luck.
Re: Disk Critical
Posted: Thu Jun 05, 2014 10:51 am
by Metalliogre
How would I adjust permissions to allow the checks? I'm lost in Nagios.
Re: Disk Critical
Posted: Thu Jun 05, 2014 11:12 am
by eloyd
It's not a Nagios answer, I'm afraid - it's an operating system answer. You need to be able to allow the user named "nagios" to check directories that are not owned by the user named "nagios." So you need to allow the user named "nagios" access to the directories using whatever appropriate security mechanism your OS allows.
(I'm saying user named "nagios" to avoid confusion with software called "Nagios.")
Re: Disk Critical
Posted: Thu Jun 05, 2014 11:14 am
by Metalliogre
I am running Ubuntu 12
Re: Disk Critical
Posted: Thu Jun 05, 2014 11:29 am
by eloyd
EDIT: I didn't realize that this was page 2 of the comments, but I still think we've missed your actual check command and services entry.
I may have missed something, but I don't think we've seen the configuration that shows what the check is you're actually performing. Can you share that with us? services.cfg and checkcommands.cfg would be the default filenames that that information is in.
Re: Disk Critical
Posted: Thu Jun 05, 2014 11:30 am
by Stuart Watts
The fact that these are .gvfs (Gnome Virtual File System?) mounts in home directories makes me think you've got something cool like networked home directories. If that's the case, the fileserver should hopefully be monitored already, so you could simply exclude those mount points from the check?
In your "commands.cfg", find the entry that relates to "check_all_disk". The comandline for this probably calls the plugin "check_disk". That plugin can be configured to ignore a mount point (-x), ignore a type of mount (-X), and even ignore mount points based on a regex (-r). Might be feasible to use one of these to ignore these checks?
Re: Disk Critical
Posted: Thu Jun 05, 2014 2:54 pm
by sreinhardt
Nice catch Stuart! Metal could you confirm if this is the case, and provide the current service and command definitions so that we may help you sort this out.