Commit Graph

3235 Commits

Author SHA1 Message Date
Gunnar Beutner 6de6ea5e42 Build fix for OpenSSL 1.1.0
fixes #12044
2016-06-27 08:28:22 +02:00
Michael Friedrich c688a94f8a API: Add missing downtime_depth attribute
fixes #12041
2016-06-25 17:32:12 +02:00
Michael Friedrich ab4ba18238 Allow strings in Dependency states filter
refs #11445
2016-06-24 14:17:24 +02:00
Michael Friedrich 1451a0e5ad Add lag thresholds to cluster-zone check
fixes #11772
2016-06-24 10:33:04 +02:00
Michael Friedrich 091274e417 Change DB IDO 'categories' attribute to Array notation
Example:
    categories = [ "DbCatProgramStatus", "DbCatState" ]

The old method with constants and OR is still supported but deprecated.

refs #11445
fixes #12024
2016-06-23 14:55:01 +02:00
Michael Friedrich 14fdb794e2 Allow strings in state and type filters (config, API)
fixes #11445
2016-06-23 14:52:45 +02:00
Michael Friedrich 7077ca1a53 Add acknowledgement type to Graphite, InfluxDB, OpenTSDB metadata
fixes #12018
2016-06-23 13:04:23 +02:00
Gunnar Beutner 906ab613f3 Fix crash when using include_recursive in an object definition
fixes #12022
2016-06-22 17:01:36 +02:00
Michael Friedrich 7f56a04dd5 DB IDO: Add missing indexes for icinga_endpoints* and icinga_zones* tables
fixes #10066
2016-06-22 12:56:24 +02:00
Gunnar Beutner 428850a6b3 Fix: ConfigWriter::EmitScope incorrectly quotes dictionary keys
fixes #12016
2016-06-22 12:35:47 +02:00
Michael Friedrich 067cb8d283 DB IDO: Fix overflow in current_notification_number column (MySQL)
fixes #11962
2016-06-22 12:13:49 +02:00
Simon Murray e3645aa2f7 Fix hanging API connections
There was a problem identified where an upstream API connection was found hanging waiting
for a TLS handshake to complete.  Seeingly the TCP connection was ESTABLISHED locally but
not cleanly terminated remotely.  The Socket events layer never triggered the TLS handshake
oddly.  This however enables TCP keep alive packets to detect broken connections, raising
EPOLLERR and breaking the deadlock condition so that the agent will attempt to reconnect
at a later time.

fixes #12003

Signed-off-by: Gunnar Beutner <gunnar.beutner@netways.de>
2016-06-22 09:25:00 +02:00
Gunnar Beutner e3f1c1ec6f Make sure timestamps are formatted as integers in macro strings
refs #11483
2016-06-21 11:29:12 +02:00
Gunnar Beutner b5a38f6707 Fix compatibility issue with the $icinga.timet$ macro
fixes #11483
2016-06-21 08:23:31 +02:00
Michael Friedrich 409a385590 DB IDO: Ensure that delete queries for comments/downtimes are matching the index
fixes #11993
2016-06-20 17:38:01 +02:00
Michael Friedrich f10289aa71 DB IDO: Add missing object_id index for icinga_{scheduleddowntime,comments} tables
fixes #10070
refs #11947
2016-06-20 17:15:09 +02:00
Michael Friedrich f610e56a59 DB IDO: Fix missing schema version update in {mysql,pgsql}.sql
refs #10069
refs #11967
2016-06-20 16:17:06 +02:00
Michael Friedrich f4241ba185 DB IDO: Enhance ido check with schema info
fixes #11968
2016-06-17 12:43:05 +02:00
Michael Friedrich 6a46706668 DB IDO: Update schema version to 1.14.1
The least supported version is still 1.14.0
with the current changes.

refs #10069
refs #11967
2016-06-17 11:23:30 +02:00
Lee Clemens 759818d289 DB IDO: Make check_source a varchar(255) column
fixes #10069

Signed-off-by: Michael Friedrich <michael.friedrich@netways.de>
2016-06-17 11:03:26 +02:00
Michael Friedrich b4c56e5f47 Remove duplicate last_check runtime macro
Already available as {host,service}.last_check attribute.

