Commit Graph

3414 Commits

Author SHA1 Message Date
Gunnar Beutner 55a3dc22bf Log a warning if there are more than 2 zone endpoint members
fixes #12222
2016-07-26 08:10:47 +02:00
Michael Friedrich ce3d7ab973 DB IDO: Do not clear {host,service,contact}group_members tables on restart
fixes #12210
2016-07-25 17:10:27 +02:00
Gunnar Beutner 22bb1f406a Fix URL encoding for '&'
fixes #12199
2016-07-25 10:54:17 +02:00
Gunnar Beutner cdda3bad8c Include client IP address and port in HTTP requests
fixes #11706
2016-07-25 09:43:13 +02:00
Gunnar Beutner 45dd027101 Include IP address and port in the "New connection" log message
fixes #12215
2016-07-25 09:31:38 +02:00
Stephan Tesch 431c110056 Improve error reporting for the client certificate check
Until now, client certificates that have failed verification were reported as not being signed by the CA. That is not true for all cases. This patch adds an explanation in the debug log why verification failed.

fixes #12201
2016-07-25 09:22:35 +02:00
Gunnar Beutner caf2812f0d Implement the __ptr function
fixes #12205
2016-07-22 09:43:59 +02:00
Michael Friedrich 2d53cdb845 Improve log message for connecting nodes without configured Endpoint object
fixes #12194
2016-07-21 13:48:00 +02:00
Gunnar Beutner e9605168a1 Increase reconnection timer interval for cluster connections
fixes #12193
2016-07-21 12:27:18 +02:00
Michael Friedrich e712d6ffe7 Fix error message for specified ciphers
refs #11063
2016-07-19 20:13:34 +02:00
Michael Friedrich 743a726752 state_filters_real shouldn't be visible in the API
fixes #12171
2016-07-19 20:09:39 +02:00
Gunnar Beutner 9075de67b1 Fix message routing for command_endpoint checks in satellite zones with >2 instances
refs #12179
2016-07-19 18:32:01 +02:00
Michael Friedrich 3d06df96bc Fix duplicate CheckResult messages for command_endpoint
fixes #12179
2016-07-19 17:36:14 +02:00
Uwe Ebel 1ca8b293cb Make the cipher list configurable for TLS streams
fixes #11063

Signed-off-by: Gunnar Beutner <gunnar.beutner@netways.de>
2016-07-18 13:40:00 +02:00
Gunnar Beutner 959e2501aa Avoid duplicate entries in the icinga_objects table for commands
refs #12147
2016-07-15 09:40:39 +02:00
Gunnar Beutner 1bd235b9fb Improve IDO performance
refs #12147
2016-07-13 14:44:53 +02:00
Gunnar Beutner 60c52f2109 Fix crash on Windows
fixes #11730
2016-07-12 15:33:44 +02:00
Gunnar Beutner ea57f0045e Fix deadlock in DbObject::SendVars{Config,Status}Update
fixes #12127
fixes #12085
2016-07-12 11:44:36 +02:00
Michael Friedrich ca42b4658a DB IDO: Change alias column to varchar(255) in MySQL
fixes #10061
2016-07-07 18:48:09 +02:00
Michael Friedrich 72facb1be0 DB IDO: Log a deprecation warning for categories
refs #12024
2016-07-07 15:44:31 +02:00
Michael Friedrich 124c80beab Require DB IDO v1.14.1 for 2.5.0
fixes #11967
2016-07-07 12:27:56 +02:00
Michael Friedrich a0a5989181 Add missing index on statehistory table for DB IDO cleanup
fixes #12107
2016-07-06 12:17:41 +02:00
Michael Friedrich f87f20e9ec DB IDO: Do not populate logentries table by default
Not required by Icinga Web 2 and therefore obsolete as default.

fixes #12106
2016-07-06 11:52:20 +02:00
Michael Friedrich 915ebe17cd ConfigCompiler should not log included files by default
fixes #11419
2016-07-05 15:43:48 +02:00
Michael Friedrich 5836b5b868 Fix: include_recursive should gracefully handle inaccessible files
fixes #12098
2016-07-05 15:40:49 +02:00
Michael Friedrich 9b873d60c2 Ensure to clear the SSL error queue before calling SSL_{read,write,do_handshake}
fixes #12100
2016-07-05 15:25:02 +02:00
Michael Friedrich c73e4d3328 Fix Downtime validation function signature
refs #11483
2016-07-05 13:17:18 +02:00
Michael Friedrich 85afec8952 Fix setsockopt() error on Windows
refs #12003
2016-07-05 13:16:14 +02:00
Simon Murray c6add53152 Fix InfluxDB Writer Key Escaping
The escaping wasn't being performed on measuerments, keys or tag values.  The
escape function was returning the input and not the modified ouput, so this
has been fixed

