]> granicus.if.org Git - icinga2/log
icinga2
11 years agolivestatus: more fixes on joins, ptrs
Michael Friedrich [Wed, 10 Jul 2013 14:11:40 +0000 (16:11 +0200)]
livestatus: more fixes on joins, ptrs

refs #4372

11 years agolivestatus: close socket on component Stop()
Michael Friedrich [Wed, 10 Jul 2013 12:19:01 +0000 (14:19 +0200)]
livestatus: close socket on component Stop()

refs #4376

11 years agolivestatus: use generic Value() as row accessor instead of Object()
Michael Friedrich [Wed, 10 Jul 2013 12:06:46 +0000 (14:06 +0200)]
livestatus: use generic Value() as row accessor instead of Object()

This will allow comments/downtimes to be stashed as string (id) while
existing objects will still be available as Value().

refs #4372

11 years agoFix nullptr deref in Service::GetLastCheckPerfData().
Gunnar Beutner [Wed, 10 Jul 2013 07:57:18 +0000 (09:57 +0200)]
Fix nullptr deref in Service::GetLastCheckPerfData().

11 years agolivestatus: add host and service group getters
Michael Friedrich [Tue, 9 Jul 2013 16:33:27 +0000 (18:33 +0200)]
livestatus: add host and service group getters

refs #4372

11 years agolivestatus: add commands table (thruk now shows extinfo)
Michael Friedrich [Tue, 9 Jul 2013 16:09:03 +0000 (18:09 +0200)]
livestatus: add commands table (thruk now shows extinfo)

refs #4372

11 years agolivestatus: fix typo
Michael Friedrich [Tue, 9 Jul 2013 16:05:47 +0000 (18:05 +0200)]
livestatus: fix typo

11 years agolivestatus: add empty logtable
Michael Friedrich [Tue, 9 Jul 2013 15:46:48 +0000 (17:46 +0200)]
livestatus: add empty logtable

refs #4372

11 years agolivestatus: add contact*, status, service table attributes
Michael Friedrich [Tue, 9 Jul 2013 15:15:38 +0000 (17:15 +0200)]
livestatus: add contact*, status, service table attributes

comments and downtimes require special object treatment -> linked to
services?

refs #4372

11 years agoservice: add IsHostCheck helper
Michael Friedrich [Tue, 9 Jul 2013 14:59:31 +0000 (16:59 +0200)]
service: add IsHostCheck helper

11 years agoMerge remote-tracking branch 'origin/master'
Gunnar Beutner [Tue, 9 Jul 2013 06:46:02 +0000 (08:46 +0200)]
Merge remote-tracking branch 'origin/master'

11 years agoAdd DECLARE_PTR_TYPEDEFS macro for Ptr/WeakPtr typedefs.
Gunnar Beutner [Tue, 9 Jul 2013 06:42:08 +0000 (08:42 +0200)]
Add DECLARE_PTR_TYPEDEFS macro for Ptr/WeakPtr typedefs.

11 years agolivestatus: add service table accessors
Michael Friedrich [Mon, 8 Jul 2013 15:09:15 +0000 (17:09 +0200)]
livestatus: add service table accessors

not yet complete, but the same level as host table accessors.

refs #4372

11 years agocontrib: add simple dummy config generator
Michael Friedrich [Sat, 6 Jul 2013 18:53:07 +0000 (20:53 +0200)]
contrib: add simple dummy config generator

11 years agolog an error to debug when check_command not found on service execution
Michael Friedrich [Sat, 6 Jul 2013 18:46:09 +0000 (20:46 +0200)]
log an error to debug when check_command not found on service execution

refs #4391

11 years agocontrib: move old demo config into seperated osmc2012 dir
Michael Friedrich [Sat, 6 Jul 2013 18:40:57 +0000 (20:40 +0200)]
contrib: move old demo config into seperated osmc2012 dir

11 years agolivestatus: add more hosttable todos
Michael Friedrich [Fri, 5 Jul 2013 17:14:10 +0000 (19:14 +0200)]
livestatus: add more hosttable todos

refs #4372

