Skip to content

Commit 4d0f386

Browse files
Merge pull request #166 from axoflow/4.18-prep
4.18 docs
2 parents 20e5ddd + 7749855 commit 4d0f386

File tree

5 files changed

+56
-11
lines changed

5 files changed

+56
-11
lines changed

config/_default/config.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,9 @@ description = "Documentation for AxoSyslog, the scalable security data processor
172172
[params.product]
173173
name = "AxoSyslog"
174174
abbrev = "AxoSyslog"
175-
version = "4.17"
176-
techversion = "4.17.0"
177-
configversion = "4.17"
175+
version = "4.18"
176+
techversion = "4.18.0"
177+
configversion = "4.18"
178178
syslog-ng = "syslog-ng"
179179
selinux = "SELinux"
180180
apparmor = "AppArmor"

content/chapter-destinations/configuring-destinations-http-nonjava/reference-destination-http-nonjava/_index.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -191,21 +191,21 @@ For details on how this option influences HTTP batch mode, see [http: Posting me
191191

192192
| | |
193193
| -------- | ----------- |
194-
| Type: | string list |
194+
| Type: | string or template list |
195195
| Default: | |
196196

197197
*Description:* Custom HTTP headers to include in the request, for example, `headers("HEADER1: header1", "HEADER2: header2")`. If not set, only the default headers are included, but no custom headers.
198198

199199
The following headers are included by default:
200200

201-
- X-Syslog-Host: `<host>`
201+
- X-Syslog-Host: `<host>`
202+
- X-Syslog-Program: `<program>`
203+
- X-Syslog-Facility: `<facility>`
204+
- X-Syslog-Level: `<loglevel/priority>`
202205

203-
- X-Syslog-Program: `<program>`
204-
205-
- X-Syslog-Facility: `<facility>`
206-
207-
- X-Syslog-Level: `<loglevel/priority>`
206+
Starting with {{< product >}} 4.18, you can use templates in the headers. Note that when using batching in the destination adn templates in `headers()`, the value of the template is calculated from the first message of the batch. Make sure to set the [`worker-partition-key()`](#worker-partition-key) option properly to group similar messages.
208207

208+
If you want to use literal dollar signs (`$`) in `headers()`, escape them like `$$`.
209209

210210
{{< include-headless "chunk/option-destination-hook.md" >}}
211211

content/filterx/filterx-parsing/csv/reference-parsers-csv/_index.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,26 @@ Using the `greedy=true` flag will assign the remainder of the message to the las
6969
my-parsed-values = parse_csv(${MESSAGE}, columns=["COLUMN1", "COLUMN2", "COLUMN3"], delimiters=[","], greedy=true);
7070
```
7171

72+
## quote-pairs() {#quote-pairs}
73+
74+
| | |
75+
| --------- | ------------------------------- |
76+
| Synopsis: | `quote-pairs=["<qoute-pair1>", "<qoute-pair2>"]` |
77+
78+
Available in {{% param "product.abbrev" %}} 4.18 and later.
79+
80+
*Description:* List of quote pairs that are ignored and removed from the beginning and end of the strings. Note that the beginning and ending quote character does not have to be identical, for example, `[}` can also be a quote-pair.
81+
82+
In the following example, square brackets (`[]`) and single-quotes (`'`) are ignored:
83+
84+
```shell
85+
filterx {
86+
str = "value1,[value2],'value3'";
87+
${MESSAGE} = parse_csv(str, quote_pairs=["[]", "'"]);
88+
# The value of ${MESSAGE} will be "value1,value2,value3"
89+
};
90+
```
91+
7292
## strip_whitespace {#strip-whitespace}
7393

7494
| | |

content/filterx/operator-reference.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ Note that:
2929
- If one operand is integer and the other is double, the result will be double.
3030
- The `+` operator can add strings and other types as well, for details, see the [Plus operator]({{< relref "#plus-operator" >}}).
3131
- To increase the value of a variable, see the [Plus equal operator]({{< relref "#plus-equal-operator" >}}).
32+
- In version 4.18 and later, you can use the `+` and `-` operators as unary operators with a single operand to indicate a positive or a negative value. For example:
33+
34+
```shell
35+
a = 42;
36+
b = -a;
37+
# b is -42
38+
```
3239
3340
### Plus operator
3441
@@ -224,6 +231,18 @@ filterx {
224231
};
225232
```
226233
234+
Staring with {{< product >}} version 4.18, you can use the `-` operator with a variable to to refer to characters from the end of the string, for example:
235+
236+
```shell
237+
filterx {
238+
str = "example";
239+
idx = 3;
240+
str[..-idx] == "exam";
241+
str[-idx..] == "ple";
242+
str[idx..-idx] == "m";
243+
};
244+
```
245+
227246
## Ternary conditional operator
228247
229248
The [ternary conditional operator](https://en.wikipedia.org/wiki/Ternary_conditional_operator) evaluates an expression and returns the first argument if the expression is true, and the second argument if it's false.

content/whats-new/_index.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@ weight: 10
44
---
55
<!-- This file is under the copyright of Axoflow, and licensed under Apache License 2.0, except for using the Axoflow and AxoSyslog trademarks. -->
66

7-
This page is a changelog that collects the major changes and additions to this documentation. (If you want to know the details about why we have separate documentation for AxoSyslog and how it relates to the `syslog-ng` documentation, read our [syslog-ng documentation and similarities with AxoSyslog Core](https://axoflow.com/blog/axosyslog-core-documentation-syslog-ng) blog post.)
7+
{{< include-headless "banner-new-to-axosyslog.md" >}}
8+
9+
## Version 4.18 (2025-09-30)
10+
11+
- You can now use macros and templates in the [`headers()` option]({{< relref "/chapter-destinations/configuring-destinations-http-nonjava/reference-destination-http-nonjava/_index.md#headers" >}}) of the `http()` destination to set the headers dynamically.
12+
- The `parse_csv` FilterX parser now supports the [`quote-pairs`]({{< relref "/filterx/filterx-parsing/csv/reference-parsers-csv/_index.md#quote-pairs" >}}) option.
13+
- [`+` and `-` unary operators]({{< relref "/filterx/operator-reference.md#slicing" >}}) for FilterX.
814

915
## Version 4.17 (2025-09-04)
1016

0 commit comments

Comments
 (0)