Michael Friedrich
064fc80cc3
Merge pull request #6098 from Icinga/fix/improve-cors-implementation
...
Clean up CORS implementation
2018-03-19 16:00:36 +01:00
Michael Friedrich
313b2a759e
Merge pull request #6016 from Icinga/fix/state-filters-for-custom-notifications
...
Check notification state filters for problems only, not for Custom, etc.
2018-03-19 15:52:37 +01:00
Jean Flach
a742e64e4d
Fix reload handling
...
Make sure we have written the new PID before letting it take over.
2018-03-14 10:43:59 +01:00
Gunnar Beutner
9b0fccfd80
Merge pull request #6153 from Icinga/fix/api-no-packages
...
Improve error handling for empty packages in /v1/config/packages
2018-03-13 09:23:01 +01:00
Michael Insel
592d1c7d7e
Replace std::vector:push_back with initializer list
...
This replaces a few std::vector::push_back calls with initializer lists.
2018-03-12 20:35:49 +01:00
Michael Friedrich
429f518b49
Improve error handling for empty packages in /v1/config/packages
...
- If there is no package main directory, assume "empty packages".
- Catch exceptions thrown through GlobRecursive() and present a better http 500
to the user.
The packages directory tree is automatically created with the first
package creation, either from the user, or by the `_api` package.
fixes #6129
2018-03-07 13:35:09 +01:00
Gunnar Beutner
9cd5298d8b
Ensure that SetCorked() works properly
2018-03-06 09:03:35 +01:00
Gunnar Beutner
b172a67867
Fix incorrect argument type for JsonRpc::SendMessage
2018-03-06 08:58:19 +01:00
Gunnar Beutner
9b72a6c2f3
Merge pull request #6135 from Icinga/fix/limit-api-package-size
...
Limit JSON RPC message size
2018-03-05 13:24:09 +01:00
Jean Flach
1bdd14b428
Limit anonymous connections to 25
2018-03-05 13:22:43 +01:00
Noah Hilverling
54ff60cd8c
Limit JSON-RPC message size
2018-03-05 10:29:05 +01:00
Noah Hilverling
d0a97ddf64
Add counter for current concurrent checks to Icinga check
...
fixes #4939
2018-03-01 15:01:55 +01:00
Noah Hilverling
186cad9872
Clean up CORS implementation
2018-03-01 14:04:56 +01:00
Gunnar Beutner
d23c03bfa5
Merge pull request #6134 from gunnarbeutner/fix/incorrect-content-length-limits
...
Fix incorrect HTTP content length limits
2018-02-28 14:16:15 +01:00
Gunnar Beutner
a3bf8cd26e
Merge pull request #6133 from Icinga/fix/cork-socket
...
Limit the number of HTTP/JSON-RPC requests we read in parallel
2018-02-28 12:48:06 +01:00
Gunnar Beutner
45c2803f3e
Fix incorrect HTTP content length limits
2018-02-28 12:28:02 +01:00
Gunnar Beutner
a9fb714578
Merge pull request #6116 from Icinga/fix/windows-service-restart
...
Fix Windows reload
2018-02-28 12:23:53 +01:00
Gunnar Beutner
c1837ea90b
Merge pull request #6131 from Icinga/feature/log-master-ticket-invalid
...
Log which ticket was invalid on the master
2018-02-28 12:22:34 +01:00
Gunnar Beutner
6848af50ff
Add SetCorked() calls to the JsonRpcConnection class
2018-02-28 11:42:05 +01:00
Jean Flach
d0cf7c654e
Use cork in tlsstream and HTTP connection
2018-02-28 11:40:58 +01:00
Jean Flach
7d103aaf1b
Add cork
2018-02-28 11:40:58 +01:00
Gunnar Beutner
a4a73fa67c
Fix null ptr dereference in HttpServerConnection::ProcessMessageAsync
2018-02-28 11:07:19 +01:00
Gunnar Beutner
6d01808adf
Fix incorrect return value
2018-02-28 10:50:33 +01:00
Michael Friedrich
ad31e0d118
Log which ticket was invalid on the master
...
This helps debugging a lot, especially to reproduce the issue
why the ticket is invalid.
2018-02-28 10:18:29 +01:00
Jean Flach
01c7f20170
Require systemd headers
...
Only mandatory if using systemd
2018-02-27 15:54:58 +01:00
lihan
cc24ae217e
fixup set rlimit stack failed condition
2018-02-27 12:56:36 +08:00
Gunnar Beutner
98bcca5e17
Merge pull request #6050 from gunnarbeutner/feature/remove-boost-split
...
Replace boost::algorithm::split calls with String::Split
2018-02-26 08:37:46 +01:00
Gunnar Beutner
5dd0bc8f97
Use std::vector<std::string> for command-line arguments
2018-02-26 08:36:11 +01:00
Michael
a0aa781417
Implement ability to make global zones configurable
...
This adds the ability to make global zones configurable during the node
wizard/setup. The implementation will add the given global zones to the default
included global zones.
2018-02-26 08:36:11 +01:00
Gunnar Beutner
ef488a3ebc
Replace boost::algorithm::split calls with String::Split
2018-02-26 08:27:18 +01:00
Jean Flach
691e3cfd57
Fix Windows reload
2018-02-23 17:01:46 +01:00
Jean Flach
ef5e7e8510
Fix incorrect size of request limits
...
refs #6103
2018-02-23 14:29:18 +01:00
Jean Flach
6bb2ed4258
Merge branch 'feature/security-features'
2018-02-21 16:19:54 +01:00
Jean Flach
184580f705
Merge pull request #6103 from Icinga/fix/http-security-fixes
...
HTTP Security fixes
2018-02-21 15:04:02 +01:00
Jean Flach
85f45d9b94
Minor codestyle and doc changes
2018-02-21 14:52:44 +01:00
Jean Flach
eda9bce8cb
Merge pull request #6104 from Icinga/fix/nullptr-deref
...
Fix nullptr dereferences
2018-02-21 13:56:09 +01:00
Jean Flach
a71ab1e126
Rename macro RequireNotNull to REQUIRE_NOT_NULL
2018-02-21 13:47:46 +01:00
Noah Hilverling
64ffe4f840
Fix nullptr posibility in ProcessEvent
2018-02-21 13:47:46 +01:00
Noah Hilverling
948333225d
Fix nullptr deref in cluster events
2018-02-21 13:47:46 +01:00
Noah Hilverling
6bebdf8a87
Add marco RequireNotNull
...
This is used to fix a number of possible nullptr dereferences
2018-02-21 13:47:46 +01:00
Jean Flach
c8c193a9d8
Remove need for RunAsUser/Group
...
They are now read form the sysconfig file which is owned by root
2018-02-20 14:16:43 +01:00
Jean Flach
6ae376b7fd
Add cli tool to send signals as Icinga user
...
fixes #5991
2018-02-20 14:16:43 +01:00
Noah Hilverling
2823ebb831
Limit HTTP body size
2018-02-20 13:32:04 +01:00
Noah Hilverling
817415f6a5
Fix requests not being closed correctly
2018-02-20 13:32:04 +01:00
Jean Flach
8ffa4f04a7
Add timeout for TLS handshakes
2018-02-20 13:32:04 +01:00
Jean Flach
ee5954726d
Authenticate API user before parsing body
2018-02-20 13:32:04 +01:00
Jean Flach
73b85bcccb
Only read body from authenticated connections
...
This means we are not allowing unauthenticated requests anymore
2018-02-20 13:32:04 +01:00
Jean Flach
81c4004894
Fix nullptr deref
2018-02-20 13:32:04 +01:00
Gunnar Beutner
a9f2a8de19
Add HTTP Header size limits
2018-02-20 13:32:04 +01:00
Gunnar Beutner
2789d1a859
Add validation for HTTP connection sizes
2018-02-20 13:32:04 +01:00
Jean Flach
54384528ed
Fix crash in api user command
2018-02-20 09:45:55 +01:00
Gunnar Beutner
8a8d42b154
Remove redundant 'this->'
2018-02-19 08:08:16 +01:00
Jean Flach
0a0795f09d
Code style
2018-02-16 11:47:13 +01:00
Gunnar Beutner
6e3347b5bf
Remove debug output in ApiUserCommand::Run
2018-02-16 11:46:43 +01:00
Gunnar Beutner
f4403daef8
Properly escape strings in ApiUserCommand::Run
2018-02-16 11:46:43 +01:00
Jean Flach
2bd35aa357
Improve api user command
...
--oneline can now be used to print out only the password hash string.
This can be used to update ApiUser passwords through the API. There is
also now a validation to make use salt does not contain a '$' which
would break verification.
2018-02-15 13:09:22 +01:00
Jean Flach
df86245fe8
Fix crash when using incorrectly formatted password hash
2018-02-15 13:09:22 +01:00
Jean Flach
65a806f5dc
Move new password functions into tlsutility
2018-02-15 13:09:22 +01:00
Jean Flach
92e2faaa08
Hash API password and comparison
...
fixes #4920
2018-02-15 13:09:22 +01:00
Michael Friedrich
ad7e801db9
Fix crash with anonymous clients on certificate signing request and storing sent bytes
...
refs #5753
2018-02-09 17:18:20 +01:00
Jean Flach
d578b742ac
Merge pull request #6026 from Icinga/feature/windows-flapping
...
Fix flapping support for Windows
2018-02-09 15:12:36 +01:00
Michael Friedrich
0789d21ec1
Merge pull request #6083 from Icinga/fix/configitem-type-log
...
Fix wrong type logging in ConfigItem::Commit
2018-02-09 14:57:45 +01:00
Michael Friedrich
e3c27dd838
Merge pull request #6078 from Icinga/feature/random-check-metrics
...
Add more metrics and details to built-in 'random' check
2018-02-09 14:08:49 +01:00
Michael Friedrich
495b6906f7
Fix wrong type logging in ConfigItem::Commit
2018-02-09 14:04:50 +01:00
Michael Friedrich
bdeba19a00
Add more metrics and details to built-in 'random' check
...
This helps us with demo graphs in Graphite/InfluxDB as well
as other historical views.
fixes #5787
2018-02-06 16:01:07 +01:00
Michael Friedrich
12471bf259
Allow to pass raw performance data in 'process-check-result' API action
...
This is how data is coming from Icinga Web 2 and still a valid input
type.
fixes #4786
2018-02-06 15:25:55 +01:00
Noah Hilverling
e1e06ce767
Merge pull request #5988 from Icinga/fix/concurrent-checks-limit-cluster
...
Fix concurrent checks limit while using command_endpoint
2018-02-06 14:13:49 +01:00
Jean Flach
3d78c805e0
Deprecate CheckResultReader
...
fixes #6031
2018-02-02 13:51:20 +01:00
Markus Frosch
279e9fbe6c
methods: Remove unused clrchecktask feature
...
fixes #6054
2018-02-01 15:52:12 +01:00
Gunnar Beutner
e361b3c427
Implement support for frozen arrays and dictionaries
2018-01-30 12:22:04 +01:00
Gunnar Beutner
b88149c455
Merge pull request #5979 from Icinga/feature/enhance-console-5595
...
Add quit, exit and help
2018-01-29 16:41:10 +01:00
Noah Hilverling
9cb7c9d7f7
Merge pull request #6020 from Icinga/fix/console-home-env
...
Fix crash when running 'icinga2 console' without HOME environment variable
2018-01-29 16:37:24 +01:00
Noah Hilverling
06e381ceea
Add metrics about RemoteCheckQueue to Icinga check, API and logs
...
refs #4841
2018-01-29 16:07:35 +01:00
Noah Hilverling
97bd91dda2
Replace concurrent_checks in CheckerComponent by global MaxConcurrentChecks
...
refs #4841
2018-01-29 14:50:24 +01:00
Noah Hilverling
e28277175b
Implement concurrent checks limit for remote checks
...
fixes #4841
2018-01-29 14:50:14 +01:00
Jean Flach
9c9d190b9c
Merge pull request #6039 from Icinga/feature/improve-error-message
...
Improve location info for some error messages
2018-01-29 13:12:35 +01:00
Gunnar Beutner
1047e5ff3d
Improve location info for some error messages
2018-01-29 10:04:58 +01:00
Michael Insel
12c4a1be1f
Fix build error on Windows
...
The `kill` and `SIGUSR2` statements are not available on Windows.
2018-01-28 22:00:36 +01:00
Jean Flach
51d5a3e457
Fix missing include
2018-01-26 14:38:55 +01:00
Jean Flach
cc73eed2af
Merge pull request #5992 from Icinga/feature/remove-includes
...
Remove unused includes
2018-01-25 09:13:02 +01:00
Gunnar Beutner
0cc9af6bee
Remove duplicate semicolons
2018-01-24 12:07:52 +01:00
Gunnar Beutner
369af68ac2
Fix flapping support for Windows
2018-01-23 12:52:33 +01:00
Gunnar Beutner
94e6be1a65
Remove unused includes
2018-01-22 09:52:29 +01:00
Gunnar Beutner
5d464a9f7e
Merge pull request #5996 from Icinga/feature/watchdog-2287
...
Add systemd watchdog and adjust reload behaviour
2018-01-21 05:18:13 +01:00
Michael Friedrich
777d85cecc
Merge pull request #5964 from fedepires/fix/opentsdbwriter-host-tag-5963
...
OpenTSDB writer - Fix function for escaping host tag chars.
2018-01-20 12:17:25 +01:00
Gunnar Beutner
3e3658b7a5
Fix crash when running 'icinga2 console' without HOME environment variable
...
fixes #6019
2018-01-20 07:46:19 +01:00
Jean Flach
c418a9611e
Add systemd watchdog and adjust reload behaviour
2018-01-19 16:52:36 +01:00
Michael Friedrich
cc3651ed56
Check notification state filters for problems only, not for Custom, etc.
...
refs #5952
2018-01-19 12:35:07 +01:00
Jean Flach
1da6b2c883
Fix whitespaces in CMakeLists files
...
Uses 2 space indentation as standard
2018-01-19 09:19:40 +01:00
Jean Flach
5ed9b063a8
Merge pull request #6010 from Icinga/feature/cluster-check-endpoints-long-output
...
Move the endpoint list into a new line for the 'cluster' check
2018-01-18 15:51:03 +01:00
Michael Friedrich
88f740b13c
Move the endpoint list into a new line for the 'cluster' check
...
If you have many satellites/clients, the list view in Icinga Web 2
will get overly long. Moving the list for connected/not connected
endpoints into a new line makes this check more beautiful.
fixes #5444
2018-01-18 15:43:01 +01:00
Gunnar Beutner
7702cb056a
Merge pull request #6009 from Icinga/fix/build-fix-gcc
...
Build fix for ancient versions of GCC
2018-01-18 15:29:50 +01:00
Jean Flach
37e890f513
Merge pull request #6008 from Icinga/fix/cmake-3-0-compat
...
Fix compatibility with CMake < 3.1
2018-01-18 15:26:10 +01:00
Gunnar Beutner
9d436605f0
Fix compatibility with CMake < 3.1
2018-01-18 15:12:46 +01:00
Gunnar Beutner
aa76ddf7f2
Build fix for ancient versions of GCC
2018-01-18 15:12:14 +01:00
Jean Flach
f9b378edc6
Fix missing include
...
fixes #6001
2018-01-18 10:54:49 +01:00
Michael Friedrich
a83ad4b7f2
Explicitly pass 1 or 0 for notification filters in DB IDO
2018-01-17 13:38:48 +01:00
Gunnar Beutner
71a032579b
Merge pull request #5995 from Icinga/fix/influxdb-requests
...
Fix InfluxDB requests
2018-01-17 10:28:15 +01:00
Gunnar Beutner
9ad5def531
Merge pull request #5994 from Icinga/fix/influxdb-template
...
InfluxDBWriter: Fix macro in template
2018-01-17 10:27:55 +01:00
Noah Hilverling
b83af363ef
Add missing string escaping to InfluxDB-Writer
...
fixes #5987
2018-01-17 10:26:09 +01:00
Noah Hilverling
e19ae4e052
Fix HTTP response parsing for HTTP 1.1
...
refs #5987
2018-01-17 10:25:00 +01:00
Noah Hilverling
9768e03107
InfluxDBWriter: Fix macro in template
2018-01-17 09:23:48 +01:00
Gunnar Beutner
2a9dceb367
Use CMake object libraries for our libs
2018-01-17 04:28:21 +01:00
Gunnar Beutner
c2fb9fe226
Use initializer lists for arrays and dictionaries
2018-01-16 12:27:44 +01:00
Michael Friedrich
f99f5bcf17
Fix wrong schema constraint for fresh 2.8.0 installations
...
This fix is only needed for a fresh 2.8.0 setup, older versions
and upgrades to current do not need this (can be applied as idempotent
update).
fixes #5947
2018-01-16 09:49:46 +01:00
Gunnar Beutner
4e7b44e8c1
Merge pull request #5985 from Icinga/feature/ido-check-thresholds
...
Add query thresholds for the 'ido' check: Rate and pending queries
2018-01-16 08:06:22 +01:00
Michael Friedrich
0201f8ff64
Add query thresholds for the 'ido' check: Rate and pending queries
...
fixes #3924
2018-01-15 16:38:15 +01:00
Jean Flach
e6412bf741
Improve console help text
...
Split continue and quit/exit commands
2018-01-15 15:31:53 +01:00
Jean Flach
74ae67d3b6
Update consolecommand.cpp
...
Rename to debug console in help
2018-01-15 14:40:31 +01:00
Jean Flach
0f6dc1289b
Add quit, exit and help
2018-01-15 14:12:22 +01:00
Michael Friedrich
211a07f49a
Add 'ttl' support for check result freshness via REST API
...
The `process-check-result` action can now optionally set the
`ttl` parameter. This overrules the configured freshness
check (check_interval).
The main idea behind this is to allow the external sender
to specify when the next check result is coming in.
For example, a backup script which should be run every
24h can specify the exact expected next check result.
The addition to the CheckResult class is necessary to
forward the check result throughout the cluster and
calculate the `next_check` value on each node. This
allows us to send in a check result on a satellite,
and the master determines the freshness and possible
notifications/state changes for Icinga Web 2.
2018-01-15 13:54:11 +01:00
Michael Friedrich
50106057bf
Remove obsolete locks in Livestatus; apply style guide to DB IDO
2018-01-15 13:39:34 +01:00
Michael Friedrich
403ab5c357
Eliminate time(NULL) in StatusDataWriter
2018-01-15 13:39:34 +01:00
Michael Friedrich
ef7c80959d
More cleanup for compat filters in DB IDO
2018-01-15 13:39:34 +01:00
Michael Friedrich
4da3a50711
Clean up DB IDO events code
2018-01-15 13:39:34 +01:00
Michael Friedrich
636cf62d3a
DB IDO: Clean up code and group CompatUtility calls
2018-01-15 13:39:34 +01:00
Michael Friedrich
d672df3f2c
DB IDO: Don't send empty columns in queries
2018-01-15 13:39:34 +01:00
Michael Friedrich
e5462ea3d1
DB IDO: Remove check_command_args column
...
The populated value is not entirely correct, and pulls in lots
of compat code.
2018-01-15 13:39:34 +01:00
Michael Friedrich
9de233630a
Move CompatUtility::GetCheckableInNotificationPeriod() logic into Livestatus feature
2018-01-15 13:39:34 +01:00
Michael Friedrich
7a012c062a
Move CompatUtility::GetHostStateString() logic into DB IDO and CompatLogger features
2018-01-15 13:39:34 +01:00
Michael Friedrich
5222f7d058
GelfWriter should write the host notification output
...
No idea why there was a hardcoded unreachable message inside.
2018-01-15 13:39:34 +01:00
Michael Friedrich
915d0417c9
Move CompatUtility::GetHostCurrentState() logic into DB IDO and StatusData features
2018-01-15 13:39:34 +01:00
Michael Friedrich
48516560bc
Move the IDO specific compat notification filter logic into the feature
2018-01-15 13:39:34 +01:00
Michael Friedrich
d373b03907
Drop CompatUtility::GetCheckable*Interval() and hardcode their minute representation in compat features
2018-01-15 13:39:34 +01:00
Michael Friedrich
fb76287d39
Clean header includes in CompatUtility class
2018-01-15 13:39:34 +01:00
Michael Friedrich
1473957bc2
Add inventory as comments where the left-over functions are actually used.
2018-01-15 13:39:34 +01:00
Michael Friedrich
e3a899a9ac
Drop CompatUtility::GetCheckableCheckPeriod()
2018-01-15 13:39:34 +01:00
Michael Friedrich
ce8bfdfa5a
Move CompatUtility::GetCheckableInCheckPeriod() into Livestatus feature
2018-01-15 13:39:34 +01:00
Michael Friedrich
15e3524e42
Move notification options wrapper into StatusDataWriter
...
That's the only location which requires the old mapping.
2018-01-15 13:39:34 +01:00
Michael Friedrich
87b99c17b5
Drop CompatUtility::GetCheckResultPerfdata()
2018-01-15 13:39:34 +01:00
Michael Friedrich
906c1accaa
Move more compatibility mappings into DB IDO
2018-01-15 13:39:34 +01:00
Michael Friedrich
2478c4d053
Move ConvertTimestamp functionality into DB IDO
...
This is the only place where the timestamp is split into
sec and usec.
2018-01-15 13:39:34 +01:00
Michael Friedrich
f2fe165ccb
Drop useless CompatUtility::GetCustomAttributeConfig() wrapper
2018-01-15 13:39:34 +01:00
Michael Friedrich
b5f5d167dc
Drop dead CompatUtility::GetCustomAttributeConfig
2018-01-15 13:39:34 +01:00
Michael Friedrich
cbea0c13f5
Drop Freshness wrappers from CompatUtility class
2018-01-15 13:39:34 +01:00
Michael Friedrich
db6ed405e4
Remove more redundant wrappers from CompatUtility class
2018-01-15 13:39:34 +01:00
Michael Friedrich
5466197d29
Drop CompatUtility::*Command helpers
2018-01-15 13:39:34 +01:00
Michael Friedrich
b4af0971af
Drop dead code in Livestatus feature
2018-01-15 13:39:34 +01:00
Michael Friedrich
2d1f772a6e
Replace CompatUtility's enabled wrappers with native implementation getters
...
Many conversions were not necessary, or could be dealt inside the actual
feature. libcompat and liblivestatus can take care about such specifics
on their own, lib_db_ido doesn't need boolean conversion in fields, that
is done inside the db driver.
2018-01-15 13:39:34 +01:00
Michael Friedrich
334f633b0a
Drop CompatUtility::GetCheckableHasBeenChecked() and use Checkable::HasBeenChecked()
2018-01-15 13:39:34 +01:00
Michael Friedrich
3847e37df1
Drop CompatUtility::GetCheckableAcknowledgementType()
...
This already returns an integer.
2018-01-15 13:39:34 +01:00
Michael Friedrich
7bf2e07032
Move CompatUtility::GetCheckableProblemHasBeenAcknowledged() into feature specific dumps
2018-01-15 13:39:34 +01:00
Michael Friedrich
92c565d744
Move CompatUtility::GetCheckableCheckType() into IDO/Livestatus features
...
It is just boolean mapping to numbers, each modules does that in a sort of different way.
DB IDO automatically transforms boolean to numbers.
Livestatus would return JSON which keeps true booleans, but requires a number (just a guess,
there is no spec for this message format).
2018-01-15 13:39:34 +01:00
Michael Friedrich
70af1a3545
Move CompatUtility::GetHostAlias into DB IDO host object method
...
This is the only place where this mapping is used.
2018-01-15 13:39:34 +01:00
Michael Friedrich
6c68ef0955
Fix non-unity builds with the icinga check
...
refs #5958
2018-01-12 11:04:54 +01:00
Michael Friedrich
92a279c234
Merge pull request #5971 from Icinga/feature/remove-demo
...
Remove libdemo and libhello
2018-01-11 13:52:01 +01:00
Michael Friedrich
36a10cb65d
Merge pull request #5970 from Icinga/feature/stack-allocate-configitembuilder
...
Allocate ConfigItemBuilder objects on the stack
2018-01-11 13:50:23 +01:00
Michael Friedrich
01aee7954e
Merge pull request #5969 from Icinga/feature/wq-stats-mutex
...
Remove the WorkQueue::m_StatsMutex instance variable
2018-01-11 13:38:40 +01:00
Michael Friedrich
de5f2b01c4
Merge pull request #5968 from Icinga/feature/ringbuffer-mutex
...
Update the RingBuffer class to use a regular mutex instead of ObjectLock
2018-01-11 13:37:35 +01:00
Michael Friedrich
47bc4e6b5c
Merge pull request #5967 from Icinga/feature/lazy-accessors
...
Avoid accessing attributes for validators where not necessary
2018-01-11 13:36:29 +01:00