[Nagiosplug-help] Regarding check_disk

Thomas Guyot-Sionnest dermoth at aei.ca
Sat Nov 29 18:36:09 CET 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 29/11/08 02:59 AM, Pak, Dmitry (dmpa) wrote:
> Actually I did ran commands under root, until you've advised to su to
> Nagios user (completely forgot about it!).
>  
> Now I did all the checks logged as Nagios users, and I have same results
> - where it's working - it's working, others still don't.
>  
> Could it be somehow related to ssh or probably NIS configuration (since
> I do have Nagios user created in NIS)?

I guess your solaris has some fine-grained access control and normal
users can't get the mount list (if "df" works, is it setuid?).

Since check_disk is a C plugin you can setuid it instead of using sudo,
(and for extra-security, chgrp it to the nagios group and don't allow
normal users to run it), although I'm pretty sure solaris allow a way to
give the proper right to your Nagios suer too..

> How does check_disk plugin work? Does it use "df" cmd or somewhat else?

Getting the mounts and fs usage is different on every operating system.
Check_disk use functions in Gnulib that implement it in in a portable
way, so we don't have to care about each specific operating system.

You can see more details about check_disk by using the -v (verbose)
flag; repeat it up to three times (-vvv) for extra verbosity. You can
also see which syscall are being run, including return values and
failures if you run it with truss, i.e.
$ truss ./check_disk <arguments>

- --
Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJMX2I6dZ+Kt5BchYRAvfqAJ4rB2P8+AnfdFlmna+0CCgIIUoFQACg7Ojj
+W5Tu6DKEaLVsQX/hn6E8/I=
=8Xqm
-----END PGP SIGNATURE-----




More information about the Help mailing list