Commit graph

78 commits

Author SHA1 Message Date
Yonas Habteab
91c7e60df8 Replace all existing copyright headers with SPDX headers
I've used the following command to replace the original copyright header
lines in a C-style comment block:

```
$ find . \( -type d \( -name '\..*' -o -name third-party -o -name scripts -o -name prefix -o -name malloc -o -name server -o -name docker -o -name build -o -name doc \) -prune \) -o -type f -exec perl -pi -e 's{/\*[^*]*\(\s*c\s*\)\s*(\d{4})\s*Icinga\s+GmbH[^*]*\*/}{// SPDX-FileCopyrightText: \1 Icinga GmbH <https://icinga.com>\n// SPDX-License-Identifier: GPL-2.0-or-later}gi' {} +
```

For files that use shell-style comments (#) like CMakeLists.txt, I've
used this command:

```
$ find . \( -type d \( -name '\..*' -o -name third-party -o -name scripts -o -name prefix -o -name malloc -o -name server -o -name docker -o -name build -o -name doc \) -prune \) -o -type f -exec perl -pi -e 's{#.*\(\s*c\s*\)\s(\d{4})\sIcinga\s+GmbH.*}{# SPDX-FileCopyrightText: \1 Icinga GmbH <https://icinga.com>\n# SPDX-License-Identifier: GPL-2.0-or-later}gi' {} +
```

And for SQL files:

```
$ find . \( -type d \( -name '\..*' -o -name third-party -o -name scripts -o -name prefix -o -name malloc -o -name server -o -name docker -o -name build -o -name doc \) -prune \) -o -type f \( -name '*.sql' \) -exec perl -pi -e 's{--.*\(c\)\s(\d{4})\sIcinga\sGmbH.*}{-- SPDX-FileCopyrightText: \1 Icinga GmbH <https://icinga.com>\n-- SPDX-License-Identifier: GPL-2.0-or-later}gi' {} +
$ find . \( -type d \( -name '\..*' -o -name third-party -o -name scripts -o -name prefix -o -name malloc -o -name server -o -name docker -o -name build -o -name doc \) -prune \) -o -type f \( -name '*.sql' \) -exec perl -pi -e 's{-- Copyright \(c\)\s(\d{4})\sIcinga\s+Development\sTeam.*}{-- SPDX-FileCopyrightText: \1 Icinga GmbH <https://icinga.com>\n-- SPDX-License-Identifier: GPL-2.0-or-later}gi' {} +
```
2026-02-04 14:00:05 +01:00
Alexander A. Klimov
83021f8231 CONTEXT: use << everywhere to unify usages 2022-11-30 11:06:51 +01:00
Alexander A. Klimov
b82814fb29 CONTEXT: lazily evaluate frames to only actually assemble when needed 2022-11-30 11:06:45 +01:00
Julian Brost
a958a735d7
Merge pull request #9555 from Icinga/ApplyRule-GetDebugInfo
ApplyRule#GetDebugInfo(): return by const ref to avoid malloc()
2022-11-16 13:35:04 +01:00
Yonas Habteab
a8d46e6d47 Use service short name for evaluating targeted service rules 2022-11-04 10:19:26 +01:00
Alexander A. Klimov
27a559c5fe ApplyRule#GetDebugInfo(): return by const ref to avoid malloc() 2022-10-28 15:33:44 +02:00
Alexander A. Klimov
a698b9c3da ApplyRule::RuleMap: reduce complexity, save unnecessary lookups 2022-10-28 14:27:53 +02:00
Alexander A. Klimov
a907c2ac9a Targeted apply rules: don't unnecessarily eval filter 2022-10-28 14:27:53 +02:00
Alexander A. Klimov
038a5e8ef6 Unify storages of regular/targeted apply rules: std::vector<ApplyRule::Ptr> 2022-10-28 14:27:53 +02:00
Alexander A. Klimov
a56ad38ad3 Separately handle apply rules targetting only specific parent objects
not to unnecessarily run e.g. the filter assign where host.name=="example.com"
for all hosts being not example.com.
2022-10-28 14:27:53 +02:00
Alexander A. Klimov
d468d7993c Lookup apply rules faster by Type*, not String and by map instead of ==/!=
1. The lookup of apply rules per source type now implies
   no String(const char*) (no malloc()) and just pointer (uint64) comparisions
2. Apply rules are now also grouped by target type via a nested map, that obsoletes
   checking the target type while iterating over all rules per source type
2022-10-19 13:43:51 +02:00
Alexander A. Klimov
f311dfb775 Apply rules: import default templates first
... to allow to override the attributes they set.

refs #7914
2020-12-14 18:15:18 +01:00
Michael Friedrich
d14a88235d Replace Copyright header with a short version, part I
CLion -> replace in path
2019-02-25 14:48:22 +01:00
Michael Friedrich
dab53448bc icinga.com: Update *.{h,c}pp 2018-10-18 09:27:04 +02:00
Gunnar Beutner
c2fb9fe226 Use initializer lists for arrays and dictionaries 2018-01-16 12:27:44 +01:00
Gunnar Beutner
a36e847c6c Allocate ConfigItemBuilder objects on the stack 2018-01-11 10:52:26 +01:00
Gunnar Beutner
abe3f8a959 Build fix for Debian wheezy 2018-01-03 10:32:33 +01:00
Michael Insel
158ae2188e Change copyright header for 2018 2018-01-02 12:08:55 +01:00
Gunnar Beutner
42744fde5b Remove extraneous whitespace 2017-12-14 08:50:09 +01:00
Gunnar Beutner
2e87c280ed Use initializer lists instead of std::vector::push_back 2017-11-30 17:47:09 +01:00
Gunnar Beutner
d05b7c4178 Allow expressions for the type in object/template declarations 2017-05-11 14:21:30 +02:00
Michael Friedrich
b7caf0820d Ensure that *.icinga.com is used everywhere
fixes #13897
fixes #13277
2017-01-10 17:19:12 +01:00
Gunnar Beutner
78cd56e277 Implement support for default templates
fixes #12575
2016-08-28 10:27:43 +02:00
Gunnar Beutner
b5b09216c6 Use lambda functions for INITIALIZE_ONCE
fixes #12562
2016-08-27 09:48:36 +02:00
Gunnar Beutner
288413f046 Replace BOOST_FOREACH with range-based for loops
fixes #12538
2016-08-25 06:46:17 +02:00
Gunnar Beutner
218e780a44 Avoid unnecessary string copies
fixes #12509
2016-08-23 15:01:40 +02:00
Gunnar Beutner
599929b0f6 Update copyright headers for 2016 2016-01-12 08:29:59 +01:00
Gunnar Beutner
8136cda367 Implement the ignore_on_error keyword
fixes #9960
2015-10-05 12:44:11 +02:00
Gunnar Beutner
0c10d64094 Fix incorrect error messages for apply-for
fixes #10205
2015-09-24 08:30:03 +02:00
Michael Friedrich
da83bae660 Rename config/modules to config/packages
fixes #9953
2015-09-01 20:09:04 +02:00
Michael Friedrich
0f5287c2b1 Add module attribute for ConfigObject and set its origin
fixes #9852
2015-08-17 16:08:57 +02:00
Gunnar Beutner
071d2f18fb Rename DynamicObject/DynamicType to ConfigObject/ConfigType
fixes #9914
2015-08-15 20:40:41 +02:00
Gunnar Beutner
f69c0bd5a2 Remove the ScopeCurrent constant
fixes #9044
2015-04-15 08:36:17 +02:00
Gunnar Beutner
d3c0c1e42b Fix incorrect variable values for apply+for
fixes #8851
2015-03-23 15:53:21 +01:00
Gunnar Beutner
e22386e63f Make load order for objects more reliable
fixes #8770
2015-03-19 15:58:38 +01:00
Gunnar Beutner
551cb6ae87 Don't convert loop variables to string when using apply-for
fixes #8519
2015-02-24 17:51:16 +01:00
Gunnar Beutner
97fc5bb10b Implement additional attributes for the Host class
refs #7564
2015-02-09 08:50:17 +01:00
Gunnar Beutner
fb323ee215 Evaluate apply filters in the for loop
fixes #7610
2015-01-29 12:38:25 +01:00
Michael Friedrich
78bfd0204c Update copyright year 2015-01-22 12:00:23 +01:00
Gunnar Beutner
9f18211ada Remove obsolete code
refs #7709
2014-12-18 15:57:30 +01:00
Gunnar Beutner
873e294158 Refactor the WorkQueue class to make error reporting easier
refs #7709
2014-12-18 15:11:57 +01:00
Gunnar Beutner
1cb0231c05 Refactor how variable scopes work
refs #8074
2014-12-14 11:33:45 +01:00
Gunnar Beutner
dd4c04aa9b Implement the 'global' keyword to differentiate between variable scopes
refs #8074
2014-12-13 17:48:58 +01:00
Gunnar Beutner
cfd775c948 Move the VMFrame class to libbase
refs #8065
2014-12-12 15:33:56 +01:00
Gunnar Beutner
2720333d6e Fix missing location information for included files
fixes #7927
2014-12-10 15:06:09 +01:00
Gunnar Beutner
be4166b99e Fix incorrect brace placement 2014-12-08 11:43:33 +01:00
Gunnar Beutner
f5766f9118 Refactor the stack frame handling for scripts
fixes #7748
2014-11-22 19:24:03 +01:00
Gunnar Beutner
334e61037a Split DynamicObject::OnConfigLoaded into two separate events
refs #7780
2014-11-21 18:31:37 +01:00
Gunnar Beutner
0078e00c13 Refactor apply/object rules
fixes #7700
2014-11-20 21:29:50 +01:00
Gunnar Beutner
ec109b04dd Refactor the AST
refs #7622
2014-11-10 12:06:25 +01:00