Commit Graph

139 Commits

Author SHA1 Message Date
Yonas Habteab a0607aceff Fix compiler warnings don't move local variables 2022-02-22 17:51:43 +01:00
Yonas Habteab 43ba2da39c Replace std/boost::bind() function with lambda expression 2021-03-10 16:29:40 +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 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 Insel 1bd91b0998 Add summarized performance data to check_network
This adds two new performance data values to check_network, 'network_in'
and 'network_out'.

On systems with multiple network interfaces the 'network_in' value holds
the summarized input bytes and the 'network_out' value holds the
summarized output bytes.
2019-09-06 20:46:32 +02:00
Alexander A. Klimov d10f121616 check_nscp_api: fix missing HTTP response reason 2019-08-27 10:39:24 +02:00
Alexander A. Klimov e71cc24854 check_nscp_api: read HTTP response via Boost.Beast 2019-08-26 15:57:10 +02:00
Bas Couwenberg 3ce4c6aead Fix spelling errors.
* UNKNWON -> UNKNOWN
2019-07-27 09:00:24 +02:00
Michael Friedrich eb3ce9cb83 check_nscp_api: Rewrite using Boost ASIO and Beast
This includes a huge workaround for NSCP not sending
the status reason correctly. Therefore parsing the raw
data buffer is required, otherwise we could just use
Beast's builtin HTTP parser as everywhere else.

refs #7142
refs #7041
2019-05-23 13:36:38 +02:00
Michael Insel 3258d6832a Disable program option guessing in check_service
This disables the program option guessing in check_service to avoid
ambiguous parameter parsing.

refs #7188
2019-05-17 19:57:08 +02:00
Michael Insel 25c2a2bb53 Fix compiler warnings in Windows plugins
This fixes a bunch of compiler warnings in the Windows plugins.
2019-04-30 10:32:44 +02:00
Markus Frosch 9c3cf9731c Ensure header ordering for win32 mswsock.h 2019-04-25 11:54:26 +02:00
Alexander A. Klimov ba842403ce Fix circular #include
refs #6985
2019-04-25 08:25:28 +02:00
Markus Frosch 930dd83b94 windows: Avoid 32-bit linker problems for check_swap 2019-04-05 10:34:07 +02:00
Michael Insel 20fc8960e1 Use Unicode functions inside check_swap
This ensures that always Unicode functions are used in check_swap.
2019-04-05 09:24:32 +02:00
Markus Frosch ff3a2fe3da CMake: Handle INSTALL_RPATH globally and allow external additions 2019-04-01 13:31:16 +02:00
Michael Friedrich fd6c9c3fbe
Merge pull request #7002 from Icinga/bugfix/check_network-percent-6155
check_network -h: drop non-existent feature
2019-03-19 09:27:55 +01:00
Alexander A. Klimov 9f26569bcc check_network -h: drop non-existent feature
refs #6155
2019-03-08 16:55:06 +01:00
Michael Friedrich 37b715baf1 Replace a few more copyright strings 2019-02-25 16:30:40 +01:00
Michael Friedrich 458f997a18 Replace Copyright header with a short version, part II 2019-02-25 15:09:36 +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 Insel 4961e9ba62 Fix check_swap percentage calculation
This fixes the check_swap percentage calculation. When the pagefile is
turned off the available swap and total swap are 0 which leads to a
wrong calculation and misformated output.

refs #6913
2019-02-08 17:01:49 +01:00
Michael Insel 7ba4d49505 Fix check_swap formatting
This fixes a small formatting mistake introduced by #6811. To keep the
check_swap output in sync with all other plugins I fixed the formatting.
2019-01-30 19:41:24 +01:00
Michael Insel 160a7716c5 Fix state conditions in check_memory and check_swap
This fixes the state conditions in check_memory and check_swap. This
turns the if/else if/else statements in simple if statements, since they
won't work properly when both thresholds are broken.

This also implements a new function to get a given state as wstring.
2018-11-29 22:16:57 +01:00
Michael Insel 5da4fbde3b Fix check_perfmon to support non-localized names
This fixes check_perfmon to support non-localized names on localized
Windows machines. The fix handles the given performance counter by
default as non-localized name, if none is found it falls back to the
localized name.

