diff --git a/lib/perfdata/influxdbwriter.cpp b/lib/perfdata/influxdbwriter.cpp index 0a7f506fd..191748c56 100644 --- a/lib/perfdata/influxdbwriter.cpp +++ b/lib/perfdata/influxdbwriter.cpp @@ -541,3 +541,7 @@ void InfluxdbWriter::ValidateServiceTemplate(const Dictionary::Ptr& value, const } } +void InfluxdbWriter::ValidateSocketTimeout(int, const ValidationUtils&) +{ + Log(LogWarning, "InfluxdbWriter", "'socket_timeout' option has no effect and will be removed in Icinga 2 v2.8"); +} diff --git a/lib/perfdata/influxdbwriter.hpp b/lib/perfdata/influxdbwriter.hpp index e0a149c3a..2d455c1f8 100644 --- a/lib/perfdata/influxdbwriter.hpp +++ b/lib/perfdata/influxdbwriter.hpp @@ -49,6 +49,7 @@ public: virtual void ValidateHostTemplate(const Dictionary::Ptr& value, const ValidationUtils& utils) override; virtual void ValidateServiceTemplate(const Dictionary::Ptr& value, const ValidationUtils& utils) override; + virtual void ValidateSocketTimeout(int value, const ValidationUtils& utils) override; protected: virtual void OnConfigLoaded(void) override; diff --git a/lib/perfdata/influxdbwriter.ti b/lib/perfdata/influxdbwriter.ti index a2bf19248..94188471f 100644 --- a/lib/perfdata/influxdbwriter.ti +++ b/lib/perfdata/influxdbwriter.ti @@ -90,6 +90,9 @@ class InfluxdbWriter : ConfigObject [config] int flush_threshold { default {{{ return 1024; }}} }; + [config] int socket_timeout { + default {{{ return 5; }}} + }; }; validator InfluxdbWriter {