refs #12047

Signed-off-by: Michael Friedrich <michael.friedrich@netways.de>
2016-06-27 12:07:07 +02:00
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
Michael Friedrich e27dee5476 Windows: Fix missing path for repository handler
fixes #11817
2016-05-21 13:05:35 +02:00
Gunnar Beutner 78705e74f3 Open the command pipe with O_RDWR
fixes #11807
2016-05-18 15:52:29 +02:00
Gunnar Beutner b99b373b6f Fix 100% CPU usage issue and incorrect pending checks accounting in CheckerComponent::CheckThreadProc
fixes #11806
2016-05-18 14:30:36 +02:00
Gunnar Beutner bb69540b32 Fix exception in PerfdataWriter::RotateFile
fixes #11801
2016-05-18 14:01:32 +02:00
Gunnar Beutner 222b90107f Fix crash in ConfigItem::Commit
fixes #11804
2016-05-18 12:53:41 +02:00
Gunnar Beutner 93da47a670 Fix PostgreSQL warnings on startup
fixes #11798
2016-05-17 10:32:38 +02:00
Gunnar Beutner bc12d6c0d6 Fix race condition in ConfigObject::SetAuthority
fixes #11784
2016-05-12 14:06:28 +02:00
Gunnar Beutner 97a5091abc Fix incorrect re-scheduling behavior for command_endpoint checks
refs #8137
2016-05-12 13:47:32 +02:00
Gunnar Beutner de1b70cf44 Fix incorrect variable names for joined fields in filter expressions
fixes #11779
2016-05-12 10:24:15 +02:00
Michael Friedrich 3c852311e1 Fix possible crash in Add{Comment,Downtime}
refs #11112
2016-05-11 16:12:09 +02:00
Gunnar Beutner 1ad4d9cd27 Report failed reload attempts for the icinga check
fixes #9060
fixes #9997
fixes #11129
2016-05-11 16:07:28 +02:00
Gunnar Beutner 0b95be7b99 Fix incorrect calculation in Downtime::IsInEffect
fixes #11589
2016-05-11 14:13:43 +02:00
Michael Friedrich 90f102abf3 Ensure that program status updates are immediately updated in DB IDO
fixes #11767
2016-05-11 14:03:40 +02:00
Gunnar Beutner 0bc139af93 Improve timing behavior for UpdateObjectAuthority calls
refs #11765
2016-05-11 13:04:39 +02:00
Gunnar Beutner fc1168ed3e Only activate HARunOnce objects once there's a cluster connection
fixes #11765
2016-05-11 12:50:40 +02:00
Michael Friedrich a529725a92 Fix overloaded command pipe errors
fixes #11390
2016-05-11 11:04:28 +02:00
Gunnar Beutner 2adfcb56fe Improve error handling for TlsStream::Handshake
fixes #11046
2016-05-11 10:09:54 +02:00
Gunnar Beutner b9fdb3bfd9 Make sure that object names aren't empty
fixes #9989
2016-05-11 09:48:18 +02:00
Jason Young 7dbd66535a Throw exception if PerfdataWriter::RotateFile fails to rename from host_temp_path to host_perfdata_path (and same for service)
This can happen if the two paths are not on the same mount-point.

fixes #9236

