This commit is contained in:
Sven Holz
2022-06-15 00:40:19 +02:00
parent abd98c49b8
commit bb9263781e
2 changed files with 2 additions and 2 deletions

View File

@@ -82,7 +82,7 @@ class MyInfluxDB():
def write(self, host, host_location, ping_response):
self.host = host
self.host_location = host_location
self.ping_response = ping_response
self.ping_response = int(ping_response)
self.influx_timestamp = int(time_ns())
self.data_point = Point("latency_monitor").tag("location", self.host_location).tag("host", self.host).field("latency", self.ping_response).time(self.influx_timestamp)
self.write_api.write(bucket=self.INFX_BUCKET,

View File

@@ -37,7 +37,7 @@ sed -i -e "s/PLACE_YOUR_FQDN_HERE/$MyFQDN/g" $MyScriptPath/docker-compose.yml
# Changes in grafana/provisioning/datasources/grafana-datasource.yml
echo "CHANGE: replace YOUR_ADMIN_TOKEN with $INFLUX_TOKEN in $MyScriptPath/grafana/provisioning/datasources/grafana-datasource.yml"
sed -i -e "s/YOUR_ADMIN_TOKEN/$INFLUX_TOKEN/g" $MyScriptPath/grafana/provisioning/datasources/grafana-datasource.yml
echo "CHANGE: replace YYOUR_ORGANIZATION with $INFLUX_ORG in $MyScriptPath/grafana/provisioning/datasources/grafana-datasource.yml"
echo "CHANGE: replace YOUR_ORGANIZATION with $INFLUX_ORG in $MyScriptPath/grafana/provisioning/datasources/grafana-datasource.yml"
sed -i -e "s/YOUR_ORGANIZATION/$INFLUX_ORG/g" $MyScriptPath/grafana/provisioning/datasources/grafana-datasource.yml
echo "CHANGE: replace YOUR_BUCKET_NAME with $INFLUX_BUCKET in $MyScriptPath/grafana/provisioning/datasources/grafana-datasource.yml"
sed -i -e "s/YOUR_BUCKET_NAME/$INFLUX_BUCKET/g" $MyScriptPath/grafana/provisioning/datasources/grafana-datasource.yml