11 years agoservice: register attribute last_hard_state
Michael Friedrich [Fri, 5 Jul 2013 12:05:49 +0000 (14:05 +0200)]
service: register attribute last_hard_state

11 years agolivestatus: move host attribute getter into host->service again
Michael Friedrich [Fri, 5 Jul 2013 11:42:40 +0000 (13:42 +0200)]
livestatus: move host attribute getter into host->service again

refs #4372

11 years agolivestatus: hosttable: fix checkperiod null ptr
Michael Friedrich [Fri, 5 Jul 2013 09:46:20 +0000 (11:46 +0200)]
livestatus: hosttable: fix checkperiod null ptr

refs #4372

11 years agolivestatus: hosttable: check if custom dictionary exists
Michael Friedrich [Fri, 5 Jul 2013 09:32:19 +0000 (11:32 +0200)]
livestatus: hosttable: check if custom dictionary exists

refs #4372

11 years agolivestatus: hoststable: lock service object for acknowledgement getters
Michael Friedrich [Fri, 5 Jul 2013 09:28:05 +0000 (11:28 +0200)]
livestatus: hoststable: lock service object for  acknowledgement getters

refs #4372

11 years agolivestatus: fix missing symbols
Michael Friedrich [Fri, 5 Jul 2013 08:51:09 +0000 (10:51 +0200)]
livestatus: fix missing symbols

refs #4372

11 years agolivestatus: add first part of host data providers
Michael Friedrich [Fri, 5 Jul 2013 07:35:49 +0000 (09:35 +0200)]
livestatus: add first part of host data providers

refs #4372

11 years agolivestatus: stop reading data if stream was closed
Michael Friedrich [Thu, 4 Jul 2013 07:45:44 +0000 (09:45 +0200)]
livestatus: stop reading data if stream was closed

fixes #4371

11 years agostream: remove ReadLine maxLength
Michael Friedrich [Thu, 4 Jul 2013 07:41:51 +0000 (09:41 +0200)]
stream: remove ReadLine maxLength

it doesn't do what its name suggests.

refs #4370

11 years agostream/livestatus: refactor ReadLine with context saving
Michael Friedrich [Wed, 3 Jul 2013 14:16:38 +0000 (16:16 +0200)]
stream/livestatus: refactor ReadLine with context saving

11 years agodocs: fix typo NotificationCommand->EventCommand
Michael Friedrich [Wed, 3 Jul 2013 09:21:16 +0000 (11:21 +0200)]
docs: fix typo NotificationCommand->EventCommand

11 years agoFix include directory for ltdl.h. v0.0.2
Gunnar Beutner [Tue, 2 Jul 2013 14:56:01 +0000 (16:56 +0200)]
Fix include directory for ltdl.h.

11 years agocompatlog: fix boost algorithm include
Michael Friedrich [Tue, 2 Jul 2013 11:38:06 +0000 (13:38 +0200)]
compatlog: fix boost algorithm include

11 years agoconfigconvert: lookup host check_command in template tree for hostcheck magic
Michael Friedrich [Tue, 2 Jul 2013 11:02:04 +0000 (13:02 +0200)]
configconvert: lookup host check_command in template tree for hostcheck magic

requires recursive template tree lookup in order to create the new
service linked as hostcheck directly on the host object.

refs #2743

11 years agoconfigconvert: make host check_command a new service and link it as hostcheck
Michael Friedrich [Tue, 2 Jul 2013 09:30:53 +0000 (11:30 +0200)]
configconvert: make host check_command a new service and link it as hostcheck

refs #2743

11 years agocompat: Refactor check_command/event_handler code.
Gunnar Beutner [Tue, 2 Jul 2013 08:24:27 +0000 (10:24 +0200)]
compat: Refactor check_command/event_handler code.

11 years agoUse object name if HOSTADDRESS macro isn't defined.
Gunnar Beutner [Tue, 2 Jul 2013 08:06:08 +0000 (10:06 +0200)]
Use object name if HOSTADDRESS macro isn't defined.

11 years agoFix validation warnings for components.
Gunnar Beutner [Tue, 2 Jul 2013 07:58:26 +0000 (09:58 +0200)]
Fix validation warnings for components.

