summaryrefslogtreecommitdiffstats
path: root/collectors/charts.d.plugin/sensors
diff options
context:
space:
mode:
Diffstat (limited to 'collectors/charts.d.plugin/sensors')
-rw-r--r--collectors/charts.d.plugin/sensors/README.md35
-rw-r--r--collectors/charts.d.plugin/sensors/sensors.chart.sh16
2 files changed, 34 insertions, 17 deletions
diff --git a/collectors/charts.d.plugin/sensors/README.md b/collectors/charts.d.plugin/sensors/README.md
index cee3f601c..2a1cdb676 100644
--- a/collectors/charts.d.plugin/sensors/README.md
+++ b/collectors/charts.d.plugin/sensors/README.md
@@ -19,20 +19,37 @@ The plugin will provide charts for all configured system sensors
The plugin will create Netdata charts for:
-1. **Temperature**
-2. **Voltage**
-3. **Current**
-4. **Power**
-5. **Fans Speed**
-6. **Energy**
-7. **Humidity**
+1. **Temperature**
+2. **Voltage**
+3. **Current**
+4. **Power**
+5. **Fans Speed**
+6. **Energy**
+7. **Humidity**
One chart for every sensor chip found and each of the above will be created.
+## Enable the collector
+
+The `sensors` collector is disabled by default. To enable it, edit the `charts.d.conf` file using `edit-config` from the
+Netdata [config directory](/docs/configure/nodes.md), which is typically at `/etc/netdata`.
+
+```bash
+cd /etc/netdata # Replace this path with your Netdata config directory, if different
+sudo ./edit-config charts.d.conf
+```
+
+It also needs to be set to "force" to be enabled:
+
+```shell
+# example=force
+sensors=force
+```
+
## Configuration
-Edit the `charts.d/sensors.conf` configuration file using `edit-config` from the Netdata [config
-directory](/docs/configure/nodes.md), which is typically at `/etc/netdata`.
+Edit the `charts.d/sensors.conf` configuration file using `edit-config` from the
+Netdata [config directory](/docs/configure/nodes.md), which is typically at `/etc/netdata`.
```bash
cd /etc/netdata # Replace this path with your Netdata config directory, if different
diff --git a/collectors/charts.d.plugin/sensors/sensors.chart.sh b/collectors/charts.d.plugin/sensors/sensors.chart.sh
index b92187772..bff381f1c 100644
--- a/collectors/charts.d.plugin/sensors/sensors.chart.sh
+++ b/collectors/charts.d.plugin/sensors/sensors.chart.sh
@@ -143,7 +143,7 @@ sensors_create() {
files="$(sensors_check_files "$files")"
files="$(sensors_check_temp_type "$files")"
[ -z "$files" ] && continue
- echo "CHART sensors.temp_$id '' '$name Temperature' 'Celsius' 'temperature' 'sensors.temp' line $((sensors_priority + 1)) $sensors_update_every"
+ echo "CHART sensors.temp_$id '' '$name Temperature' 'Celsius' 'temperature' 'sensors.temp' line $((sensors_priority + 1)) $sensors_update_every '' '' 'sensors'"
echo >>"$TMP_DIR/sensors.sh" "echo \"BEGIN sensors.temp_$id \$1\""
divisor=1000
;;
@@ -152,7 +152,7 @@ sensors_create() {
files="$(ls "$path"/in*_input 2>/dev/null)"
files="$(sensors_check_files "$files")"
[ -z "$files" ] && continue
- echo "CHART sensors.volt_$id '' '$name Voltage' 'Volts' 'voltage' 'sensors.volt' line $((sensors_priority + 2)) $sensors_update_every"
+ echo "CHART sensors.volt_$id '' '$name Voltage' 'Volts' 'voltage' 'sensors.volt' line $((sensors_priority + 2)) $sensors_update_every '' '' 'sensors'"
echo >>"$TMP_DIR/sensors.sh" "echo \"BEGIN sensors.volt_$id \$1\""
divisor=1000
;;
@@ -161,7 +161,7 @@ sensors_create() {
files="$(ls "$path"/curr*_input 2>/dev/null)"
files="$(sensors_check_files "$files")"
[ -z "$files" ] && continue
- echo "CHART sensors.curr_$id '' '$name Current' 'Ampere' 'current' 'sensors.curr' line $((sensors_priority + 3)) $sensors_update_every"
+ echo "CHART sensors.curr_$id '' '$name Current' 'Ampere' 'current' 'sensors.curr' line $((sensors_priority + 3)) $sensors_update_every '' '' 'sensors'"
echo >>"$TMP_DIR/sensors.sh" "echo \"BEGIN sensors.curr_$id \$1\""
divisor=1000
;;
@@ -170,7 +170,7 @@ sensors_create() {
files="$(ls "$path"/power*_input 2>/dev/null)"
files="$(sensors_check_files "$files")"
[ -z "$files" ] && continue
- echo "CHART sensors.power_$id '' '$name Power' 'Watt' 'power' 'sensors.power' line $((sensors_priority + 4)) $sensors_update_every"
+ echo "CHART sensors.power_$id '' '$name Power' 'Watt' 'power' 'sensors.power' line $((sensors_priority + 4)) $sensors_update_every '' '' 'sensors'"
echo >>"$TMP_DIR/sensors.sh" "echo \"BEGIN sensors.power_$id \$1\""
divisor=1000000
;;
@@ -179,7 +179,7 @@ sensors_create() {
files="$(ls "$path"/fan*_input 2>/dev/null)"
files="$(sensors_check_files "$files")"
[ -z "$files" ] && continue
- echo "CHART sensors.fan_$id '' '$name Fans Speed' 'Rotations / Minute' 'fans' 'sensors.fans' line $((sensors_priority + 5)) $sensors_update_every"
+ echo "CHART sensors.fan_$id '' '$name Fans Speed' 'Rotations / Minute' 'fans' 'sensors.fans' line $((sensors_priority + 5)) $sensors_update_every '' '' 'sensors'"
echo >>"$TMP_DIR/sensors.sh" "echo \"BEGIN sensors.fan_$id \$1\""
;;
@@ -187,7 +187,7 @@ sensors_create() {
files="$(ls "$path"/energy*_input 2>/dev/null)"
files="$(sensors_check_files "$files")"
[ -z "$files" ] && continue
- echo "CHART sensors.energy_$id '' '$name Energy' 'Joule' 'energy' 'sensors.energy' areastack $((sensors_priority + 6)) $sensors_update_every"
+ echo "CHART sensors.energy_$id '' '$name Energy' 'Joule' 'energy' 'sensors.energy' areastack $((sensors_priority + 6)) $sensors_update_every '' '' 'sensors'"
echo >>"$TMP_DIR/sensors.sh" "echo \"BEGIN sensors.energy_$id \$1\""
algorithm="incremental"
divisor=1000000
@@ -197,7 +197,7 @@ sensors_create() {
files="$(ls "$path"/humidity*_input 2>/dev/null)"
files="$(sensors_check_files "$files")"
[ -z "$files" ] && continue
- echo "CHART sensors.humidity_$id '' '$name Humidity' 'Percent' 'humidity' 'sensors.humidity' line $((sensors_priority + 7)) $sensors_update_every"
+ echo "CHART sensors.humidity_$id '' '$name Humidity' 'Percent' 'humidity' 'sensors.humidity' line $((sensors_priority + 7)) $sensors_update_every '' '' 'sensors'"
echo >>"$TMP_DIR/sensors.sh" "echo \"BEGIN sensors.humidity_$id \$1\""
divisor=1000
;;
@@ -237,7 +237,7 @@ sensors_create() {
# _update is called continuously, to collect the values
sensors_update() {
# the first argument to this function is the microseconds since last update
- # pass this parameter to the BEGIN statement (see bellow).
+ # pass this parameter to the BEGIN statement (see below).
# do all the work to collect / calculate the values
# for each dimension