Skip to content
frikilax edited this page Apr 28, 2020 · 2 revisions

Test

Description

This filter is used for test purposes. It is not compiled by default.

If redis_socket_path and alert_redis_list_name (and/or alert_redis_channel_name) are given in configuration, this filter will respond to bodies containing trigger_redis_list (resp. trigger_redis_channel) and will add the message "trigger_redis_list" (resp. "trigger_redis_channel") in the parametrized Redis list (resp. channel).

Filter Code

0x74657374

Dependencies

Darwin configuration

Example of darwin configuration for this filter :

{
    "filter_1": {
        "exec_path": "/path/to/darwin/build/darwin_filter",
        "config_file":"/path/to/filter.conf",
        "output": "RAW",
        "next_filter": "",
        "nb_thread": 1,
        "log_level": "DEBUG",
        "cache_size": 0
    }
}

Config file

  • redis_socket_path (optional) : the Redis server to use for alerts and triggers
  • alert_redis_list_name (optional) : the key under which the filter will store the raised alerts and/or triggers in Redis
  • alert_redis_channel_name (optional) : the Redis channel in which the raised alerts and/or triggers will be published
  • log_file_path (optional) : the path in which the filter will write raised alerts

Example :

{
    "redis_socket_path": "/var/sockets/redis/redis.sock",
    "alert_redis_list_name": "darwin_alerts",
    "alert_redis_channel_name": "darwin.alerts",
    "log_file_path": "/var/log/darwin/alerts.log"
}

Body

[["alert_1"], ["alert_2"]]
Clone this wiki locally