Skip to content

Commit

Permalink
InfluxdbWriter: Log a warning about soon-to-be-removed socket_timeout…
Browse files Browse the repository at this point in the history
… attribute for 2.7.x

refs #5460
refs #5469
refs #5504
  • Loading branch information
Michael Friedrich committed Aug 17, 2017
1 parent d052e94 commit 6c577d6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/perfdata/influxdbwriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
1 change: 1 addition & 0 deletions lib/perfdata/influxdbwriter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class InfluxdbWriter : public ObjectImpl<InfluxdbWriter>

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;
Expand Down
3 changes: 3 additions & 0 deletions lib/perfdata/influxdbwriter.ti
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ class InfluxdbWriter : ConfigObject
[config] int flush_threshold {
default {{{ return 1024; }}}
};
[config] int socket_timeout {
default {{{ return 5; }}}
};
};

validator InfluxdbWriter {
Expand Down

0 comments on commit 6c577d6

Please sign in to comment.