Add Hostname writing
This commit is contained in:
parent
f412d31d1c
commit
aa91c8668d
1 changed files with 5 additions and 1 deletions
6
main.py
6
main.py
|
@ -8,8 +8,11 @@ from multiprocessing import Process
|
|||
from influxdb_client import InfluxDBClient, Point, WritePrecision
|
||||
from influxdb_client.client.write_api import SYNCHRONOUS
|
||||
|
||||
# InfluxDB Settings
|
||||
# Categorization Settings
|
||||
NAMESPACE = os.getenv("NAMESPACE", "None")
|
||||
HOSTNAME = os.getenv("HOSTNAME")
|
||||
|
||||
# InfluxDB Settings
|
||||
DB_ADDRESS = os.getenv("INFLUX_DB_ADDRESS", "influxdb:8086")
|
||||
DB_TOKEN = os.getenv("INFLUX_DB_TOKEN", "")
|
||||
DB_ORG = os.getenv("INFLUX_DB_ORG", "speed-org")
|
||||
|
@ -56,6 +59,7 @@ def tag_selection(data):
|
|||
|
||||
# tag_switch takes in _data and attaches CLIoutput to more readable ids
|
||||
tag_switch = {
|
||||
"host": HOSTNAME,
|
||||
"namespace": NAMESPACE,
|
||||
"isp": data["isp"],
|
||||
"interface": data["interface"]["name"],
|
||||
|
|
Loading…
Reference in a new issue