pfsense CE 2.9.0 / telegraf broken
-
pfSense CE 2.9.0-RELEASE
Telegraf 1.38.xTelegraf fails to load the configuration generated by the pfSense
Telegraf package.Error:
E! loading config file /usr/local/etc/telegraf.conf failed:
plugin outputs.influxdb: line 36:
configuration specified the fields ["ssl_ca"], but they were not used;
this is either a typo or this config option does not exist in this versionThe generated configuration contains:
ssl_ca = "..."
But the installed Telegraf reports the valid TLS option as:
tls_ca = "..."
telegraf --usage influxdbconfirms:tls_ca = "/etc/telegraf/ca.pem"
Replacing
ssl_cawithtls_camanually allows Telegraf to parse
the configuration.The configuration is generated by the pfSense GUI / Telegraf package,
so this appears to be an incompatibility between the pfSense Telegraf
package configuration generator and the current Telegraf version. -
the solution was :
cp /usr/local/pkg/telegraf.inc /usr/local/pkg/telegraf.inc.bak-220826
[2.9.0-RELEASE][admin@pfSense1]/root: sed -i '' 's/ssl_ca/tls_ca/g; s/fielddrop/fieldexclude/' /usr/local/pkg/telegraf.inc -
@maba as a reference: that happened on Plus before, too telegraf failure due to deprecated ssl_ca parameter
A bug report was filled 7 months ago but has not got any attention.
-
This post is deleted! -
I used the following patch on my installation with System Patches:
Description: Telegraf: ssl_ca -> tls_ca / fielddrop -> fieldexclude (Redmine #16674)
Url: (empty)
Path Strip Count 1
Base Directory /
Ignore Whitespace: Check
Auto Apply: Check--- a/usr/local/pkg/telegraf.inc +++ b/usr/local/pkg/telegraf.inc @@ -77,7 +77,7 @@ [[inputs.cpu]] percpu = true totalcpu = true - fielddrop = ["time_*"] + fieldexclude = ["time_*"] [[inputs.disk]] ignore_fs = ["tmpfs", "devtmpfs", "devfs"] @@ -157,7 +157,7 @@ $cfg .= "\tinsecure_skip_verify = true\n"; } if (count($a_ca)) { - $cfg .= "\tssl_ca = \"" . $ca_pem_file . "\"\n"; + $cfg .= "\ttls_ca = \"" . $ca_pem_file . "\"\n"; } } else if ((is_array($telegraf_conf['telegraf_output']) && in_array("elasticsearch", $telegraf_conf['telegraf_output'])) || $telegraf_conf['telegraf_output'] == "elasticsearch") { $cfg .= "[[outputs.elasticsearch]]\n"; -
@jesusdf Thank you sir. This worked for me.
Privacy Policy · Cookie Policy