11 years agoFix how the HOSTALIAS and CONTACTALIAS macros work.
Gunnar Beutner [Tue, 2 Jul 2013 07:54:24 +0000 (09:54 +0200)]
Fix how the HOSTALIAS and CONTACTALIAS macros work.

11 years agoImplement HOSTADDRESS and HOSTADDRESS6 macros.
Gunnar Beutner [Tue, 2 Jul 2013 07:47:31 +0000 (09:47 +0200)]
Implement HOSTADDRESS and HOSTADDRESS6 macros.

11 years agocompat: Make sure commands have unique names.
Gunnar Beutner [Tue, 2 Jul 2013 07:35:03 +0000 (09:35 +0200)]
compat: Make sure commands have unique names.

11 years agocompat: Escape new-lines in commands.
Gunnar Beutner [Tue, 2 Jul 2013 07:16:06 +0000 (09:16 +0200)]
compat: Escape new-lines in commands.

11 years agoRemove unnecessary parenthesis.
Gunnar Beutner [Tue, 2 Jul 2013 07:00:15 +0000 (09:00 +0200)]
Remove unnecessary parenthesis.

11 years agoMake sure the CGIs don't croak on our objects.cache file.
Gunnar Beutner [Tue, 2 Jul 2013 06:52:47 +0000 (08:52 +0200)]
Make sure the CGIs don't croak on our objects.cache file.

11 years agoImplement dumping commands and timeperiods.
Gunnar Beutner [Tue, 2 Jul 2013 06:44:03 +0000 (08:44 +0200)]
Implement dumping commands and timeperiods.

11 years agocompat: dump commands to objects.cache
Michael Friedrich [Mon, 1 Jul 2013 18:12:03 +0000 (20:12 +0200)]
compat: dump commands to objects.cache

service->notifications may create duplicates.

11 years agocompat: add more missing attributes
Michael Friedrich [Mon, 1 Jul 2013 17:04:08 +0000 (19:04 +0200)]
compat: add more missing attributes

11 years agoconfigconvert: export all enable_* attributes
Michael Friedrich [Mon, 1 Jul 2013 16:31:22 +0000 (18:31 +0200)]
configconvert: export all enable_* attributes

11 years agonotifications: refactor NotificationSent message
Michael Friedrich [Mon, 1 Jul 2013 15:56:21 +0000 (17:56 +0200)]
notifications: refactor NotificationSent message

like flapping and downtimes behave now.

refs #4361

11 years agofix typo
Michael Friedrich [Mon, 1 Jul 2013 15:56:05 +0000 (17:56 +0200)]
fix typo

11 years agoflapping: fix division by 0, add compat status, extcmds
Michael Friedrich [Mon, 1 Jul 2013 15:25:30 +0000 (17:25 +0200)]
flapping: fix division by 0, add compat status, extcmds

and some debug output.

refs #4360
refs #2711

11 years agocompatlog: use flapping threshold/current
Michael Friedrich [Mon, 1 Jul 2013 12:49:04 +0000 (14:49 +0200)]
compatlog: use flapping threshold/current

fixes #4360

11 years agocompatlog: add flapping messages
Michael Friedrich [Mon, 1 Jul 2013 12:29:07 +0000 (14:29 +0200)]
compatlog: add flapping messages

refs #4360

11 years agoImplement Service::GetFlappingCurrent().
Gunnar Beutner [Mon, 1 Jul 2013 12:39:43 +0000 (14:39 +0200)]
Implement Service::GetFlappingCurrent().

11 years agoImplement Service::GetFlappingThreshold().
Gunnar Beutner [Mon, 1 Jul 2013 12:30:19 +0000 (14:30 +0200)]
Implement Service::GetFlappingThreshold().

11 years agoAdd missing validator for flapping_threshold.
Gunnar Beutner [Mon, 1 Jul 2013 12:09:54 +0000 (14:09 +0200)]
Add missing validator for flapping_threshold.

11 years agoRemove the built-in attributes notes_url and action_url.
Gunnar Beutner [Mon, 1 Jul 2013 11:54:38 +0000 (13:54 +0200)]
Remove the built-in attributes notes_url and action_url.

