mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2026-03-25 09:37:28 +01:00
Add/update sudo configuration to all collectors with 'use_sudo'
This commit is contained in:
@@ -81,3 +81,16 @@ Metrics:
|
|||||||
* `gpfs_metaops_rate` (if `send_total_values == true` and `send_derived_values == true`)
|
* `gpfs_metaops_rate` (if `send_total_values == true` and `send_derived_values == true`)
|
||||||
|
|
||||||
The collector adds a `filesystem` tag to all metrics
|
The collector adds a `filesystem` tag to all metrics
|
||||||
|
|
||||||
|
`mmpmon` typically require root to run.
|
||||||
|
In order to run `cc-metric-collector` without root priviliges, you can enable `use_sudo`.
|
||||||
|
Add a file like this in `/etc/sudoers.d/` to allow `cc-metric-collector` to run the required command:
|
||||||
|
|
||||||
|
```
|
||||||
|
# Do not log the following sudo commands from monitoring, since this causes a lot of log spam.
|
||||||
|
# However keep log_denied enabled, to detect failures
|
||||||
|
Defaults: monitoring !log_allowed, !pam_session
|
||||||
|
|
||||||
|
# Allow to use mmpmon
|
||||||
|
monitoring ALL = (root) NOPASSWD:/absolute/path/to/mmpmon -p -s
|
||||||
|
```
|
||||||
@@ -23,9 +23,9 @@ The `ipmistat` collector reads data from `ipmitool` (`ipmitool sensor`) or `ipmi
|
|||||||
|
|
||||||
The metrics depend on the output of the underlying tools but contain temperature, power and energy metrics.
|
The metrics depend on the output of the underlying tools but contain temperature, power and energy metrics.
|
||||||
|
|
||||||
ipmitool and ipmi-sensors typically require root to run.
|
`ipmitool` and `ipmi-sensors` typically require root to run.
|
||||||
In order to cc-metric-collector without root priviliges, you can enable `use_sudo`.
|
In order to run `cc-metric-collector` without root priviliges, you can enable `use_sudo`.
|
||||||
Add a file like this in /etc/sudoers.d/ to allow cc-metric-collector to run this command:
|
Add a file like this in `/etc/sudoers.d/` to allow `cc-metric-collector` to run the required commands:
|
||||||
|
|
||||||
```
|
```
|
||||||
# Do not log the following sudo commands from monitoring, since this causes a lot of log spam.
|
# Do not log the following sudo commands from monitoring, since this causes a lot of log spam.
|
||||||
|
|||||||
@@ -55,3 +55,16 @@ Metrics:
|
|||||||
* `lustre_inode_permission_diff` (if `send_diff_values == true`)
|
* `lustre_inode_permission_diff` (if `send_diff_values == true`)
|
||||||
|
|
||||||
This collector adds an `device` tag.
|
This collector adds an `device` tag.
|
||||||
|
|
||||||
|
`lctl` typically require root to run.
|
||||||
|
In order to run `cc-metric-collector` without root priviliges, you can enable `use_sudo`.
|
||||||
|
Add a file like this in `/etc/sudoers.d/` to allow `cc-metric-collector` to run the required command:
|
||||||
|
|
||||||
|
```
|
||||||
|
# Do not log the following sudo commands from monitoring, since this causes a lot of log spam.
|
||||||
|
# However keep log_denied enabled, to detect failures
|
||||||
|
Defaults: monitoring !log_allowed, !pam_session
|
||||||
|
|
||||||
|
# Allow to use lctl
|
||||||
|
monitoring ALL = (root) NOPASSWD:/absolute/path/to/lctl get_param llite.*.stats
|
||||||
|
```
|
||||||
@@ -50,3 +50,18 @@ Metrics:
|
|||||||
* `smartmon_errlog_entries`: Error log entries
|
* `smartmon_errlog_entries`: Error log entries
|
||||||
* `smartmon_warn_temp_time`: Time above the warning temperature threshold
|
* `smartmon_warn_temp_time`: Time above the warning temperature threshold
|
||||||
* `smartmon_crit_comp_time`: Time above the critical composite temperature threshold
|
* `smartmon_crit_comp_time`: Time above the critical composite temperature threshold
|
||||||
|
|
||||||
|
`smartctl` typically require root to run.
|
||||||
|
In order to run `cc-metric-collector` without root priviliges, you can enable `use_sudo`.
|
||||||
|
Add a file like this in `/etc/sudoers.d/` to allow `cc-metric-collector` to run the required command:
|
||||||
|
|
||||||
|
```
|
||||||
|
# Do not log the following sudo commands from monitoring, since this causes a lot of log spam.
|
||||||
|
# However keep log_denied enabled, to detect failures
|
||||||
|
Defaults: monitoring !log_allowed, !pam_session
|
||||||
|
|
||||||
|
# Allow to use lctl
|
||||||
|
monitoring ALL = (root) NOPASSWD:/absolute/path/to/smartctl --json=c --device=* "--all" *
|
||||||
|
# Or add individual rules for each device
|
||||||
|
# monitoring ALL = (root) NOPASSWD:/absolute/path/to/smartctl --json=c --device=<device_type> "--all" <device>
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user