InfluxdbWriter: Log a warning about soon-to-be-removed socket_timeout attribute for 2.7.x

refs #5460
refs #5469
refs #5504
This commit is contained in:
Michael Friedrich 2017-08-17 10:33:08 +02:00
parent d052e94b45
commit 6c577d65d2
3 changed files with 8 additions and 0 deletions

View File

@ -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");
}

View File

@ -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;

View File

@ -90,6 +90,9 @@ class InfluxdbWriter : ConfigObject
[config] int flush_threshold {
default {{{ return 1024; }}}
};
[config] int socket_timeout {
default {{{ return 5; }}}
};
};
validator InfluxdbWriter {