Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions config/_default/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,9 @@ description = "Documentation for AxoSyslog, the scalable security data processor
[params.product]
name = "AxoSyslog"
abbrev = "AxoSyslog"
version = "4.17"
techversion = "4.17.0"
configversion = "4.17"
version = "4.18"
techversion = "4.18.0"
configversion = "4.18"
syslog-ng = "syslog-ng"
selinux = "SELinux"
apparmor = "AppArmor"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,21 +191,21 @@ For details on how this option influences HTTP batch mode, see [http: Posting me

| | |
| -------- | ----------- |
| Type: | string list |
| Type: | string or template list |
| Default: | |

*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.

The following headers are included by default:

- X-Syslog-Host: `<host>`
- X-Syslog-Host: `<host>`
- X-Syslog-Program: `<program>`
- X-Syslog-Facility: `<facility>`
- X-Syslog-Level: `<loglevel/priority>`

- X-Syslog-Program: `<program>`

- X-Syslog-Facility: `<facility>`

- X-Syslog-Level: `<loglevel/priority>`
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.

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

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,26 @@ Using the `greedy=true` flag will assign the remainder of the message to the las
my-parsed-values = parse_csv(${MESSAGE}, columns=["COLUMN1", "COLUMN2", "COLUMN3"], delimiters=[","], greedy=true);
```

## quote-pairs() {#quote-pairs}

| | |
| --------- | ------------------------------- |
| Synopsis: | `quote-pairs=["<qoute-pair1>", "<qoute-pair2>"]` |

Available in {{% param "product.abbrev" %}} 4.18 and later.

*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.

In the following example, square brackets (`[]`) and single-quotes (`'`) are ignored:

```shell
filterx {
str = "value1,[value2],'value3'";
${MESSAGE} = parse_csv(str, quote_pairs=["[]", "'"]);
# The value of ${MESSAGE} will be "value1,value2,value3"
};
```

## strip_whitespace {#strip-whitespace}

| | |
Expand Down
19 changes: 19 additions & 0 deletions content/filterx/operator-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ Note that:
- If one operand is integer and the other is double, the result will be double.
- The `+` operator can add strings and other types as well, for details, see the [Plus operator]({{< relref "#plus-operator" >}}).
- To increase the value of a variable, see the [Plus equal operator]({{< relref "#plus-equal-operator" >}}).
- 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:

```shell
a = 42;
b = -a;
# b is -42
```

### Plus operator

Expand Down Expand Up @@ -224,6 +231,18 @@ filterx {
};
```

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:

```shell
filterx {
str = "example";
idx = 3;
str[..-idx] == "exam";
str[-idx..] == "ple";
str[idx..-idx] == "m";
};
```

## Ternary conditional operator

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.
Expand Down
8 changes: 7 additions & 1 deletion content/whats-new/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ weight: 10
---
<!-- This file is under the copyright of Axoflow, and licensed under Apache License 2.0, except for using the Axoflow and AxoSyslog trademarks. -->

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.)
{{< include-headless "banner-new-to-axosyslog.md" >}}

## Version 4.18 (2025-09-30)

- 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.
- The `parse_csv` FilterX parser now supports the [`quote-pairs`]({{< relref "/filterx/filterx-parsing/csv/reference-parsers-csv/_index.md#quote-pairs" >}}) option.
- [`+` and `-` unary operators]({{< relref "/filterx/operator-reference.md#slicing" >}}) for FilterX.

## Version 4.17 (2025-09-04)

Expand Down