Signed-off-by: Gunnar Beutner <gunnar.beutner@netways.de>
2016-05-11 09:29:32 +02:00
Gunnar Beutner ed27130402 Fix: "day -X" time specifications are parsed incorrectly
fixes #11147
2016-05-11 09:23:55 +02:00
Gunnar Beutner 81a7a002b4 Improve validation for flow control statements
fixes #11622
2016-05-11 08:01:31 +02:00
Michael Friedrich 9a88185b12 API: Fix error handling for invalid JSON request body
fixes #11757
2016-05-10 15:16:35 +02:00
Michael Friedrich 1c6f09f44e API: Fix error message handling for invalid attributes in PUT requests
refs #11396
2016-05-10 13:43:36 +02:00
Michael Friedrich ba82d2eb20 Move CalculateExecutionTime and CalculateLatency into the CheckResult class
fixes #11751
2016-05-10 12:16:49 +02:00
Gunnar Beutner f6f3bd1e4c Implement support for limiting the number of concurrent checks
fixes #8137
2016-05-10 11:26:55 +02:00
Gunnar Beutner eab2fb79ad Fix crash in UnameHelper()
fixes #11714
2016-05-10 09:46:48 +02:00
Gunnar Beutner 1fb378ef4a Remove unused cluster commands
fixes #11748
2016-05-10 07:05:10 +02:00
Michael Friedrich 8a65c4a776 API: Fix error message with PUT requests for existing objects
fixes #11396
2016-05-09 15:08:35 +02:00
Gunnar Beutner b8e911b0e5 Make sure the dependency graph is properly updated when adding and removing objects
fixes #11686
fixes #11374
2016-05-09 14:30:12 +02:00
Lee Clemens 7050529976 Add SSL support for the IdoMysqlConnection feature
fixes #9725

Signed-off-by: Michael Friedrich <michael.friedrich@netways.de>
2016-05-03 15:01:32 +02:00
Simon Murray 79c1e883d1 Add InfluxDB Writer
Adds an Icinga2 object to directly interface with InfluxDB's native HTTP API.
This supports optional basic authorization, and TLS transport.  InfluxDB didn't
appear to like having the TLS stream kept open, so instead this object buffers
data points which are then flushed to InfluxDB as a batch write, either driven
by a configurable timeout or threshold.

As InfluxDB is a schema-less database the host and service templates are user
configurable allowing both the measurement field and tags to be set by the
end user via macro expansion.  This allows access to tag fields from arbitrary
data associated with host.vars or service.vars.  If a particular value is
unable to be resolved, the tag will be dropped and not transmitted to InfluxDB.

Also alters URL handling to omit array brackets when only a single value is
attached to a key, otherwise InfluxDB has a strop with non-standard syntax.

fixes #10480

Signed-off-by: Michael Friedrich <michael.friedrich@netways.de>
2016-05-03 14:12:51 +02:00
Michael Friedrich 2faf121ff4 Remove commentsand downtimes with reference to deleted checkable objects
Silence the warning message and change the log level to notice as well.

fixes #10717
2016-05-03 11:30:02 +02:00
Michael Friedrich 23ab6cf78b Fix: Expired downtimes are not removed
fixes #11711
2016-05-02 15:32:46 +02:00
Jean Flach 360e0ad548 Fix external commands comments crashing icinga
Now an exception will be thrown when AddSvcComment or AddHostComment are
run with and empty Author or comment

fixes #11112
2016-04-25 16:58:00 +02:00
Gunnar Beutner 93a09b874b Remove the (unused) 'inherits' keyword
fixes #11659
2016-04-22 13:49:30 +02:00
Michael Friedrich 7442cd94f5 Fix crash with empty ScheduledDowntime 'ranges' attribute
fixes #11158
2016-04-22 11:00:21 +02:00
Gunnar Beutner c54de4b615 Implement SNI support for the CLI commands
fixes #11651
2016-04-21 15:44:51 +02:00
Gunnar Beutner 8b7d59eb34 Implement support for subjectAltName in SSL certificates
fixes #11556
2016-04-21 15:25:57 +02:00
Gunnar Beutner 2d55cf1341 Implement validation for the Logger#severity attribute
fixes #11646
2016-04-21 13:50:47 +02:00
Gunnar Beutner 4a32211de2 Fix crash in Ido{Mysql,Pgsql}Connection::ExecuteMultipleQueries
fixes #11639
2016-04-21 09:17:40 +02:00
Michael Friedrich d5c0d7366d Fix: Failed assertion in IdoPgsqlConnection::FieldToEscapedString
fixes #11635
2016-04-20 18:21:39 +02:00
Gunnar Beutner 22cf939086 Build fix for Windows
refs #11612
2016-04-19 14:48:13 +02:00
Gunnar Beutner d2cd4b6667 Improve performance for locks and value conversions
refs #11612
2016-04-19 09:38:22 +02:00
Gunnar Beutner c6a015e317 Fix crash in Checkable::ExecuteCheck
fixes #11582
2016-04-19 09:37:04 +02:00
Gunnar Beutner ab95670833 Build fix for older boost versions
refs #11612
2016-04-18 17:21:45 +02:00
Gunnar Beutner 3008d5ef31 Improve performance for field accesses
fixes #11612
2016-04-18 17:05:22 +02:00
Gunnar Beutner 955df528d7 Fix error message for the EventEngine variable
refs #11522
2016-04-18 15:02:02 +02:00
Gunnar Beutner d8b0502d67 Make the socket event engine configurable
fixes #11522
2016-04-18 14:38:59 +02:00
Gunnar Beutner 09165e5ca6 Only hide navigational attributes which are not config/state
fixes #11567
2016-04-13 12:02:08 +02:00
Gunnar Beutner 974ca9f38b Fix crash in Downtime::DowntimesExpireTimerHandler
fixes #11534
fixes #11559
2016-04-12 12:05:43 +02:00
Marius Sturm 15cb9c1c1a Use check_result timestamp for GELF log messages
fixes #9184

