added munin files.
This commit is contained in:
67
etc/munin/aqhome_humidity
Executable file
67
etc/munin/aqhome_humidity
Executable file
@@ -0,0 +1,67 @@
|
||||
#!/bin/bash
|
||||
|
||||
output_config() {
|
||||
echo "graph_order buero server2 server2"
|
||||
echo "graph_title Luftfeuchtigkeit"
|
||||
echo "graph_args --base 1000 -u 100 -l -0"
|
||||
echo "graph_vlabel %"
|
||||
echo "graph_scale no"
|
||||
echo "graph_category aqhome"
|
||||
|
||||
echo "buero.label Buero"
|
||||
echo "server1.label Serverschrank vorne"
|
||||
echo "server2.label Serverschrank hinten"
|
||||
}
|
||||
|
||||
|
||||
output_values() {
|
||||
printf "buero.value %f\n" $(get_var_buero)
|
||||
printf "server1.value %f\n" $(get_var_server_front)
|
||||
printf "server2.value %f\n" $(get_var_server_back)
|
||||
}
|
||||
|
||||
|
||||
get_var_buero() {
|
||||
/usr/local/bin/aqhome-tool getdata -N nodes/e7882098/2/humidity -tb -300 -M | cut -d$'\t' -f 2
|
||||
}
|
||||
|
||||
|
||||
get_var_server_front() {
|
||||
/usr/local/bin/aqhome-tool getdata -N nodes/5f8883d2/2/humidity -tb -300 -M | cut -d$'\t' -f 2
|
||||
}
|
||||
|
||||
get_var_server_back() {
|
||||
/usr/local/bin/aqhome-tool getdata -N nodes/75766d68/2/humidity -tb -300 -M | cut -d$'\t' -f 2
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
output_usage() {
|
||||
printf >&2 "%s - munin plugin to monitor humidity\n" ${0##*/}
|
||||
printf >&2 "Usage: %s [config]\n" ${0##*/}
|
||||
}
|
||||
|
||||
case $# in
|
||||
0)
|
||||
output_values
|
||||
;;
|
||||
1)
|
||||
case $1 in
|
||||
config)
|
||||
output_config
|
||||
;;
|
||||
*)
|
||||
output_usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
output_usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
69
etc/munin/aqhome_node2_errors
Executable file
69
etc/munin/aqhome_node2_errors
Executable file
@@ -0,0 +1,69 @@
|
||||
#!/bin/bash
|
||||
|
||||
output_config() {
|
||||
echo "graph_order node_crc node_io node_coll"
|
||||
echo "graph_title Node 2 Bus Probleme"
|
||||
# echo "graph_args --base 1000 -u 50 -l -20"
|
||||
echo "graph_args --base 1000 -l 0"
|
||||
echo "graph_vlabel Nachrichten"
|
||||
echo "graph_scale no"
|
||||
echo "graph_category aqhome"
|
||||
|
||||
echo "node_crc.label CRC errors"
|
||||
echo "node_io.label IO errors"
|
||||
echo "node_coll.label collisions"
|
||||
}
|
||||
|
||||
|
||||
output_values() {
|
||||
printf "node_crc.value %f\n" $(get_var_crc)
|
||||
printf "node_io.value %f\n" $(get_var_io)
|
||||
printf "node_coll.value %f\n" $(get_var_coll)
|
||||
}
|
||||
|
||||
|
||||
get_var_crc() {
|
||||
/usr/local/bin/aqhome-tool getdata -N nodes/5d91f355/net/crcerrors -tb -300 -M | cut -d$'\t' -f 2
|
||||
}
|
||||
|
||||
|
||||
get_var_io() {
|
||||
/usr/local/bin/aqhome-tool getdata -N nodes/5d91f355/net/ioerrors -tb -300 -M | cut -d$'\t' -f 2
|
||||
}
|
||||
|
||||
|
||||
get_var_coll() {
|
||||
/usr/local/bin/aqhome-tool getdata -N nodes/5d91f355/net/collisions -tb -300 -M | cut -d$'\t' -f 2
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
output_usage() {
|
||||
printf >&2 "%s - munin plugin to monitor packets\n" ${0##*/}
|
||||
printf >&2 "Usage: %s [config]\n" ${0##*/}
|
||||
}
|
||||
|
||||
case $# in
|
||||
0)
|
||||
output_values
|
||||
;;
|
||||
1)
|
||||
case $1 in
|
||||
config)
|
||||
output_config
|
||||
;;
|
||||
*)
|
||||
output_usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
output_usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
66
etc/munin/aqhome_packets_1
Executable file
66
etc/munin/aqhome_packets_1
Executable file
@@ -0,0 +1,66 @@
|
||||
#!/bin/bash
|
||||
|
||||
DEVICE="nodes/e7882098"
|
||||
|
||||
|
||||
|
||||
output_config() {
|
||||
echo "graph_order node_pckin node_pckout"
|
||||
echo "graph_title Node 1 Pakete"
|
||||
# echo "graph_args --base 1000 -u 50 -l -20"
|
||||
echo "graph_args --base 1000 -l 0"
|
||||
echo "graph_vlabel Nachrichten"
|
||||
echo "graph_scale no"
|
||||
echo "graph_category aqhome"
|
||||
|
||||
echo "node_pckin.label eingehend"
|
||||
echo "node_pckout.label ausgehend"
|
||||
}
|
||||
|
||||
|
||||
output_values() {
|
||||
printf "node_pckin.value %f\n" $(get_var_pckin)
|
||||
printf "node_pckout.value %f\n" $(get_var_pckout)
|
||||
}
|
||||
|
||||
|
||||
get_var_pckin() {
|
||||
/usr/local/bin/aqhome-tool getlastdata -N $DEVICE/net/packetsIn | cut -d$'\t' -f 2
|
||||
}
|
||||
|
||||
|
||||
get_var_pckout() {
|
||||
/usr/local/bin/aqhome-tool getlastdata -N $DEVICE/net/packetsOut | cut -d$'\t' -f 2
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
output_usage() {
|
||||
printf >&2 "%s - munin plugin to monitor temperature\n" ${0##*/}
|
||||
printf >&2 "Usage: %s [config]\n" ${0##*/}
|
||||
}
|
||||
|
||||
case $# in
|
||||
0)
|
||||
output_values
|
||||
;;
|
||||
1)
|
||||
case $1 in
|
||||
config)
|
||||
output_config
|
||||
;;
|
||||
*)
|
||||
output_usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
output_usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
66
etc/munin/aqhome_packets_2
Executable file
66
etc/munin/aqhome_packets_2
Executable file
@@ -0,0 +1,66 @@
|
||||
#!/bin/bash
|
||||
|
||||
DEVICE="nodes/e7882098"
|
||||
|
||||
|
||||
|
||||
output_config() {
|
||||
echo "graph_order node_pckin node_pckout"
|
||||
echo "graph_title Node 2 Pakete"
|
||||
# echo "graph_args --base 1000 -u 50 -l -20"
|
||||
echo "graph_args --base 1000 -l 0"
|
||||
echo "graph_vlabel Nachrichten"
|
||||
echo "graph_scale no"
|
||||
echo "graph_category aqhome"
|
||||
|
||||
echo "node_pckin.label eingehend"
|
||||
echo "node_pckout.label ausgehend"
|
||||
}
|
||||
|
||||
|
||||
output_values() {
|
||||
printf "node_pckin.value %f\n" $(get_var_pckin)
|
||||
printf "node_pckout.value %f\n" $(get_var_pckout)
|
||||
}
|
||||
|
||||
|
||||
get_var_pckin() {
|
||||
/usr/local/bin/aqhome-tool getlastdata -N $DEVICE/net/packetsIn | cut -d$'\t' -f 2
|
||||
}
|
||||
|
||||
|
||||
get_var_pckout() {
|
||||
/usr/local/bin/aqhome-tool getlastdata -N $DEVICE/net/packetsOut | cut -d$'\t' -f 2
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
output_usage() {
|
||||
printf >&2 "%s - munin plugin to monitor temperature\n" ${0##*/}
|
||||
printf >&2 "Usage: %s [config]\n" ${0##*/}
|
||||
}
|
||||
|
||||
case $# in
|
||||
0)
|
||||
output_values
|
||||
;;
|
||||
1)
|
||||
case $1 in
|
||||
config)
|
||||
output_config
|
||||
;;
|
||||
*)
|
||||
output_usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
output_usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
61
etc/munin/aqhome_packets_3
Executable file
61
etc/munin/aqhome_packets_3
Executable file
@@ -0,0 +1,61 @@
|
||||
#!/bin/sh
|
||||
|
||||
output_config() {
|
||||
echo "graph_order node_pckin node_pckout"
|
||||
echo "graph_title Node 3 Pakete"
|
||||
# echo "graph_args --base 1000 -u 50 -l -20"
|
||||
echo "graph_args --base 1000 -l 0"
|
||||
echo "graph_vlabel Nachrichten"
|
||||
echo "graph_scale no"
|
||||
echo "graph_category aqhome"
|
||||
|
||||
echo "node_pckin.label eingehend"
|
||||
echo "node_pckout.label ausgehend"
|
||||
}
|
||||
|
||||
|
||||
output_values() {
|
||||
printf "node_pckin.value %f\n" $(get_var_pckin)
|
||||
printf "node_pckout.value %f\n" $(get_var_pckout)
|
||||
}
|
||||
|
||||
|
||||
get_var_pckin() {
|
||||
cat /var/cache/aqhome/mqttlog/buero_rack_back_net_packetsin
|
||||
}
|
||||
|
||||
get_var_pckout() {
|
||||
cat /var/cache/aqhome/mqttlog/buero_rack_back_net_packetsout
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
output_usage() {
|
||||
printf >&2 "%s - munin plugin to monitor packets\n" ${0##*/}
|
||||
printf >&2 "Usage: %s [config]\n" ${0##*/}
|
||||
}
|
||||
|
||||
case $# in
|
||||
0)
|
||||
output_values
|
||||
;;
|
||||
1)
|
||||
case $1 in
|
||||
config)
|
||||
output_config
|
||||
;;
|
||||
*)
|
||||
output_usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
output_usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
56
etc/munin/aqhome_power
Normal file
56
etc/munin/aqhome_power
Normal file
@@ -0,0 +1,56 @@
|
||||
#!/bin/bash
|
||||
|
||||
output_config() {
|
||||
echo "graph_order stube_plug01"
|
||||
echo "graph_title Stromverbrauch"
|
||||
# echo "graph_args --base 1000 -u 50 -l -20"
|
||||
echo "graph_args --base 1000 -l 0"
|
||||
echo "graph_vlabel Watt"
|
||||
echo "graph_scale no"
|
||||
echo "graph_category aqhome"
|
||||
|
||||
echo "stube_plug01.label Stube/Heimkinosystem"
|
||||
}
|
||||
|
||||
|
||||
output_values() {
|
||||
printf "stube_plug01.value %f\n" $(get_var_stube_plug01)
|
||||
}
|
||||
|
||||
|
||||
get_var_stube_plug01() {
|
||||
/usr/local/bin/aqhome-tool getdata -N mqtt/plug01/powerusage -tb -300 -M | cut -d$'\t' -f 2
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
output_usage() {
|
||||
printf >&2 "%s - munin plugin to monitor power usage\n" ${0##*/}
|
||||
printf >&2 "Usage: %s [config]\n" ${0##*/}
|
||||
}
|
||||
|
||||
case $# in
|
||||
0)
|
||||
output_values
|
||||
;;
|
||||
1)
|
||||
case $1 in
|
||||
config)
|
||||
output_config
|
||||
;;
|
||||
*)
|
||||
output_usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
output_usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
56
etc/munin/aqhome_power2
Executable file
56
etc/munin/aqhome_power2
Executable file
@@ -0,0 +1,56 @@
|
||||
#!/bin/bash
|
||||
|
||||
output_config() {
|
||||
echo "graph_order stube_plug01"
|
||||
echo "graph_title Stromverbrauch"
|
||||
# echo "graph_args --base 1000 -u 50 -l -20"
|
||||
echo "graph_args --base 1000 -l 0"
|
||||
echo "graph_vlabel Watt"
|
||||
echo "graph_scale no"
|
||||
echo "graph_category aqhome"
|
||||
|
||||
echo "stube_plug01.label Stube/Heimkinosystem"
|
||||
}
|
||||
|
||||
|
||||
output_values() {
|
||||
printf "stube_plug01.value %f\n" $(get_var_stube_plug01)
|
||||
}
|
||||
|
||||
|
||||
get_var_stube_plug01() {
|
||||
/usr/local/bin/aqhome-tool getdata -N mqtt/plug01/powerusage -tb -300 -M | cut -d$'\t' -f 2
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
output_usage() {
|
||||
printf >&2 "%s - munin plugin to monitor power usage\n" ${0##*/}
|
||||
printf >&2 "Usage: %s [config]\n" ${0##*/}
|
||||
}
|
||||
|
||||
case $# in
|
||||
0)
|
||||
output_values
|
||||
;;
|
||||
1)
|
||||
case $1 in
|
||||
config)
|
||||
output_config
|
||||
;;
|
||||
*)
|
||||
output_usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
output_usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
66
etc/munin/aqhome_temp
Executable file
66
etc/munin/aqhome_temp
Executable file
@@ -0,0 +1,66 @@
|
||||
#!/bin/bash
|
||||
|
||||
output_config() {
|
||||
echo "graph_order buero server1 server2"
|
||||
echo "graph_title Raumtemperaturen"
|
||||
echo "graph_args --base 1000 -u 50 -l -20"
|
||||
echo "graph_vlabel C"
|
||||
echo "graph_scale no"
|
||||
echo "graph_category aqhome"
|
||||
|
||||
echo "buero.label Buero"
|
||||
echo "server1.label Serverschrank vorne"
|
||||
echo "server2.label Serverschrank hinten"
|
||||
}
|
||||
|
||||
|
||||
output_values() {
|
||||
printf "buero.value %f\n" $(get_var_buero)
|
||||
printf "server1.value %f\n" $(get_var_server_front)
|
||||
printf "server2.value %f\n" $(get_var_server_back)
|
||||
}
|
||||
|
||||
|
||||
get_var_buero() {
|
||||
/usr/local/bin/aqhome-tool getdata -N nodes/e7882098/1/temperature -tb -300 -M | cut -d$'\t' -f 2
|
||||
}
|
||||
|
||||
|
||||
get_var_server_back() {
|
||||
/usr/local/bin/aqhome-tool getdata -N nodes/75766d68/1/temperature -tb -300 -M | cut -d$'\t' -f 2
|
||||
}
|
||||
|
||||
get_var_server_front() {
|
||||
/usr/local/bin/aqhome-tool getdata -N nodes/5f8883d2/1/temperature -tb -300 -M | cut -d$'\t' -f 2
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
output_usage() {
|
||||
printf >&2 "%s - munin plugin to monitor temperature\n" ${0##*/}
|
||||
printf >&2 "Usage: %s [config]\n" ${0##*/}
|
||||
}
|
||||
|
||||
case $# in
|
||||
0)
|
||||
output_values
|
||||
;;
|
||||
1)
|
||||
case $1 in
|
||||
config)
|
||||
output_config
|
||||
;;
|
||||
*)
|
||||
output_usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
output_usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user