Commit Graph

33 Commits

Author SHA1 Message Date
Alexander A. Klimov 9376a311ea Fix file endings
git ls-files -z \
	|grep -zEe '^lib/' \
	|grep -zEe '\.[ch]pp$' \
	|xargs -0 perl -p0i -e 's/\n*(?!(?:.|\n))/\n/'
2023-05-17 18:05:13 +02:00
Yonas Habteab 6193a911bf ConfigStagesHandler: Don't allow concurrent package updates anymore
To prevent Icinga2 from being restarted while
one or more requests are still in progress and end up
as corrupted stages without status file and startup logs.
2022-03-30 09:42:22 +02:00
Alexander A. Klimov c666f81361 De-couple package and stage name validation 2021-08-02 15:40:14 +02:00
Alexander A. Klimov c3388e9af6 Use std::mutex, not boost::mutex 2021-02-03 09:54:57 +01:00
Chris Boot aece8d61e2 Introduce 'activate' parameter to config stage handling
This functionality allows a stage to be uploaded and validated as
normal, but not activated. This is useful to pre-flight an Icinga config
package before it is applied to a monitoring cluster, for example in a
CI pipeline.
2019-09-24 17:17:19 +01:00
Michael Friedrich 704aabcb63 Avoid dead-lock with config packages and active stages 2019-05-08 16:06:46 +02:00
Alexander A. Klimov c284cf0b68 HttpServerConnection: encapsulate streaming start indicator 2019-04-02 17:37:29 +02:00
Alexander A. Klimov fd239ba3fe Adjust /v1/events, too 2019-04-01 11:40:14 +02:00
Alexander A. Klimov 1941c1da28 Adjust all HTTP handlers (ex. /v1/events) 2019-04-01 11:40:14 +02: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 dab53448bc icinga.com: Update *.{h,c}pp 2018-10-18 09:27:04 +02:00
Michael Friedrich 4bf731fc16 More config stages refactoring 2018-04-06 10:13:08 +02:00
Michael Friedrich 75c5e6f6b0 Enhance error handling in config stages handler 2018-04-05 17:17:30 +02:00
Gunnar Beutner 94e6be1a65 Remove unused includes 2018-01-22 09:52:29 +01:00
Gunnar Beutner c2fb9fe226 Use initializer lists for arrays and dictionaries 2018-01-16 12:27:44 +01:00
Michael Friedrich d073a807b0 API: Add 'pretty' parameter for beautified JSON response bodies
fixes #5877
2018-01-08 20:55:36 +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
Jean Flach ef5013b903 Use locks in api config staging
refs #3668
2017-09-20 16:45:09 +02:00
ryanohnemus 1cb39994a5 API: Add optional reload parameter to config stage upload
You can now specify a boolean `reload` attribute that
will allow you to skip the icinga2 reload after config
validation. By default this is set to true.

The response text has been updated to show if icinga2
will reload or if it was requested to be skipped.

fixes #4769
2017-09-20 14:16:55 +02:00
Michael Friedrich b7caf0820d Ensure that *.icinga.com is used everywhere
fixes #13897
fixes #13277
2017-01-10 17:19:12 +01:00
Gunnar Beutner 288413f046 Replace BOOST_FOREACH with range-based for loops
fixes #12538
2016-08-25 06:46:17 +02:00
Michael Friedrich 9a88185b12 API: Fix error handling for invalid JSON request body
fixes #11757
2016-05-10 15:16:35 +02:00
Gunnar Beutner 599929b0f6 Update copyright headers for 2016 2016-01-12 08:29:59 +01:00
Jean Flach edfc0e3a38 Update error messages
Removes verboseError from httprequest and uses
HttpUtility::GetLastParameter() instead to find out whether verbose
errors are enabled. Also parsing an invalid URL will now not lead to a
stacktrace anymore.

refs #10194
2015-10-27 15:26:19 +01:00
Michael Friedrich dfa2ac450c Re-add missing package and stage name in configstageshandler
refs #10194
2015-09-29 18:25:48 +02:00
Michael Friedrich f498ce39f3 Improve api error handling
refs #10194
2015-09-28 16:08:14 +02:00
Gunnar Beutner 425a1a0166 Implement API permissions
fixes #9088
2015-09-28 14:30:46 +02:00
Jean-Marcel Flach 5ef4204d06 Improve API error handling and fix some whitespace
fixes #10194
2015-09-25 13:57:28 +02:00
Michael Friedrich da83bae660 Rename config/modules to config/packages
fixes #9953
2015-09-01 20:09:04 +02:00
Gunnar Beutner f74148f157 Fix HTTP handlers
refs #9768
2015-07-29 13:39:58 +02:00
Gunnar Beutner 890694e629 Implement support for filters
fixes #9077
2015-07-28 13:57:59 +02:00
Michael Friedrich fca7a33aac Implement config file management for the API
refs #9083

fixes #9102
fixes #9103
fixes #9104

fixes #9705
2015-07-23 17:57:24 +02:00