Signed-off-by: Michael Friedrich <michael.friedrich@netways.de>
2016-04-11 14:48:16 +02:00
Michael Friedrich 2b2e250def Implement support for overriding check command timeout
fixes #9283
2016-04-07 15:07:17 +02:00
Michael Friedrich d2f5008557 API: Ensure that empty passwords w/ client_cn are properly checked
fixes #11482
2016-04-04 16:38:47 +02:00
Gunnar Beutner 327d12295c Implement support for upgrading NSIS-based installations
refs #11449
2016-04-01 08:42:58 +02:00
Gunnar Beutner 6bf3225e84 Implement support for running custom install/uninstall actions
refs #11449
2016-03-31 14:53:54 +02:00
Michael Friedrich 027a23f468 Fix: Overwriting global type variables causes crash in ConfigItem::Commit()
fixes #11484
2016-03-31 11:43:16 +02:00
Michael Friedrich 83e0bcddce IDO: Ensure that the notification insert id is passed to contactnotification inserts
We cannot add the notification insert id directly
to the following contactnotifications queries. Instead
we need to pass a DbValue reference which gets set after
the notification insert id is calculated.
The contactnotifications insert queries are fired as query
group calling CanExecuteQuery() and FieldToEscapedString().
If the notification id does not exist yet, the queries are
moved to the end of the queue.
Once the contactnotifications queries are fired the DbValue
reference is destroyed.

This patch also removes the old notification insert id cache
which was broken in many ways.

fixes #11387
2016-03-29 15:12:24 +02:00
Gunnar Beutner 112f024810 Build fix for GCC
refs #9839
2016-03-29 14:52:48 +02:00
Michael Friedrich 5dd685cef9 Fix socket exceptions while querying the API
fixes #11224
2016-03-29 13:52:37 +02:00
Gunnar Beutner eb0892273e Implement the DateTime class
fixes #9839
2016-03-29 13:27:20 +02:00
Michael Friedrich 12dadfdfb3 Fix: Downtimes/Comments not being synced to child zones
fixes #11227
2016-03-29 12:09:51 +02:00
Gunnar Beutner 016f47d6e6 Fix Utility::MkDirP on Windows
fixes #11455
2016-03-29 09:44:05 +02:00
Gunnar Beutner 796884343b Another build fix for Win64
refs #11462
2016-03-29 08:42:02 +02:00
Gunnar Beutner b863a84471 Build fix for Win64
refs #11462
2016-03-29 07:54:41 +02:00
Gunnar Beutner 5de9a988d9 Improve validation for arrays
fixes #11434
2016-03-24 09:15:39 +01:00
Michael Friedrich 0447e81d99 Ensure that the legacy_id attribute for comment/downtime objects is restored on restart
This has been changed when moving comments/downtimes to config objects
in 050c520b2a

It may cause trouble with DB IDO DELETE and UPDATE statements
depending on the old value.

refs #11382
2016-03-23 14:05:09 +01:00
Michael Friedrich 98e1d70dab DB IDO: Fix that downtime is not in effect after restart
fixes #10843
2016-03-23 13:42:00 +01:00
Gunnar Beutner 0e18acbf9d Don't use semi-colons in auto-generated config files
fixes #11438
2016-03-23 09:29:27 +01:00
Gunnar Beutner b621b00e3a Detect infinite recursion in the zone hierarchy graph
fixes #10937
2016-03-23 09:03:53 +01:00
Gunnar Beutner 6ba0c5fe01 Implement recursion limit for AST expressions which don't use a separate stack frame
fixes #11106
2016-03-23 09:03:49 +01:00
Gunnar Beutner 71060be89a Follow symlinks in Utility::GlobRecursive
fixes #11347
2016-03-22 08:22:11 +01:00
Michael Friedrich 67b7df3189 DB IDO: Fix user notification type filters
fixes #10766
2016-03-15 14:50:43 +01:00
Michael Friedrich a30cb86ca1 Only call UpdateNextCheck() for soft states
refs #11336
2016-03-15 14:02:19 +01:00
Michael Friedrich d682f56c38 Use UpdateNextCheck() for determining the retry_interval in ProcessCheckResult()
This patch also moves the next check updates for passive
check results into ProcessCheckResult(). That way the
next check status updates for DB IDO work in a sane way
again.

