InfluxDB confugration, use hostname as prefix

117 views
Skip to first unread message

Kye

unread,
Dec 14, 2017, 2:30:26 PM12/14/17
to Glances Users
Here is the configuration I tried to use, but $HOSTNAME isnt a valid prefix, or is interpreted literal in Grafana.  Is the a valid prefix to give me the actual hostname that is running the client instead of manually having to enter the value.



[influxdb]
# Configuration for the --export-influxdb option
# https://influxdb.com/
host=<IP>
port=8086
user=<UID>
password=<PW>
db=<DB>
prefix=$HOSTNAME
#tags=foo:bar,spam:eggs

Kye

unread,
Dec 16, 2017, 11:28:49 AM12/16/17
to Glances Users
Just used sed and replaced it instead with the hostname from cmd.  

sed -i "s/hostname/$(hostname)/g" glances.conf

Nicolargo

unread,
Dec 16, 2017, 12:35:37 PM12/16/17
to Glances Users
I also add an enhancement request to allow user to use whatever variable in conf file: https://github.com/nicolargo/glances/issues/1204

Nicolargo

unread,
Dec 26, 2017, 11:06:25 AM12/26/17
to Glances Users
Available in the DEVELOP branch of the future Glances 3.0 release.

Can you test it ?

See https://github.com/nicolargo/glances/issues/1204

Reply all
Reply to author
Forward
0 new messages