Commit Graph

75 Commits

Author SHA1 Message Date
Michael Friedrich 739f23f0fc config conversion: Rename dependencies.
refs #4741
2013-09-25 16:13:39 +02:00
Michael Friedrich d9508bb64c config conversion: Fix command exists checks by type.
refs #4741
2013-09-25 16:04:40 +02:00
Michael Friedrich 61e3fcf0a7 config conversion: Move notification_interval|period from service to notification.
refs #4741
2013-09-25 16:04:40 +02:00
Michael Friedrich 4c14619521 config conversion: Move notification filters from service into notification.
refs #4741
2013-09-25 16:04:40 +02:00
Michael Friedrich cc6a9e6b36 config conversion: Rename hostcheck to check.
refs #4741
2013-09-25 16:04:40 +02:00
Michael Friedrich e236894de9 config conversion: Rename group attributes.
refs #4741
2013-09-25 16:04:40 +02:00
Michael Friedrich 00532f6da7 config conversion: Fix object names in test config. 2013-09-25 16:04:40 +02:00
Michael Friedrich 1342dec909 config conversion: Remove enable_{active,passive}_checks export. 2013-09-25 16:04:40 +02:00
Gunnar Beutner bf1a800e39 Update copyright information. 2013-09-25 07:45:56 +02:00
Michael Friedrich ad3a8f19ed Config Conversion: Update --help.
fixes #4715
2013-09-18 16:22:28 +02:00
Michael Friedrich 96e18e625f Config Conversion: Refactor hostcheck service as new object, add stats.
now the service template objects get the custom tmpl too.

refs #4715
2013-09-18 16:18:16 +02:00
Michael Friedrich 6a3c1ec7aa Config Conversion: Allow to define external global templates referenced by all objects.
tests:

$ ./icinga2_convert_v1_v2.pl -c /etc/icinga/icinga.cfg -o conf/
--hosttmpl="hostbumstitmpl"
--servicetmpl="servicebumstitmpl"
--usertmpl="userbumstitmpl"
--timeperiodtmpl="timeperiodbumstitmpl"
--notificationtmpl="notificationbumstitmpl"
--checkcommandtmpl="checkcommandbumstitmpl"
--eventcommandtmpl="eventcommandbumstitmpl"
--notificationcommandtmpl="notificationcommandbumstitmpl"

refs #4697
2013-09-18 11:42:16 +02:00
Michael Friedrich 1538579c66 Config Conversion: Detect hosts w/o services and properly add hostcheck.
it's ugly but it works. requires code refactoring.
2013-09-16 14:57:12 +02:00
Michael Friedrich 374b37077f Config Conversion: Add proper check_command detection in templates. 2013-09-16 14:05:41 +02:00
Gunnar Beutner d38c8ab0bb config: Fix arguments for hostchecks. 2013-09-13 13:48:41 +02:00
Gunnar Beutner de2a0aaea1 config: Fix attribute lookup functions. 2013-09-13 13:32:42 +02:00
Gunnar Beutner e0d5e2bf93 config: Temporarily set hostname for services. 2013-09-13 13:05:55 +02:00
Gunnar Beutner 4fdab9e2ac config: Fix looking up host custom attributes. 2013-09-13 12:36:49 +02:00
Gunnar Beutner 2b97884201 config: Fix resolving macros in command arguments. 2013-09-13 12:32:38 +02:00
Michael Friedrich 2d991703d6 Config Conversion: Fix global macros requiring escape_str() call.
fixes #4703
2013-09-13 09:56:25 +02:00
Gunnar Beutner eb43cc3101 Fix custom macros. 2013-09-13 09:45:24 +02:00
Gunnar Beutner 6a40fe7a40 Convert custom attributes to macros. 2013-09-13 09:28:32 +02:00
Michael Friedrich cc1dbbca0b Config Conversion: Object macros start with name.
refs #4700
2013-09-12 20:24:13 +02:00
Michael Friedrich a5fe44b81f Config Conversion: Treat command arg macros directly as object macros
- if detected, they will be replaced with their real name on the command
  line (instead of $ARGn$)
- if macro is resolvable, its value will be added to the macro
  dictionary
- if macro is not resolvable, it will be skipped and left for the core
  to resolve the macro on runtime.