refs #11336
2016-03-15 13:02:38 +01:00
Michael Friedrich 3bd6848763 Refactor patch for host recovery notifications
refs #10225
2016-03-15 09:47:59 +01:00
Gunnar Beutner 4066ab730a Fix error handling for FeatureUtility::GetFeatures
fixes #11349
2016-03-14 08:45:12 +01:00
Gunnar Beutner a8ee6b2009 Fix crash in ScheduledDowntime::TimerProc
fixes #11352
2016-03-14 08:37:13 +01:00
Michael Friedrich 4746b214d6 Fix: Common name in node wizard isn't case sensitive
fixes #11159
2016-03-11 14:22:24 +01:00
Michael Friedrich 3e050bd0cd Fix: Volatile transitions from HARD NOT-OK->NOT-OK do not trigger notifications
fixes #11320
2016-03-11 13:19:03 +01:00
Michael Friedrich 7fb8bcd933 Use retry_interval on first OK -> NOT-OK state change
Only valid for active check results. The API actions were
missing that marker similar to the external command processor.

The initial OK -> NOT-OK transition should use the retry_interval
but nothing else.

fixes #11336
2016-03-11 12:00:30 +01:00
Michael Friedrich 5b6a6f86b1 Fix host recovery notifications for warning states
fixes  #10225
2016-03-11 09:29:07 +01:00
Michael Friedrich 65cbf04454 Fix: MkDirP supports '/' and '\' on Windows
fixes #10231
2016-03-07 09:22:07 +01:00
Julian Brost 7439633965 Fix max number of args for DEL_DOWNTIME_BY_HOST_NAME
The RegisterCommand call for DEL_DOWNTIME_BY_HOST_NAME was missing the
max args parameter. This prevented the optional service name, start time
and comment arguments to be passed.

Signed-off-by: Michael Friedrich <michael.friedrich@netways.de>

fixes #11240
2016-03-05 18:43:02 +01:00
Michael Friedrich ef532f20eb Revert "Fix check scheduling w/ retry_interval"
This reverts commit a51e647cc7.

This patch causes trouble with check results received
1) passively 2) throughout the cluster. A proper patch
for setting the retry_interval on NOT-OK state changes
is required.

refs #11248
refs #11257
refs #11273

(the old issue)
refs #7287
2016-03-05 18:16:49 +01:00
Michael Friedrich b8e3d61820 Revert "Properly set the next check time for active and passive checks"
This reverts commit 2a11b27972.

This patch does not properly work and breaks the check_interval setting
for passive checks. Requires a proper patch.

refs #11248
refs #11257
refs #11273

(the old issue)
refs #7287
2016-03-05 18:15:03 +01:00
Tobias von der Krone ce3062904f Use the server's preferred cipher for the API connection
When using SSL_OP_CIPHER_SERVER_PREFERENCE the server's preferred cipher
is used instead of the client preference, see
https://www.openssl.org/docs/manmaster/ssl/SSL_CTX_set_options.html

fixes #11290
2016-03-04 14:57:06 +01:00
Michael Friedrich d14477c242 Fix MkDirP() on Windows
fixes #10231
2016-03-03 15:54:35 +01:00
Gunnar Beutner 47521904c1 Attempt to fix race condition problem with epoll_ctl()
refs #11289
2016-03-03 13:38:13 +01:00
Jean Flach 9cdea730a3 Fix delete object handler returning incorrect status codes
Now a 200 OK only gets returned if all objects could be deleted

fixes #10770
2016-03-01 16:53:52 +01:00
Vytenis Darulis 6729679f38 Try to queue all PROCESS_FILE commands instead of exploding the stack
fixes #10426

