]> granicus.if.org Git - icinga2/commitdiff
Add documentation for sudoers configuration
authorBarbUk <julien.virey@gmail.com>
Wed, 28 Nov 2018 09:39:51 +0000 (13:39 +0400)
committerBarbUk <julien.virey@gmail.com>
Wed, 28 Nov 2018 09:39:51 +0000 (13:39 +0400)
doc/10-icinga-template-library.md

index de36703a93fc0a5f28c66a7e29680230acf65f3d..5b705a9b6a93650abd11f6c333a2cb44f0759906 100644 (file)
@@ -3111,6 +3111,18 @@ ceph_details     | **Optional.** Run 'ceph health detail'.
 The [btrfs plugin](https://github.com/knorrie/python-btrfs/)
 is used to check the btrfs storage health on the server.
 
+The plugin requires `sudo` permissions.
+You can add a sudoers file to allow your monitoring user to use the plugin, i.e. edit /etc/sudoers.d/nagios and add:
+```
+nagios ALL=(root) NOPASSWD:/usr/lib/nagios/plugins/check_btrfs
+```
+
+and set the correct permissions:
+```bash
+chown -c root: /etc/sudoers.d/nagios
+chmod -c 0440 /etc/sudoers.d/nagios
+```
+
 [monitoring-plugins-btrfs](https://packages.debian.org/monitoring-plugins-btrfs) provide the necessary binary on debian/ubuntu.
 
 Custom attributes passed as [command parameters](03-monitoring-basics.md#command-passing-parameters):