9256 Commits

Author SHA1 Message Date
Gunnar Beutner
c2fb9fe226 Use initializer lists for arrays and dictionaries 2018-01-16 12:27:44 +01:00
Michael Friedrich
b4a0495239 Revert "Fix performance issues for InfluxdbWriter"
This reverts commit eea451ee94be7310e63ab6b7e5e94924b295e974.

refs #5764
2018-01-16 10:45:20 +01:00
Michael Friedrich
c3fe1a6323 Revert "Fix incorrect socket handling for the HTTP client"
This reverts commit 59da943548c7c1be5f4b27dce73a0ad27cf0de5d.

refs #5760
2018-01-16 10:44:31 +01:00
Michael Friedrich
fba838c7ef Revert "Make default getters and setters non-virtual"
This reverts commit 50eb774a0f57c8a09c0583e2be204bcc5bfd58cf.

refs #5759
2018-01-16 10:41:48 +01:00
Michael Friedrich
2901c77d65 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

refs #5986
2018-01-16 10:15:38 +01:00
Gunnar Beutner
32002b376b
Merge pull request #5986 from Icinga/fix/ido-schema-uq
Fix wrong schema constraint for fresh 2.8.0 installations
2018-01-16 10:13:21 +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
Michael Friedrich
f056b3fe80
Merge pull request #5984 from Icinga/fix/db-ido-static-libraries
Fix missing static libraries for DB IDO
2018-01-15 16:06:29 +01:00
Michael Friedrich
4b46b0b693 Fix missing static libraries for DB IDO
refs #5927
2018-01-15 15:59:11 +01:00
Jean Flach
e6412bf741
Improve console help text
Split continue and quit/exit commands
2018-01-15 15:31:53 +01:00
Dirk Goetz
00a07a86b0 SELinux: Allows icinga2_t to send sigkill to all domains it transitions to
Fixes #5916
2018-01-15 15:05:09 +01:00
Jean Flach
74ae67d3b6
Update consolecommand.cpp
Rename to debug console in help
2018-01-15 14:40:31 +01:00
Michael Friedrich
b440be9fc8
Merge pull request #5973 from Icinga/feature/api-checkresult-ttl
Add 'ttl' support for check result freshness via REST API
2018-01-15 14:25:15 +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
1d0fd5be11
Merge pull request #5903 from Icinga/fix/cleanup-compatutility
Cleanup CompatUtility class and features
2018-01-15 13:51:07 +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