caveat: getting host/service attributes requires lookups from the object
into the template tree, as well as host macros on services a search on
the host object itsself.

note: macro resolver is rudimentary implemented. there's space for more
detailed if-macro-name-is-then-return-attribute-abc. main problem are
the missing underscores in macro names, but not in attributes (what the
...?).

fixes #4700
2013-09-12 20:13:28 +02:00
Michael Friedrich f1e1a716d3 Config Conversion: Update sample icinga2 config.
refs #4701
2013-09-12 18:42:01 +02:00
Michael Friedrich f91c64098b Config Conversion: Fix import removing inline comments after ';' and '#'.
fixes #4499
2013-09-12 18:41:18 +02:00
Michael Friedrich c9497367d2 Config Conversion: Make ADMIN/USER macros global again (in resource.conf)
refs #4701
2013-09-12 18:41:18 +02:00
Michael Friedrich 2e4a37b297 Config Conversion: s/user_macros/global_macros/g 2013-09-12 18:41:18 +02:00
Michael Friedrich c8b9fce0bc Config Conversion: introduce resource.conf with global macros
refs #4701
2013-09-12 18:41:18 +02:00
Michael Friedrich dc0f2e2fa9 Config Conversion: Skip ARGn macros on Command object export. 2013-09-10 14:04:18 +02:00
Michael Friedrich 4d95eaa6c5 Config Conversion: Fix output header. 2013-09-10 13:54:14 +02:00
Michael Friedrich 4668f6fb3b Config Conversion: Check that icinga.cfg is passed via -c option. 2013-09-10 11:25:10 +02:00
Gunnar Beutner a833fc0fc3 Revert "convert: Use += for macros and custom attributes."
This reverts commit ff6453cfa1.
2013-09-10 10:54:17 +02:00
Gunnar Beutner ff6453cfa1 convert: Use += for macros and custom attributes. 2013-09-10 10:47:38 +02:00
Michael Friedrich de4e2c6585 Config Conversion: Treat notification option 'r' as StateFilterOK. 2013-09-10 10:28:37 +02:00
Gunnar Beutner 0a80dbc305 Fix: Host notifications should be added to the host check service instead of the host
Fixes #4674
2013-09-04 10:43:14 +02:00
Michael Friedrich 14c2e99e4b Config Conversion: fix missing Command macros, avoid duplicates 2013-08-30 17:50:05 +02:00
Michael Friedrich 7f0a210ff9 Config Conversion: support $USERn$ and $ADMINx$ macros in Notification|EventCommand 2013-08-30 17:50:05 +02:00
Michael Friedrich 1a3ecb04fb Config Conversion: Add ADMINPAGER|EMAIL as macros from icinga.cfg
and fix multiple user macros too. and add NotificationFilterCustom by
default.

fixes #4662
2013-08-30 15:58:58 +02:00
Michael Friedrich eff505e27f Config Conversion: Skip user macros for non-command objects. 2013-08-29 15:22:52 +02:00
Michael Friedrich 42b98d2c89 Config Conversion: Detect user macros properly. 2013-08-29 14:59:46 +02:00
Michael Friedrich de159b0133 Config Conversion: always add type NotificationFilterProblem. 2013-08-29 14:51:38 +02:00
Michael Friedrich 53a72fcaf1 Config Conversion: Fixes.
refs #2743
2013-08-29 13:14:59 +02:00
Michael Friedrich af86fa8ed9 Revert "make: mkembedconfig is required for 'dist'"
This reverts commit 1e637dbbd4.
2013-08-28 18:09:20 +02:00
Michael Friedrich 1e637dbbd4 make: mkembedconfig is required for 'dist'
fixes #4489
2013-08-28 16:19:13 +02:00
Michael Friedrich 6b649b8d4c 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
2013-07-02 13:03:29 +02:00
Michael Friedrich 2dc7cd20c8 configconvert: make host check_command a new service and link it as hostcheck
refs #2743
2013-07-02 13:03:29 +02:00
Michael Friedrich 5ce229f08f configconvert: export all enable_* attributes 2013-07-01 18:31:22 +02:00
Michael Friedrich 6ed811cd78 configconvert: fix already replaced quotes escaping
refs #2743
2013-06-26 17:52:54 +02:00
Michael Friedrich 7599e858ec configconvert: update README
refs #2743
2013-06-26 16:23:33 +02:00