mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-27 12:06:36 +02:00
telegraf updates for v1.7.0RC3 (#2204)
* new path of "vcgencmd" at raspiblitz v1.7.0RC2 * whitespaces + rename raspiblitz_ip_info -> ipinfo * add mempool info via bitcoincli Co-authored-by: Patrick Scheich <patrick.scheich@syscovery.de>
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# File: getraspiblitzipinfo.sh
|
# File: getraspiblitzipinfo.sh
|
||||||
# Date: 2020-10-04
|
# Date: 2021-04-19
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
# set the "debugLevel"
|
# set the "debugLevel"
|
||||||
@@ -203,7 +203,9 @@ fi
|
|||||||
|
|
||||||
# now create the output for the telegraf "[[inputs.exec]]" section in influx-line-format
|
# now create the output for the telegraf "[[inputs.exec]]" section in influx-line-format
|
||||||
#
|
#
|
||||||
# measurement: raspiblitz_ip_info
|
# 2021-04-19: rename measurement: "raspiblitz_ip_info" -> "ipinfo"
|
||||||
|
#
|
||||||
|
# measurement: ipinfo
|
||||||
#
|
#
|
||||||
# tags
|
# tags
|
||||||
# * host
|
# * host
|
||||||
@@ -229,7 +231,7 @@ for i in $( seq 0 4 ); do
|
|||||||
# create influx-line-format output
|
# create influx-line-format output
|
||||||
# only if there is a proper creation timestamp
|
# only if there is a proper creation timestamp
|
||||||
if [ ${creation_ts_curr[ $i ]} -gt 1000000000 ]; then
|
if [ ${creation_ts_curr[ $i ]} -gt 1000000000 ]; then
|
||||||
influxLine="raspiblitz_ip_info,origin=${origin[ $i ]},ipaddr=${ip_addr_curr[$i]},ipaddr_prev=${ip_addr_prev[$i]},ipaddr_changed=${has_changed[ $i ]} created=${creation_ts_curr[ $i ]}i,uptime=${ipaddr_online}i,changed=${has_changed[ $i ]}i"
|
influxLine="ipinfo,origin=${origin[ $i ]},ipaddr=${ip_addr_curr[$i]},ipaddr_prev=${ip_addr_prev[$i]},ipaddr_changed=${has_changed[ $i ]} created=${creation_ts_curr[ $i ]}i,uptime=${ipaddr_online}i,changed=${has_changed[ $i ]}i"
|
||||||
if [ -f "${logFile}" ]; then printf "%s: === %s\n" "$sts" "$influxLine" >> ${logFile} ; fi
|
if [ -f "${logFile}" ]; then printf "%s: === %s\n" "$sts" "$influxLine" >> ${logFile} ; fi
|
||||||
echo "${influxLine}"
|
echo "${influxLine}"
|
||||||
else
|
else
|
||||||
|
@@ -75,6 +75,22 @@
|
|||||||
data_format = "json"
|
data_format = "json"
|
||||||
|
|
||||||
|
|
||||||
|
#### Bitcoin related metric
|
||||||
|
#### basic information about the mempool
|
||||||
|
#### --> https://developer.bitcoin.org/reference/rpc/getmempoolinfo.html
|
||||||
|
##
|
||||||
|
## Most usefull fields...
|
||||||
|
## * loaded (boolean) True if the mempool is fully loaded
|
||||||
|
## * size (numeric) Current tx count
|
||||||
|
## * usage (numeric) Total memory usage for the mempool
|
||||||
|
##
|
||||||
|
[[inputs.exec]]
|
||||||
|
interval = "60s"
|
||||||
|
commands = ["/usr/local/bin/bitcoin-cli -conf=/mnt/hdd/bitcoin/bitcoin.conf getmempoolinfo" ]
|
||||||
|
name_override = "bitcoin_mempoolinfo"
|
||||||
|
data_format = "json"
|
||||||
|
|
||||||
|
|
||||||
#### Bitcoin related metric
|
#### Bitcoin related metric
|
||||||
#### information about network traffic, including bytes in, bytes out, and current time window
|
#### information about network traffic, including bytes in, bytes out, and current time window
|
||||||
#### --> https://developer.bitcoin.org/reference/rpc/getnettotals.html
|
#### --> https://developer.bitcoin.org/reference/rpc/getnettotals.html
|
||||||
@@ -203,6 +219,7 @@
|
|||||||
#####################################
|
#####################################
|
||||||
#### Hardware data: cpu/gpu temperature, voltage, cpu clock
|
#### Hardware data: cpu/gpu temperature, voltage, cpu clock
|
||||||
####
|
####
|
||||||
|
#### 2021-04-19 adopt to new path of "vcgencmd" at raspiblitz v1.7.0RC2
|
||||||
#####################################
|
#####################################
|
||||||
[[inputs.file]]
|
[[inputs.file]]
|
||||||
files = ["/sys/class/thermal/thermal_zone0/temp"]
|
files = ["/sys/class/thermal/thermal_zone0/temp"]
|
||||||
@@ -212,21 +229,21 @@
|
|||||||
|
|
||||||
|
|
||||||
[[inputs.exec]]
|
[[inputs.exec]]
|
||||||
commands = ["/opt/vc/bin/vcgencmd measure_temp"]
|
commands = ["/usr/bin/vcgencmd measure_temp"]
|
||||||
name_override = "gpu_temperature"
|
name_override = "gpu_temperature"
|
||||||
data_format = "grok"
|
data_format = "grok"
|
||||||
grok_patterns = ["%{NUMBER:value:float}"]
|
grok_patterns = ["%{NUMBER:value:float}"]
|
||||||
|
|
||||||
|
|
||||||
[[inputs.exec]]
|
[[inputs.exec]]
|
||||||
commands = ["/opt/vc/bin/vcgencmd measure_volts core"]
|
commands = ["/usr/bin/vcgencmd measure_volts core"]
|
||||||
name_override = "cpu_volts"
|
name_override = "cpu_volts"
|
||||||
data_format = "grok"
|
data_format = "grok"
|
||||||
grok_patterns = ["%{NUMBER:value:float}"]
|
grok_patterns = ["%{NUMBER:value:float}"]
|
||||||
|
|
||||||
|
|
||||||
[[inputs.exec]]
|
[[inputs.exec]]
|
||||||
commands = ["/opt/vc/bin/vcgencmd measure_clock arm"]
|
commands = ["/usr/bin/vcgencmd measure_clock arm"]
|
||||||
name_override = "cpu_frequency"
|
name_override = "cpu_frequency"
|
||||||
data_format = "grok"
|
data_format = "grok"
|
||||||
grok_patterns = ["=%{NUMBER:value:int}"]
|
grok_patterns = ["=%{NUMBER:value:int}"]
|
||||||
|
Reference in New Issue
Block a user