diff options
author | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2016-02-08 01:22:58 +0200 |
---|---|---|
committer | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2016-02-08 01:22:58 +0200 |
commit | 7c0ba6a675cbca3a6fa1a0b79a37259ad4b52aee (patch) | |
tree | 8c29ac1d6ef26cffab549f2da21cde1ca12b41f2 /charts.d/nut.chart.sh | |
parent | 20051bfef74b701d5e67af84eca8b416bc5f5e2a (diff) |
added a new element on all charts: context, which is the template upon the chart is build, changed the meaning of element: family, which now reflects the submenu of the dashboard; changed the priorities of most charts to allow the dashboard have dynamic sorting; added submenus to most categories of the main menu; now the dashboard is completely dynamic (except the top key charts)
Diffstat (limited to 'charts.d/nut.chart.sh')
-rwxr-xr-x | charts.d/nut.chart.sh | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/charts.d/nut.chart.sh b/charts.d/nut.chart.sh index 1a60524115..343c6d9cd1 100755 --- a/charts.d/nut.chart.sh +++ b/charts.d/nut.chart.sh @@ -9,6 +9,9 @@ nut_update_every=2 nut_timeout=2 +# the priority of nut related to other charts +nut_priority=90000 + declare -A nut_ids=() nut_get_all() { @@ -58,34 +61,34 @@ nut_create() { for x in "${nut_ids[@]}" do cat <<EOF -CHART nut_$x.charge '' "UPS Charge" "percentage" ups_$x nut area 21001 $nut_update_every +CHART nut_$x.charge '' "UPS Charge" "percentage" ups nut.charge area $[nut_priority + 1] $nut_update_every DIMENSION battery_charge charge absolute 1 100 -CHART nut_$x.battery_voltage '' "UPS Battery Voltage" "Volts" ups_$x nut line 21002 $nut_update_every +CHART nut_$x.battery_voltage '' "UPS Battery Voltage" "Volts" ups nut.battery.voltage line $[nut_priority + 2] $nut_update_every DIMENSION battery_voltage voltage absolute 1 100 DIMENSION battery_voltage_high high absolute 1 100 DIMENSION battery_voltage_low low absolute 1 100 DIMENSION battery_voltage_nominal nominal absolute 1 100 -CHART nut_$x.input_voltage '' "UPS Input Voltage" "Volts" ups_$x nut line 21003 $nut_update_every +CHART nut_$x.input_voltage '' "UPS Input Voltage" "Volts" input nut.input.voltage line $[nut_priority + 3] $nut_update_every DIMENSION input_voltage voltage absolute 1 100 DIMENSION input_voltage_fault fault absolute 1 100 DIMENSION input_voltage_nominal nominal absolute 1 100 -CHART nut_$x.input_current '' "UPS Input Current" "Ampere" ups_$x nut line 21004 $nut_update_every +CHART nut_$x.input_current '' "UPS Input Current" "Ampere" input nut.input.current line $[nut_priority + 4] $nut_update_every DIMENSION input_current_nominal nominal absolute 1 100 -CHART nut_$x.input_frequency '' "UPS Input Frequency" "Hz" ups_$x nut line 21005 $nut_update_every +CHART nut_$x.input_frequency '' "UPS Input Frequency" "Hz" input nut.input.frequency line $[nut_priority + 5] $nut_update_every DIMENSION input_frequency frequency absolute 1 100 DIMENSION input_frequency_nominal nominal absolute 1 100 -CHART nut_$x.output_voltage '' "UPS Output Voltage" "Volts" ups_$x nut line 21006 $nut_update_every +CHART nut_$x.output_voltage '' "UPS Output Voltage" "Volts" output nut.output.voltage line $[nut_priority + 6] $nut_update_every DIMENSION output_voltage voltage absolute 1 100 -CHART nut_$x.load '' "UPS Load" "percentage" ups_$x nut area 21000 $nut_update_every +CHART nut_$x.load '' "UPS Load" "percentage" ups nut.load area $[nut_priority] $nut_update_every DIMENSION load load absolute 1 100 -CHART nut_$x.temp '' "UPS Temperature" "temperature" ups_$x nut line 21007 $nut_update_every +CHART nut_$x.temp '' "UPS Temperature" "temperature" ups nut.temperature line $[nut_priority + 7] $nut_update_every DIMENSION temp temp absolute 1 100 EOF done |