mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 14:16:00 +00:00
tasmota: simplify suggests caclulation
This commit is contained in:
parent
f1e354ebd3
commit
7bb5e2c0b1
1 changed files with 5 additions and 35 deletions
|
@ -16,9 +16,9 @@ ln -s /usr/share/munin/plugins/tasmota_ /etc/munin/plugins/tasmota_hostname_curr
|
||||||
|
|
||||||
Plugin also implements suggests, so if you have nodeattr installed and
|
Plugin also implements suggests, so if you have nodeattr installed and
|
||||||
/etc/genders populated with "tasmota" as well as "powermon",
|
/etc/genders populated with "tasmota" as well as "powermon",
|
||||||
"DS18B20","SCD40", "PMS5003" or "millivolts" flags for those tasmota
|
"DS18B20", "temperature", "SCD40", "PMS5003" or "millivolts" flags for
|
||||||
devices that implement energy or temperature monitoring, you can run
|
those tasmota devices that implement energy or temperature monitoring,
|
||||||
an ansible play like this to set up your links:
|
you can run an ansible play like this to set up your links:
|
||||||
https://github.com/spacelama/ansible-initial-server-setup/tree/master/roles/monitoring/tasks
|
https://github.com/spacelama/ansible-initial-server-setup/tree/master/roles/monitoring/tasks
|
||||||
|
|
||||||
=head1 APPLICABLE SYSTEMS
|
=head1 APPLICABLE SYSTEMS
|
||||||
|
@ -84,38 +84,8 @@ if [ "$1" = "suggest" ]; then
|
||||||
echo "${device}_${i}"
|
echo "${device}_${i}"
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
nodeattr -n '(tasmota || beken) && temperature' | while read -r device ; do
|
for i in temperature DS18B20 SCD40 PMS5003 millivolts switch dimmer ; do
|
||||||
for i in temperature ; do
|
nodeattr -n "(tasmota || beken) && $i" | while read -r device ; do
|
||||||
echo "${device}_${i}"
|
|
||||||
done
|
|
||||||
done
|
|
||||||
nodeattr -n '(tasmota || beken) && DS18B20' | while read -r device ; do
|
|
||||||
for i in DS18B20 ; do
|
|
||||||
echo "${device}_${i}"
|
|
||||||
done
|
|
||||||
done
|
|
||||||
nodeattr -n '(tasmota || beken) && SCD40' | while read -r device ; do
|
|
||||||
for i in SCD40 ; do
|
|
||||||
echo "${device}_${i}"
|
|
||||||
done
|
|
||||||
done
|
|
||||||
nodeattr -n '(tasmota || beken) && PMS5003' | while read -r device ; do
|
|
||||||
for i in PMS5003 ; do
|
|
||||||
echo "${device}_${i}"
|
|
||||||
done
|
|
||||||
done
|
|
||||||
nodeattr -n '(tasmota || beken) && millivolts' | while read -r device ; do
|
|
||||||
for i in millivolts ; do
|
|
||||||
echo "${device}_${i}"
|
|
||||||
done
|
|
||||||
done
|
|
||||||
nodeattr -n '(tasmota || beken) && switch' | while read -r device ; do
|
|
||||||
for i in switch ; do
|
|
||||||
echo "${device}_${i}"
|
|
||||||
done
|
|
||||||
done
|
|
||||||
nodeattr -n '(tasmota || beken) && dimmer' | while read -r device ; do
|
|
||||||
for i in dimmer ; do
|
|
||||||
echo "${device}_${i}"
|
echo "${device}_${i}"
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue