Commit Graph

47 Commits

Author SHA1 Message Date
Julian Brost 5cada85e54 ElasticsearchWriter: actually verify TLS server certificates
And add a new option insecure_noverify to explicitly disable it if desired.
2021-08-13 17:24:24 +02:00
Alexander Aleksandrovič Klimov ef8619f76b
Merge pull request #8601 from Icinga/feature/replace-std-boost-bind-with-lambdas-7006
Feature: Replace std/boost::bind() with lambdas
2021-03-18 17:56:13 +01:00
Yonas Habteab 43ba2da39c Replace std/boost::bind() function with lambda expression 2021-03-10 16:29:40 +01:00
Alexander A. Klimov c3388e9af6 Use std::mutex, not boost::mutex 2021-02-03 09:54:57 +01:00
Julian Brost 339b37a985 Use content_length method for setting the Content-Length header
Boost.Beast changed the signature of the previously used generic `set`
method so that it no longer accepts integer types, however there is
alreay a more specific method for setting the Content-Length header, so
use this one instead.
2020-12-22 16:27:38 +01:00
Michael Friedrich ee72791f25 Metrics: Always send '0' as value for thresholds
fixes #7666
2019-12-05 13:05:59 +01:00
Alexander A. Klimov ba1ce9c853 Replace std::shared_ptr<boost::asio::ssl::context> with Shared<boost::asio::ssl::context>::Ptr 2019-10-21 16:12:46 +02:00
Alexander A. Klimov 26ce2cfb73 Replace std::shared_ptr<AsioTcpStream> with Shared<AsioTcpStream>::Ptr 2019-10-21 16:12:46 +02:00
Alexander A. Klimov a1683568a1 Replace std::shared_ptr<AsioTlsStream> with Shared<AsioTlsStream>::Ptr 2019-10-21 16:12:35 +02:00
Michael Friedrich 5fa7331cc9 Quality: Replace deprecated Boost IO service code
https://github.com/boostorg/asio/issues/110
https://www.boost.org/doc/libs/1_66_0/doc/html/boost_asio/example/cpp03/services/logger_service.hpp
2019-09-09 15:27:57 +02:00
Michael Friedrich 8098f4d54d Improve type logging for notifications 2019-07-16 13:46:16 +02:00
Michael Friedrich f933aafd29 Quality: Purge old HTTP code in lib/remote 2019-05-24 15:50:43 +02:00
Alexander A. Klimov 3f0066e33b Use new I/O engine in ElasticsearchWriter 2019-04-23 14:33:19 +02:00
Michael Friedrich 06eacd13ab Also apply buffer flush fix for Elasticsearch feature 2019-03-27 11:35:41 +01:00
Michael Friedrich 27a41804fc Elasticsearch: Change Content-Type header to 'application/x-ndjson' for bulk streams
fixes #6609
2019-03-20 10:13:38 +01:00
Michael Friedrich 783a4c832c Improve logging of ElasticsearchWriter 2019-03-19 09:39:14 +01:00
Michael Friedrich 816a935b3d Elasticsearch: Improve error handling/logging
- Missing content-type
- Wrong content-type shouldn't hide the error message
- Error message should include more details (request URL, etc.)
2019-03-18 16:41:01 +01:00
Alexander A. Klimov b2e2b587da ElasticsearchWriter: don't leak sockets
refs #7018
2019-03-18 15:09:07 +01:00
Michael Friedrich e2df11520e
Merge pull request #6970 from Icinga/bugfix/perfdata-gaps
Improve reload handling for features (metric & queue flush, activation priority)
2019-02-26 15:38:15 +01:00
Michael Friedrich d14a88235d Replace Copyright header with a short version, part I
CLion -> replace in path
2019-02-25 14:48:22 +01:00
Michael Friedrich 301c48e9bc ElasticWriter: Ensure to flush buffers on Pause/Shutdown/Reload 2019-02-20 17:11:39 +01:00
Michael Friedrich 59389f564c Implement HA functionality for Elasticsearch feature 2018-10-24 13:20:03 +02:00
Michael Friedrich 001ffda61c Revert code from icinga.com update 2018-10-24 12:34:23 +02:00
Michael Friedrich dab53448bc icinga.com: Update *.{h,c}pp 2018-10-18 09:27:04 +02:00
Noah Hilverling 3854ed683b Improve TLS handshake exception logging 2018-09-06 15:58:42 +02:00
Michael Friedrich 9ea0650edc Fix connection error handling in Elasticsearch and InfluxDB features
Previously this would just throw the entire exception stack trace
which is not needed here.

fixes #6394
2018-06-21 15:41:40 +02:00
Jean Flach 1e0f67d778 Fix ES 5 support 2018-04-17 09:17:20 +02:00
Jean Flach fd5d4c5974 Move _type into url 2018-04-17 09:17:20 +02:00
Michael Friedrich 975ac47f8e Fix Elastic 6 support
fixes #5905
2018-04-17 09:17:20 +02:00
Michael Friedrich ecbbc2fcc5
Merge pull request #6194 from Icinga/feature/metric-unit-elastic-gelf
Elasticsearch/GELF: Add metric unit to performance data fields
2018-04-03 17:12:29 +02:00
Michael Friedrich 313f25163b Elasticsearch/GELF: Add metric unit to performance data fields
Seen this inside the InfluxDBWriter code, makes sense to store
this in Elasticsearch too.
2018-04-03 14:49:50 +02:00
Michael Friedrich 85eba79f55 Elasticsearch: Fix crash with invalid performance data metrics
fixes #6191
2018-04-03 14:38:25 +02:00
Gunnar Beutner 9d436605f0 Fix compatibility with CMake < 3.1 2018-01-18 15:12:46 +01:00
Gunnar Beutner c2fb9fe226 Use initializer lists for arrays and dictionaries 2018-01-16 12:27:44 +01:00
Gunnar Beutner 91c256261a Apply clang-tidy fix 'modernize-use-default-member-init' 2018-01-04 12:24:58 +01:00
Gunnar Beutner e3ad0be769 Apply clang-tidy fix 'modernize-use-auto' 2018-01-04 12:24:57 +01:00
Gunnar Beutner d6062eefbf Apply clang-tidy fix 'modernize-raw-string-literal' 2018-01-04 12:24:57 +01:00
Gunnar Beutner 621eed3f13 Apply clang-tidy fix 'modernize-pass-by-value' 2018-01-04 12:24:57 +01:00
Gunnar Beutner ac155d1dda Apply clang-tidy fix 'modernize-redundant-void-arg' 2018-01-04 12:24:57 +01:00
Michael Insel 158ae2188e Change copyright header for 2018 2018-01-02 12:08:55 +01:00
Jean Flach 2636e6a77a Whitespace fix
What does this change?
* Remove use of spaces for formatting
These could be found by using `grep -r -l -P '^\t+ +[^*]'
* Removal of training whitespaces
* A few lines longer than 120 chars
2017-12-20 14:53:52 +01:00
Michael Friedrich f8e102c15a Fix newline terminator for bulk requests in ElasticsearchWriter
This enables compatibility with 6.x.

This commit also fixes an incorrect HTTP response parsing
which could lead into false positives.

Analysis and fix in https://github.com/Icinga/icinga2/issues/5795#issuecomment-349920587

fixes #5795
2017-12-07 11:11:03 +01:00
Gunnar Beutner 3c60fbf75d Use std::vector::emplace_back instead of std::vector::push_back 2017-11-30 17:47:09 +01:00
Gunnar Beutner df8266631d Replace boost::tuple with std::tuple 2017-11-30 17:41:02 +01:00
Gunnar Beutner 6d09efc907 Use std::shared_ptr instead of boost::shared_ptr 2017-11-30 17:41:00 +01:00
Gunnar Beutner 858873b940 Replace boost::bind/boost::function with std::bind/std::function 2017-11-27 15:15:11 +01:00
Michael Friedrich 7c0a09cfb6 Rename ElasticWriter to ElasticsearchWriter
This better reflects its purpose as otherwise it would imply
that you need Elastic Stack for it. Graylog also reads from
Elasticsearch instances, this could serve as additional integration
here.
2017-11-09 15:33:10 +01:00