If necessary, you can generate your own example events to test your normalizer. Such testing makes it easier to write regular expressions and lets you see which values end up in the KUMA event fields.
Keep in mind the following special considerations:
To test the normalizer, you need to add an example event to the Event examples field in the selected normalizer and start generating events by using the relevant command. As a result of running the command, KUMA takes the example event from the Example event field and sends events to the normalizer with the specified interval. If necessary, you can specify multiple examples to get events for multiple examples.
To test the normalizer:
sudo systemctl stop kuma-collector-<collector service ID copied from the KUMA web interface>.service
{"name": "test_events", "address": "10.12.12.31"}
. You can specify multiple examples if you want to receive events for multiple examples in the same normalizer. Events are generated for each example.sudo /opt/kaspersky/kuma/kuma collector --core <FQDN of the KUMA Core server>:<port used by the KUMA Core for internal communication (port 7210 is used by default)> --generator.interval <interval in seconds for generating and sending events> --id <collector service ID copied from the KUMA web interface> --api.port <number of a free, unused API port>
If the value of the event generation and sending interval is not specified or it is set to zero, events are not generated.
sudo /opt/kaspersky/kuma/kuma collector --generator.interval <value of the event generation and sending interval in seconds> --id <collector service ID copied from the KUMA web interface> --api.port <number of a free, unused API port>
If the value of the event generation and sending interval is not specified or it is set to zero, events are not generated.
As a result, KUMA generates events and sends them to the normalizer, observing the specified interval.
You can verify that events have been created and satisfy your expectations in the Events section. For additional information about the check, see the /etc/systemd/system/multi-user.target.wants/kuma-collector-<collector service ID copied from the KUMA web interface>.service file.
If the result does not meet expectations, modify the example event:
If the result meets expectations:
sudo systemctl start kuma-collector-<collector service ID copied from the KUMA web interface>.service
sudo /opt/kaspersky/kuma/kuma collector --core <FQDN of the KUMA Core server>:<port used by KUMA Core server for internal communication (port 7210 by default)> --id <collector service ID copied from the KUMA web interface> --api.port <port used for communication with the installed component> --install