diff options
author | Ilya Mashchenko <ilyamaschenko@gmail.com> | 2018-10-26 08:57:34 +0900 |
---|---|---|
committer | Costa Tsaousis <costa@tsaousis.gr> | 2018-10-26 02:57:34 +0300 |
commit | c6cce6bd2accec27a61243e1ffa38826ac2a4892 (patch) | |
tree | 734d28a099ae2c12f4858a8d425cdf549581db0e /collectors/python.d.plugin/samba | |
parent | 6cf0d0c0169be2588ad2e199d911d7b10df58cb2 (diff) |
Disable python sudo modules by default (#4477)
* adaptec_raid: check if `arcconf` is available first
* adaptec_raid: disable by default and update docs
* megacli: disable by default and update docs
* samba: disable by default and update docs
* samba megacli adaptec readme fix
* adaptec readme fix
Diffstat (limited to 'collectors/python.d.plugin/samba')
-rw-r--r-- | collectors/python.d.plugin/samba/README.md | 26 | ||||
-rw-r--r-- | collectors/python.d.plugin/samba/samba.chart.py | 3 |
2 files changed, 19 insertions, 10 deletions
diff --git a/collectors/python.d.plugin/samba/README.md b/collectors/python.d.plugin/samba/README.md index 47a5551c06..44610d373a 100644 --- a/collectors/python.d.plugin/samba/README.md +++ b/collectors/python.d.plugin/samba/README.md @@ -2,6 +2,13 @@ Performance metrics of Samba file sharing. +**Requirements:** +* `smbstatus` program +* `sudo` program +* `smbd` must be compiled with profiling enabled +* `smbd` must be started either with the `-P 1` option or inside `smb.conf` using `smbd profiling level` +* `netdata` user needs to be able to sudo the `smbstatus` program without password + It produces the following charts: 1. **Syscall R/Ws** in kilobytes/s @@ -40,22 +47,21 @@ It produces the following charts: * break * sessetup -### configuration +### prerequisite +This module uses `smbstatus` which can only be executed by root. It uses +`sudo` and assumes that it is configured such that the `netdata` user can +execute `smbstatus` as root without password. -Requires that smbd has been compiled with profiling enabled. Also required -that `smbd` was started either with the `-P 1` option or inside `smb.conf` -using `smbd profiling level`. +Add to `sudoers`: -This plugin uses `smbstatus -P` which can only be executed by root. It uses -sudo and assumes that it is configured such that the `netdata` user can -execute smbstatus as root without password. + netdata ALL=(root) NOPASSWD: /path/to/smbstatus -For example: +### configuration - netdata ALL=(ALL) NOPASSWD: /usr/bin/smbstatus -P + **samba** is disabled by default. Should be explicitly enabled in `python.d.conf`. ```yaml -update_every : 5 # update frequency +samba: yes ``` --- diff --git a/collectors/python.d.plugin/samba/samba.chart.py b/collectors/python.d.plugin/samba/samba.chart.py index 27c1c72ecc..b2278de9ef 100644 --- a/collectors/python.d.plugin/samba/samba.chart.py +++ b/collectors/python.d.plugin/samba/samba.chart.py @@ -21,6 +21,9 @@ import re from bases.collection import find_binary from bases.FrameworkServices.ExecutableService import ExecutableService + +disabled_by_default = True + # default module values (can be overridden per job in `config`) update_every = 5 priority = 60000 |