Skip to content

Commit fc3abe4

Browse files
author
Sebastian Wagner
committed
DOC: changelog entry and bot doc enh for PR#1967
1 parent 9f7ceea commit fc3abe4

File tree

2 files changed

+16
-12
lines changed

2 files changed

+16
-12
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ CHANGELOG
2626
#### Parsers
2727

2828
#### Experts
29+
- `intelmq.bots.experts.truncate_by_delimiter.expert`: Cut string if its length is higher than a maximum length (PR#1967 by Marius Karotkis).
2930

3031
#### Outputs
3132
- `intelmq.bots.outputs.mcafee.output_esm_ip`: Fix access to parameters, the bot wrongly used `self.parameters` (by Sebastian Wagner).

docs/user/bots.rst

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3266,33 +3266,36 @@ For both fields *ip* and *domain*, the *destinations* objects are iterated and i
32663266
The IntelMQ fields used by this bot may change in the next IntelMQ release, as soon as better suited fields are available.
32673267
32683268
3269-
.. _intelmq.bots.experts.url2fqdn.expert:
3269+
.. _intelmq.bots.experts.truncate_by_delimiter.expert:
32703270
32713271
Truncate By Delimiter
3272-
^^^^^^^^^
3272+
^^^^^^^^^^^^^^^^^^^^^
32733273
32743274
**Information**
32753275
32763276
* `name:` `intelmq.bots.experts.truncate_by_delimiter.expert`
32773277
* `lookup:` no
32783278
* `public:` yes
32793279
* `cache (redis db):` none
3280-
* `description:` Cut string if length is bigger than max
3280+
* `description:` Cut string if length is bigger than maximum length
32813281
32823282
**Configuration Parameters**
32833283
3284-
* `delimiter`: example . or ;
3285-
* `max_length`: max string length
3286-
* `field`: string field
3284+
* `delimiter`: The delimiter to be used for truncating, for example ``.`` or ``;``
3285+
* `max_length`: The maximum string length.
3286+
* `field`: The field to be truncated, e.g. ``source.fqdn``
32873287
3288-
Example: Cut through a long domain with a dot. Truncated until the domain not exceeds the maximum length.
3288+
The given field is truncated step-by-step using the delimiter from the beginning, until the field is shorter than `max_length`.
32893289
3290-
input domain = www.subdomain.web.secondsubomain.test.domain.com
3291-
delimiter = '.'
3292-
max_length = 20
3293-
results = test.domain.com
3290+
Example: Cut through a long domain with a dot. The string is truncated until the domain does not exceed the configured maximum length.
32943291
3295-
.. _intelmq.bots.experts.truncate_by_delimiter.expert:
3292+
- input domain (e.g. ``source.fqdn``): ``www.subdomain.web.secondsubomain.test.domain.com``
3293+
- delimiter: ``.``
3294+
- ``max_length``: 20
3295+
- Resulting value ``test.domain.com`` (length: 15 characters)
3296+
3297+
3298+
.. _intelmq.bots.experts.url2fqdn.expert:
32963299
32973300
Url2FQDN
32983301
^^^^^^^^

0 commit comments

Comments
 (0)