11 years agoobjects.cache: Add support for the "notes" attribute.
Gunnar Beutner [Mon, 1 Jul 2013 11:51:00 +0000 (13:51 +0200)]
objects.cache: Add support for the "notes" attribute.

11 years agoImplement support for custom variables.
Gunnar Beutner [Mon, 1 Jul 2013 11:46:50 +0000 (13:46 +0200)]
Implement support for custom variables.

Fixes #4344

11 years agoFix missing variable definition: Service::m_Endpoint.
Gunnar Beutner [Mon, 1 Jul 2013 07:30:49 +0000 (09:30 +0200)]
Fix missing variable definition: Service::m_Endpoint.

11 years agorefactor downtime message handling (wip)
Michael Friedrich [Fri, 28 Jun 2013 14:08:43 +0000 (16:08 +0200)]
refactor downtime message handling (wip)

11 years agocompatlog: refactor custom/acknowledgement notifications with author/commenttext
Michael Friedrich [Mon, 1 Jul 2013 09:17:58 +0000 (11:17 +0200)]
compatlog: refactor custom/acknowledgement notifications with author/commenttext

refs #4361

11 years agocompatlog: fix checkcommand name
Michael Friedrich [Mon, 1 Jul 2013 08:03:00 +0000 (10:03 +0200)]
compatlog: fix checkcommand name

refs #4361

11 years agoCompat: log notifications (wip)
Michael Friedrich [Fri, 28 Jun 2013 19:31:38 +0000 (21:31 +0200)]
Compat: log notifications (wip)

- we need a way to figure out which last commend id (or, author and
  text) where set when type is CUSTOM or ACKNOWLEDGEMENT
- GetCheckCommandName was required too
- not sure if notifications.cpp is the correct location

refs #4361
refs #3985
refs #2750

11 years agoicinga2.conf.dist: add CompatLog as default
Michael Friedrich [Fri, 28 Jun 2013 18:46:53 +0000 (20:46 +0200)]
icinga2.conf.dist: add CompatLog as default

11 years agoremoting: multicast messages into debug log
Michael Friedrich [Fri, 28 Jun 2013 17:50:23 +0000 (19:50 +0200)]
remoting: multicast messages into debug log

11 years agofix typo
Michael Friedrich [Fri, 28 Jun 2013 11:44:18 +0000 (13:44 +0200)]
fix typo

11 years agoadd downtime message (started,stopped,cancelled) and compat logger
Michael Friedrich [Fri, 28 Jun 2013 11:40:01 +0000 (13:40 +0200)]
add downtime message (started,stopped,cancelled) and compat logger

refs #3985
refs #2750

11 years agoUpdate the tutorial a bit.
Gunnar Beutner [Fri, 28 Jun 2013 07:04:49 +0000 (09:04 +0200)]
Update the tutorial a bit.

11 years agodocs: update latest changes
Michael Friedrich [Thu, 27 Jun 2013 12:53:26 +0000 (14:53 +0200)]
docs: update latest changes

fixes #4338

11 years agoImplement validator for timeperiods.
Gunnar Beutner [Thu, 27 Jun 2013 09:25:10 +0000 (11:25 +0200)]
Implement validator for timeperiods.

Fixes #3845

11 years agoMove filter constants to itl/constants.conf.
Gunnar Beutner [Thu, 27 Jun 2013 09:23:32 +0000 (11:23 +0200)]
Move filter constants to itl/constants.conf.

11 years agoCompat: split cr output into (long_)output, log only output
Michael Friedrich [Wed, 26 Jun 2013 16:23:59 +0000 (18:23 +0200)]
Compat: split cr output into (long_)output, log only output

status.dat requires output, and long_output seperated for proper
representation by guis and addons (they cannot be changed for
compatibility reasons, we must change).

logging an ALERT requires only the output (first line of the check
result output).

fixes #3882
fixes #4348

11 years agoconfigconvert: fix already replaced quotes escaping
Michael Friedrich [Wed, 26 Jun 2013 15:52:54 +0000 (17:52 +0200)]
configconvert: fix already replaced quotes escaping

