Commit Graph

3209 Commits

Author SHA1 Message Date
Michael Friedrich 2b474823f8 API: Fix that /v1 returns html if json is requested
fixes 
2016-06-15 17:46:09 +02:00
Michael Friedrich cdd858a0ec Flapping{Start,End} notifications must not depend on state changes
fixes 
2016-06-15 17:43:37 +02:00
Michael Friedrich 399ae42a8c DB IDO: Fix comment/downtime entry_time reset
fixes 
2016-06-15 11:28:57 +02:00
Gunnar Beutner 8a714d66f1 Ensure that sent notifications are synced between Icinga instances
fixes 
2016-06-15 11:27:01 +02:00
Gunnar Beutner 45919b4844 Fix crash in ApiListener::PersistMessage
fixes 
2016-06-15 11:26:35 +02:00
Gunnar Beutner ace6882b59 Implement support for retrieving a list of templates from the API
fixes 
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 
2016-06-14 11:08:28 +02:00
Gunnar Beutner ff57b0ccd6 Add name attribute for the WorkQueue class
fixes 
2016-06-14 09:08:04 +02:00
Gunnar Beutner a8209c1a1a Change which instance is responsible for initiating notifications in a HA setup
refs 
2016-06-14 07:57:52 +02:00
Gunnar Beutner eb4aa4415c Fix cluster permissions for SendNotifications messages
refs 
2016-06-13 11:13:25 +02:00
Gunnar Beutner cb01f96dad Don't forward SendNotifications messages to non-local zones
refs 
2016-06-13 10:48:59 +02:00
Markus Frosch 8808e709c9 Make change to OK always a hard state
refs 
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 
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 
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 

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 

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 
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 
2016-06-06 13:07:49 +02:00
Michael Friedrich 0ce41399e0 DB IDO: Ensure to delete outdated comments/downtimes for host/service objects
fixes 
2016-06-03 14:40:37 +02:00
Gunnar Beutner aeb7a4a70b Fix incorrect check interval for SOFT->HARD transitions
fixes 
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 

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 
2016-05-21 18:58:19 +02:00
Michael Friedrich 3f1a9f150b Silence compiler warnings
refs 
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 
2016-05-21 13:41:43 +02:00
Michael Friedrich e27dee5476 Windows: Fix missing path for repository handler
fixes 
2016-05-21 13:05:35 +02:00
Gunnar Beutner 78705e74f3 Open the command pipe with O_RDWR
fixes 
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 
2016-05-18 14:30:36 +02:00
Gunnar Beutner bb69540b32 Fix exception in PerfdataWriter::RotateFile
fixes 
2016-05-18 14:01:32 +02:00
Gunnar Beutner 222b90107f Fix crash in ConfigItem::Commit
fixes 
2016-05-18 12:53:41 +02:00
Gunnar Beutner 93da47a670 Fix PostgreSQL warnings on startup
fixes 
2016-05-17 10:32:38 +02:00
Gunnar Beutner bc12d6c0d6 Fix race condition in ConfigObject::SetAuthority
fixes 
2016-05-12 14:06:28 +02:00
Gunnar Beutner 97a5091abc Fix incorrect re-scheduling behavior for command_endpoint checks
refs 
2016-05-12 13:47:32 +02:00
Gunnar Beutner de1b70cf44 Fix incorrect variable names for joined fields in filter expressions
fixes 
2016-05-12 10:24:15 +02:00
Michael Friedrich 3c852311e1 Fix possible crash in Add{Comment,Downtime}
refs 
2016-05-11 16:12:09 +02:00
Gunnar Beutner 1ad4d9cd27 Report failed reload attempts for the icinga check
fixes 
fixes 
fixes 
2016-05-11 16:07:28 +02:00
Gunnar Beutner 0b95be7b99 Fix incorrect calculation in Downtime::IsInEffect
fixes 
2016-05-11 14:13:43 +02:00
Michael Friedrich 90f102abf3 Ensure that program status updates are immediately updated in DB IDO
fixes 
2016-05-11 14:03:40 +02:00
Gunnar Beutner 0bc139af93 Improve timing behavior for UpdateObjectAuthority calls
refs 
2016-05-11 13:04:39 +02:00
Gunnar Beutner fc1168ed3e Only activate HARunOnce objects once there's a cluster connection
fixes 
2016-05-11 12:50:40 +02:00
Michael Friedrich a529725a92 Fix overloaded command pipe errors
fixes 
2016-05-11 11:04:28 +02:00
Gunnar Beutner 2adfcb56fe Improve error handling for TlsStream::Handshake
fixes 
2016-05-11 10:09:54 +02:00
Gunnar Beutner b9fdb3bfd9 Make sure that object names aren't empty
fixes 
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 

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 
2016-05-11 09:23:55 +02:00
Gunnar Beutner 81a7a002b4 Improve validation for flow control statements
fixes 
2016-05-11 08:01:31 +02:00
Michael Friedrich 9a88185b12 API: Fix error handling for invalid JSON request body
fixes 
2016-05-10 15:16:35 +02:00
Michael Friedrich 1c6f09f44e API: Fix error message handling for invalid attributes in PUT requests
refs 
2016-05-10 13:43:36 +02:00
Michael Friedrich ba82d2eb20 Move CalculateExecutionTime and CalculateLatency into the CheckResult class
fixes 
2016-05-10 12:16:49 +02:00
Gunnar Beutner f6f3bd1e4c Implement support for limiting the number of concurrent checks
fixes 
2016-05-10 11:26:55 +02:00
Gunnar Beutner eab2fb79ad Fix crash in UnameHelper()
fixes 
2016-05-10 09:46:48 +02:00