Skip to content

Commit

Permalink
Formatting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Fekete authored and Robert Fekete committed Nov 9, 2024
1 parent f1003c1 commit 59b6038
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 36 deletions.
48 changes: 24 additions & 24 deletions content/headless/chunk/option-destination-diskbuffer.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,33 +127,33 @@ If you want to avoid performance fluctuations:
In the following case reliable disk-buffer() is used.

```shell
destination d_demo {
network(
"127.0.0.1"
port(3333)
disk-buffer(
flow-control-window-bytes(10000)
capacity-bytes(2000000)
reliable(yes)
dir("/tmp/disk-buffer")
)
);
};
destination d_demo {
network(
"127.0.0.1"
port(3333)
disk-buffer(
flow-control-window-bytes(10000)
capacity-bytes(2000000)
reliable(yes)
dir("/tmp/disk-buffer")
)
);
};
```

In the following case normal disk-buffer() is used.

```shell
destination d_demo {
network(
"127.0.0.1"
port(3333)
disk-buffer(
flow-control-window-size(10000)
capacity-bytes(2000000)
reliable(no)
dir("/tmp/disk-buffer")
)
);
};
destination d_demo {
network(
"127.0.0.1"
port(3333)
disk-buffer(
flow-control-window-size(10000)
capacity-bytes(2000000)
reliable(no)
dir("/tmp/disk-buffer")
)
);
};
```
18 changes: 9 additions & 9 deletions content/headless/chunk/option-destination-hook.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,19 @@ To execute an external program when the {{% param "product.abbrev" %}} configura
*Description:* Defines an external program that is executed when the {{% param "product.abbrev" %}} configuration is stopped or torn down, for example, on shutdown or during a {{% param "product.abbrev" %}} reload.


### Example: Using the hook-commands() with a network source
### Example: Using hook-commands() with a network source

In the following example, the `hook-commands()` is used with the `network()` driver and it opens an [iptables](https://en.wikipedia.org/wiki/Iptables "https://en.wikipedia.org/wiki/Iptables") port automatically as {{% param "product.abbrev" %}} is started/stopped.

The assumption in this example is that the `LOGCHAIN` chain is part of a larger ruleset that routes traffic to it. Whenever the {{% param "product.abbrev" %}} created rule is there, packets can flow, otherwise the port is closed.

```shell
source {
network(transport(udp)
hook-commands(
          startup("iptables -I LOGCHAIN 1 -p udp --dport 514 -j ACCEPT")
          shutdown("iptables -D LOGCHAIN 1")
        )
     );
};
source {
network(transport(udp)
hook-commands(
          startup("iptables -I LOGCHAIN 1 -p udp --dport 514 -j ACCEPT")
          shutdown("iptables -D LOGCHAIN 1")
        )
     );
};
```
2 changes: 1 addition & 1 deletion content/headless/chunk/option-destination-on-error.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## on-error()

| Type: | One of: `drop-message, drop-property, fallback-to-string, silently-drop-message, silently-drop-property, silently-fallback-to-string` |
| Type: | One of: `drop-message`, `drop-property`, `fallback-to-string`, `silently-drop-message`, `silently-drop-property`, `silently-fallback-to-string` |
|--------------|-----------|
| Default: | Use the global setting (which defaults to `drop-message`) |

Expand Down
3 changes: 1 addition & 2 deletions content/headless/chunk/option-persist-name.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
*Description:* If you receive the following error message during {{% param "product.abbrev" %}} startup, set the `persist-name()` option of the duplicate drivers:

```shell
Error checking the uniqueness of the persist names, please override it with persist-name option. Shutting down.
Error checking the uniqueness of the persist names, please override it with persist-name option. Shutting down.
```

This error happens if you use identical drivers in multiple sources, for example, if you configure two file sources to read from the same file. In this case, set the `persist-name()` of the drivers to a custom string, for example, `persist-name("example-persist-name1")`.

0 comments on commit 59b6038

Please sign in to comment.