refs #2743

11 years agoconfigconvert: update README
Michael Friedrich [Wed, 26 Jun 2013 14:23:19 +0000 (16:23 +0200)]
configconvert: update README

refs #2743

11 years agoconfigconvert: custom attr (CVs, *_url, notes, *image*, 2d_coords)
Michael Friedrich [Wed, 26 Jun 2013 14:01:22 +0000 (16:01 +0200)]
configconvert: custom attr (CVs, *_url, notes, *image*, 2d_coords)

collect attributes
* notes
* icon_image
* icon_image_alt
* action_url
* notes_url
* statusmap_image
* 2d_coords
* _CVs
* !__I2CONVERT

and stash it onto the custom dictionary.

note: attribute names starting with a number need to be quoted.

fixes #3096

11 years agoconfigconvert: update README (NOTES and TODO)
Michael Friedrich [Wed, 26 Jun 2013 12:29:57 +0000 (14:29 +0200)]
configconvert: update README (NOTES and TODO)

refs #2743

11 years agoconfigconvert: treat 'null' (disable inheritance) as '0' instead
Michael Friedrich [Wed, 26 Jun 2013 12:29:31 +0000 (14:29 +0200)]
configconvert: treat 'null' (disable inheritance) as '0' instead

refs #2743

11 years agoconfigconvert: fix 'n' and 'a' notification_options (filter = 0, filter = ...)
Michael Friedrich [Wed, 26 Jun 2013 12:12:38 +0000 (14:12 +0200)]
configconvert: fix 'n' and 'a' notification_options (filter = 0, filter = ...)

refs #4060

11 years agoconfigconvert: skip empty notification filters
Michael Friedrich [Wed, 26 Jun 2013 11:49:25 +0000 (13:49 +0200)]
configconvert: skip empty notification filters

refs #4060

11 years agoconfigconvert: disable some debug leftovers
Michael Friedrich [Wed, 26 Jun 2013 11:30:26 +0000 (13:30 +0200)]
configconvert: disable some debug leftovers

$ find -type f -name '*.pm' | xargs sed -i 's/[^#]say Dumper/ #say
Dumper/g'

11 years agoconfigconvert: notification_options -> notification_{state,type}_filter
Michael Friedrich [Wed, 26 Jun 2013 11:22:15 +0000 (13:22 +0200)]
configconvert: notification_options -> notification_{state,type}_filter

parsing the existing comma separated list and using some perl hash magic
to convert it to the new notification_type_filter and
notification_state_filter logic.

fixed missing file permission check on writing config files too.

fixes #4060

11 years agoMake the "custom" attribute a dictionary.
Gunnar Beutner [Wed, 26 Jun 2013 08:18:26 +0000 (10:18 +0200)]
Make the "custom" attribute a dictionary.

11 years agoFix syntax error.
Gunnar Beutner [Wed, 26 Jun 2013 08:01:44 +0000 (10:01 +0200)]
Fix syntax error.

11 years agoImplement notification_*_filter variables for Host/Service objects.
Gunnar Beutner [Wed, 26 Jun 2013 07:50:04 +0000 (09:50 +0200)]
Implement notification_*_filter variables for Host/Service objects.

11 years agoconfigconvert: notification* attributes for services and users
Michael Friedrich [Tue, 25 Jun 2013 15:59:30 +0000 (17:59 +0200)]
configconvert: notification* attributes for services and users

refs #2743

11 years agoconfigconvert: remove trailing whitespaces
Michael Friedrich [Tue, 25 Jun 2013 14:05:02 +0000 (16:05 +0200)]
configconvert: remove trailing whitespaces

11 years agoconfigconvert: rename unique notification object identifier
Michael Friedrich [Tue, 25 Jun 2013 14:00:29 +0000 (16:00 +0200)]
configconvert: rename unique notification object identifier

refs #2743

11 years agoconfigconvert: serviceescalations with servicegroup_name
Michael Friedrich [Tue, 25 Jun 2013 13:39:02 +0000 (15:39 +0200)]
configconvert: serviceescalations with servicegroup_name

