121
18.7 Legacy Series / Re: Upgrade to 18.7.4: telegraf plugin broken?
« on: October 01, 2018, 11:16:30 pm »
OK - here we are with the issue:
There is a conflicting config in telegraf with the log files:
Via the GUI, telegraf is advised to write the log file /var/log/telegraf.log (see above), this is written to the telegraf config file
However, the start script for telegraf in /usr/local/etc/rc.d/telegraf configures:
this causes a conflict where to write ...
Only either or is possible ....
Solution would be to leave the log file entry in telegraf.conf
As I assume that this is again created automatically this requires change in the code
Br br
There is a conflicting config in telegraf with the log files:
Via the GUI, telegraf is advised to write the log file /var/log/telegraf.log (see above), this is written to the telegraf config file
However, the start script for telegraf in /usr/local/etc/rc.d/telegraf configures:
Code: [Select]
(...)
name="telegraf"
rcvar=telegraf_enable
load_rc_config $name
: ${telegraf_enable:="NO"}
: ${telegraf_user:="telegraf"}
: ${telegraf_group:="telegraf"}
: ${telegraf_flags:="-quiet"}
: ${telegraf_conf:="/usr/local/etc/${name}.conf"}
: ${telegraf_options:="${telegraf_flags} -config=${telegraf_conf}"}
logfile="/var/log/telegraf/${name}.log"
pidfile="/var/run/${name}.pid"
command=/usr/sbin/daemon
start_precmd="telegraf_prestart"
start_cmd="telegraf_start"
stop_cmd="telegraf_stop"
(...)
this causes a conflict where to write ...
Only either or is possible ....
Solution would be to leave the log file entry in telegraf.conf
Code: [Select]
(...)
[agent]
interval = "10s"
round_interval = false
metric_batch_size = 1000
metric_buffer_limit = 10000
collection_jitter = "0s"
flush_jitter = "0s"
precision = ""
debug = false
quiet = true
logfile = "" <--- leave empty
hostname = "opnsense"
omit_hostname = false
(...)
As I assume that this is again created automatically this requires change in the code
Br br