refs #5546
2018-11-26 17:18:38 +01:00
Michael Friedrich 6998436db1
Merge pull request #6480 from ajaffie/feature/win-check-update-4720
Modify windows check_update command to allow specifying thresholds.
2018-11-13 16:40:26 +01:00
Andrew Jaffie 7e9228860b Modify windows check_update command to allow specifying thresholds.
refs #4720
2018-10-23 11:28:43 +02:00
Michael Friedrich 3cb2c1d143 icinga.com: Update everything else 2018-10-18 09:50:53 +02:00
Michael Friedrich dea5ec614e icinga.com: Update CMakeLists.txt 2018-10-18 09:35:18 +02:00
Michael Friedrich dab53448bc icinga.com: Update *.{h,c}pp 2018-10-18 09:27:04 +02:00
Michael Friedrich b2957bb812
Merge pull request #6651 from Icinga/feature/check-swap-show-used
Add 'used' feature to check_swap
2018-10-09 08:36:22 +02:00
Michael Insel 9390d7e453 Add 'used' feature to check_swap
This implements the _used_ feature to check_swap to print the used swap
instead of the default available swap.
2018-10-06 20:26:43 +02:00
Michael Insel 002f59e53a Fix check_memory thresholds in 'used' mode
The thresholds in the used mode now breaks if the value is bigger than
the threshold.
2018-10-04 11:09:13 +02:00
Michael Friedrich fbf4546357
Merge pull request #6313 from Icinga/fix/win-check-swap
Fix wrong calculation of check_swap windows plugin
2018-09-27 10:08:47 +02:00
Michael Friedrich c02ba3fdfa
Merge pull request #6407 from Icinga/fix/win-check-uptime-perfdata-6406
Fix wrong UOM in check_uptime windows plugin
2018-06-26 14:09:30 +02:00
Michael Friedrich 73f69e89d9
Merge pull request #6412 from Icinga/fix/plugin-output
Fix output formatting in windows plugins
2018-06-26 09:54:43 +02:00
Michael Insel 5dc900369d Fix wrong UOM in check_uptime windows plugin
This fixes the usage of unvalid UOM in the check_uptime windows plugin.
The performance data will now provided in seconds.
2018-06-25 18:29:24 +02:00
Jean Flach 6c282d617f Fix output formatting in windows plugins
Adds a newline to check_memory and check_ping now looks up and prints
error messages when host resolution fails.
2018-06-25 13:17:34 +02:00
Michael Insel ab1c8d93e6 Fix wrong calculation of check_swap windows plugin
This fixes the wrong calculation of the check_swap windows plugin.
2018-06-24 00:24:14 +02:00
Michael Friedrich 071617da9f Conform to the Plugin API spec for performance label quoting
Single quotes are allowed, double quotes are not.
2018-06-22 11:12:57 +02:00
Michael Friedrich d9a55ac064 Add console logger for nscp_api debug mode 2018-06-21 15:08:44 +02:00
Michael Friedrich b3970d4b74 Add headers to debug output 2018-06-21 15:08:36 +02:00
Jean Flach 303d9c61c8
Merge pull request #6239 from Icinga/fix/windows-check-memory
Fix Windows check_memory rounding
2018-05-04 16:38:21 +02:00
Michael Insel 8cbb7494d2 Fix Windows check_memory rounding
This fixes a rounding problem within the Windows check_memory plugin.

refs #6161
2018-04-18 21:42:43 +02:00
Michael Friedrich 139478672f Fix check_nscp_api for multiple URL parameter usage
NSClient++ doesn't support the bracket notation.

refs #5706
2018-04-06 15:23:31 +02:00
Gunnar Beutner 0c006637ea Clean up the Icinga plugins a bit 2018-03-01 15:27:09 +01:00
Noah Hilverling e9643467a0
Fix code style 2018-02-21 15:13:50 +01:00
Jean Flach de9adb2687 Add 'used' feature to check_memory
Analogous to check_disk -U can now be used to check against and print the
used memory instead of the default available memory.

fixes #6108
2018-02-21 15:10:26 +01:00
Jean Flach 1da6b2c883 Fix whitespaces in CMakeLists files
Uses 2 space indentation as standard
2018-01-19 09:19:40 +01:00