requires a new functionality to grab all service names by a given
servicegroup name. this only works after reprocessing all services with
their updated "servicegroups" attribute as array in the 2.x objects
hive.

after fetching the service names and their logical objects, it's quite
the same procedure as for the hostgroups and single
host_names/service_descriptions - for better reading, code remains
duplicated for now.

furthermore, escalation notification template objects are only added
based on the old contact->notification_command, and only a reference
template added when using within the service linking.

refs #4009

11 years agoconfigconvert: only export servicegroups when available
Michael Friedrich [Tue, 25 Jun 2013 11:16:10 +0000 (13:16 +0200)]
configconvert: only export servicegroups when available

refs #2743

11 years agoconfigconvert: convert service escalation to notification escalation logic
Michael Friedrich [Mon, 24 Jun 2013 20:15:00 +0000 (22:15 +0200)]
configconvert: convert service escalation to notification escalation logic

- fixed bug with contactgroups in plain notifications
- fix bug with duplicated notifications (duplicate detection logic based
  on names, not template names)
- contacts may use templates too, and hide required values there
  (commands)
- added attribute getters which take templates into account (required
  for service -> notification_interval multiplied with service escalation
  first|last_notification too)
- apply the service escalation -> users -> commands as well as linking
  new notification with users, and services, defined either with
  * host_name/service_description
  * hostgroup_name/service_description
  * servicegroup_name (TODO)
- code duplication due to many nested loops with group wildcards

in short - we know why icinga 1.x takes ages to apply escalation.
because they look like added under pressure, and make no logical sense
compared to the rest. in short - they suck.

refs #4009

11 years agoImplement notification conditions.
Gunnar Beutner [Wed, 26 Jun 2013 07:08:50 +0000 (09:08 +0200)]
Implement notification conditions.

Fixes #2841

11 years agoMake sure flapping counters aren't negative.
Gunnar Beutner [Wed, 26 Jun 2013 06:52:06 +0000 (08:52 +0200)]
Make sure flapping counters aren't negative.

11 years agoConfig: Implement << and >> operators.
Gunnar Beutner [Wed, 26 Jun 2013 06:21:35 +0000 (08:21 +0200)]
Config: Implement << and >> operators.

11 years agoDon't allow asterisks in identifiers.
Gunnar Beutner [Tue, 25 Jun 2013 08:06:58 +0000 (10:06 +0200)]
Don't allow asterisks in identifiers.

11 years agoImplement script variables.
Gunnar Beutner [Tue, 25 Jun 2013 07:21:25 +0000 (09:21 +0200)]
Implement script variables.

11 years agoconfigconvert: treat address* and other attributes directly as macros
Michael Friedrich [Mon, 24 Jun 2013 15:03:34 +0000 (17:03 +0200)]
configconvert: treat address* and other attributes directly as macros

also for user attributes.

fixes #4333

11 years agoconfigconvert: update README
Michael Friedrich [Mon, 24 Jun 2013 14:19:58 +0000 (16:19 +0200)]
configconvert: update README

refs #2743

11 years agoconfigconvert: move to tools/
Michael Friedrich [Mon, 24 Jun 2013 14:14:20 +0000 (16:14 +0200)]
configconvert: move to tools/

fixes #4337

11 years agotools: move mkembedconfig into subdir
Michael Friedrich [Mon, 24 Jun 2013 13:57:11 +0000 (15:57 +0200)]
tools: move mkembedconfig into subdir

preparation for moving the conversion script into tools/

refs #4337

11 years agoconfigconvert: disable debug logging by default
Michael Friedrich [Mon, 24 Jun 2013 13:19:13 +0000 (15:19 +0200)]
configconvert: disable debug logging by default

11 years agoconfigconvert: run_icinga2 config test helper
Michael Friedrich [Mon, 24 Jun 2013 13:00:13 +0000 (15:00 +0200)]
configconvert: run_icinga2 config test helper

11 years agoconfigconvert: enable debug consolelogger for config test
Michael Friedrich [Mon, 24 Jun 2013 12:55:18 +0000 (14:55 +0200)]
configconvert: enable debug consolelogger for config test