refs #11483
2016-06-16 17:39:59 +02:00
Gunnar Beutner 039461e218 Fix unit tests for Convert::ToString
refs #11483
2016-06-16 15:32:29 +02:00
Gunnar Beutner bc6f7d7a21 Fix incorrect formatting for some macro values
fixes #11483
2016-06-16 15:14:35 +02:00
Gunnar Beutner d415ff7373 Add missing OnConfigLoaded calls in Ido{My,Pg}sqlConnection
fixes #11951
2016-06-16 14:22:20 +02:00
Gunnar Beutner c99fb68c2d Implement support for getting a list of global variables from the API
fixes #11955
2016-06-16 08:38:15 +02:00
Gunnar Beutner 28dee2b79b Improve filter support for /v1/templates
refs #11941
2016-06-16 08:38:15 +02:00
Michael Friedrich 2b474823f8 API: Fix that /v1 returns html if json is requested
fixes #10570
2016-06-15 17:46:09 +02:00
Michael Friedrich cdd858a0ec Flapping{Start,End} notifications must not depend on state changes
fixes #11899
2016-06-15 17:43:37 +02:00
Michael Friedrich 399ae42a8c DB IDO: Fix comment/downtime entry_time reset
fixes #11182
2016-06-15 11:28:57 +02:00
Gunnar Beutner 8a714d66f1 Ensure that sent notifications are synced between Icinga instances
fixes #11562
2016-06-15 11:27:01 +02:00
Gunnar Beutner 45919b4844 Fix crash in ApiListener::PersistMessage
fixes #11946
2016-06-15 11:26:35 +02:00
Gunnar Beutner ace6882b59 Implement support for retrieving a list of templates from the API
fixes #11941
2016-06-15 07:41:51 +02:00
Michael Friedrich f7f976b962 DB IDO: Ensure that SOFT state changes with the same state are logged
fixes #11933
2016-06-14 11:08:28 +02:00
Gunnar Beutner ff57b0ccd6 Add name attribute for the WorkQueue class
fixes #10816
2016-06-14 09:08:04 +02:00
Gunnar Beutner a8209c1a1a Change which instance is responsible for initiating notifications in a HA setup
refs #9242
2016-06-14 07:57:52 +02:00
Gunnar Beutner eb4aa4415c Fix cluster permissions for SendNotifications messages
refs #9242
2016-06-13 11:13:25 +02:00
Gunnar Beutner cb01f96dad Don't forward SendNotifications messages to non-local zones
refs #9242
2016-06-13 10:48:59 +02:00
Markus Frosch 8808e709c9 Make change to OK always a hard state
refs #11654
2016-06-13 10:43:57 +02:00
Gunnar Beutner 9e29a3f8a0 Fix default behavior when none of the specified objects pass the user's permission filter
fixes #11926
2016-06-13 10:14:10 +02:00
Markus Frosch a5abe1a972 Allow debugging of Utility::GetTime
So we can run unit tests that expect a certain behavior based on time.

When Icinga 2 is compiled with I2_DEBUG one can use Utility::SetTime to
override the current system time, and lock it to this value.

fixes #11875
2016-06-09 14:25:51 +02:00
Simon Murray 2e8c8809ea Add service metadata to InfluxDB Writer
Adds a new configuration variable in keeping with the graphite writer
which defaults to false to save network bandwidth.  All metrics currently
supported by graphite are now available to InfluxDB.  I added in some
formatting functions, to handle integers and booleans as we know and
control their types, and the supporting regexes in the sanity checker.

Updating to InfluxDB 0.13.X started giving 400 errors due to the missing
Host header in HTTP/1.1 requests.  HttpRequest has been updated to auto-
magically add the host and port to these requests if not explicitly
stated by the client code.

The exception code has been cleaned up to break out of the function
early if such a condition is raised, this avoids unnecessarily executing
code which will ultimately fail.

fixes #11912

Signed-off-by: Gunnar Beutner <gunnar.beutner@netways.de>
2016-06-08 13:23:52 +02:00
Simon Murray 899592c8ad Update InfluxDB line formatting
Fixes a couple issues to do with line formatting of influx DB data points.  All
keys and values need commas and white space escaping.  Values are also checked
for type.  If a numeric or scientific value is detected this is output as an
Influx floating point/scientific number.  Booleans are detected and output in
a canonical format.  All other values are strings, which have double quotes
escaped and the entire string is wrapped in double quotes.  The handling of
thresholds has changed before this becomes officially released.  These values
if available are passed to the accumulation function in a dictionary, said
dictionary builds a single data point with multiple fields, rather than the
existing 5 data points, thus saving bandwidth costs.

fixes #11904

Signed-off-by: Gunnar Beutner <gunnar.beutner@netways.de>
2016-06-08 11:01:23 +02:00
Gunnar Beutner 0eb0992d5e Fix custom notifications in a HA zone
fixes #9242
2016-06-07 12:44:12 +02:00
Michael Friedrich 8b742e841f Ensure that obsolete comment/downtime objects are deleted after activating objects
Config validation shouldn't be able to purge the files, only on
restart.

fixes #11890
2016-06-06 13:07:49 +02:00
Michael Friedrich 0ce41399e0 DB IDO: Ensure to delete outdated comments/downtimes for host/service objects
fixes #11688
2016-06-03 14:40:37 +02:00
Gunnar Beutner aeb7a4a70b Fix incorrect check interval for SOFT->HARD transitions
fixes #11825
2016-05-24 11:05:29 +02:00
Philipp Dallig 54e1c8a9d5 Implement exclude and include ability for TimePeriod objects
This feature allows to exclude and include specific time period
objects and their time ranges from an existing time period object.

This comes in handy when e.g. excluding holidays.

fixes #7355

Signed-off-by: Michael Friedrich <michael.friedrich@netways.de>
2016-05-21 20:33:09 +02:00
Michael Friedrich d49b63d2ab Fix: First HARD state does not change retry_interval to check_interval
refs #11825
2016-05-21 18:58:19 +02:00
Michael Friedrich 3f1a9f150b Silence compiler warnings
refs #11823
2016-05-21 14:16:47 +02:00
Michael Friedrich b4843dc81b Fix: Volatile check results for OK->OK transitions are logged into DB IDO statehistory
fixes #11823
2016-05-21 13:41:43 +02:00