Signed-off-by: Michael Friedrich <michael.friedrich@netways.de>
2016-02-24 23:25:22 +01:00
Michael Friedrich 894aaaecb1 Ensure that config files are readable by the daemon
refs #11212
refs #11211
2016-02-24 14:24:08 +01:00
Michael Friedrich 47c5425137 Fix permissions for temporary files
fixes #11212
fixes #11211
2016-02-24 11:00:44 +01:00
Michael Friedrich 272d9541be Fix wrong log message in 'node setup' cli command
fixes #11209
2016-02-23 16:55:45 +01:00
Sebastian Chrostek 83845e609e Fix problem notifications while flapping is active
fixes #9969
fixes #9642
2016-02-23 16:27:22 +01:00
Michael Friedrich 4cb5b97e52 Fix unique creation of temp files
fixes #10948
2016-02-23 12:30:59 +01:00
Gunnar Beutner 74d1d68893 Fix: "node setup" tries to chown() files before they're created
fixes #11204
2016-02-23 08:42:05 +01:00
Michael Friedrich 5b30c9ed2c DB IDO: PArtially revert change for *group_members
Otherwise the index breaks.

refs #11103
2016-02-22 20:23:18 +01:00
Gunnar Beutner bc6d82c560 Build fix for CentOS 5
fixes #11179
2016-02-22 08:12:35 +01:00
Gunnar Beutner 9a8458fd67 Rename the IOTHREADS macro
refs #11014
2016-02-16 13:30:55 +01:00
Michael Friedrich 04a4049a4d Increase query queue size for testing
refs #10963
2016-02-12 14:15:24 +01:00
Michael Friedrich c8a9f45697 ApiListener: Bail out if object could not be created during config sync
refs #11006
2016-02-12 14:15:24 +01:00
Adam James e04b70856b Fix parsing of YYYY-MM-DD in LegacyTimePeriod::ParseTimeSpec
fixes #11132

Signed-off-by: Jean Flach <jean-marcel.flach@netways.de>
2016-02-10 16:24:36 +01:00
Jean Flach 58a31e8166 Use ConfigWriter class in repositoryutility.cpp
refs #10989
2016-02-09 15:59:19 +01:00
Jean Flach 19134f41cf Fix client not closing connections
fixes #11122
2016-02-09 15:59:19 +01:00
Jean Flach fa1d633484 Rephrase some log messages
refs #11122
2016-02-09 15:59:19 +01:00
Gunnar Beutner 674badd3ce Build fix
fixes #11096
2016-02-09 13:56:17 +01:00
Gunnar Beutner 9e7da9837e Revert "Windows build fix"
This reverts commit f06f6d4d86.
2016-02-09 13:54:19 +01:00
Gunnar Beutner 90e241ca85 Fix: Cluster WQ thread dies after fork()
fixes #11118
2016-02-09 12:46:46 +01:00
Jean Flach 4d87c96d06 Refactor String-Escape in repositoryutility
fixes #10989
2016-02-09 09:38:12 +01:00
Gunnar Beutner 14d805e6fe Fix crash in ApiListener::ConfigUpdateObjectAPIHandler
fixes #11006
2016-02-09 09:13:43 +01:00
Jean Flach 393a6bf641 Remove unused variables
fixes #11111
2016-02-08 17:10:12 +01:00
Jean Flach 8dbd84daed Remove unused variable 2016-02-08 16:40:34 +01:00
Jean Flach 964cfcebd3 Make schedule-downtime default fixed
fixes #10923
2016-02-08 16:04:41 +01:00
Gunnar Beutner e224e74994 Make sure the "syncing" attribute is set to false
refs #11083
2016-02-08 13:15:24 +01:00
Michael Friedrich 99dbb249de DB IDO: Fix problem with hostgroup_members cleanup
fixes #11103
2016-02-08 11:05:27 +01:00
Gunnar Beutner 6d5014b610 Increase grace period for agent-based checks
refs #11020
2016-02-08 09:46:01 +01:00
Michael Friedrich 4049cc0b9a Fix: Deleting an object via API does not disable it in DB IDO
fixes #11065
2016-02-05 12:37:00 +01:00
Michael Friedrich f06f6d4d86 Windows build fix
fixes #11096
2016-02-05 10:55:16 +01:00
Michael Friedrich 3227186c7d Fix: API queries on non-existant objects cause exception
fixes #11088
2016-02-04 22:40:01 +01:00
Gunnar Beutner 611ff869e1 Implement support for epoll
refs #11014
2016-02-04 16:31:59 +01:00
Gunnar Beutner c06f6d7aeb Fix crash in ConfigItem::RunWithActivationContext
fixes #11085
2016-02-04 13:17:37 +01:00