Skip to content
Open
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
3 changes: 3 additions & 0 deletions roles/logstash/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ Run only parts of the role with `--tags`:
| `logstash_forwarder_queue_type` | `str` | `"memory"` | `memory`, `persisted` | Queue type for the default Elasticsearch forwarder pipeline. Use "persisted" for an on-disk persistent queue. |
| `logstash_forwarder_queue_max_bytes` | `str` | `"1gb"` | — | Maximum queue size for the default Elasticsearch forwarder pipeline. |
| `logstash_redis_password` | `str` | N/A | — | Password used when the simple inputs/outputs connect to Redis. Unset by default. |
| `logstash_redis_input_host` | `str` | `"localhost"` | — | Redis host that simple pipeline inputs (and the default forwarder input) read from. |
| `logstash_redis_output_host` | `str` | `"localhost"` | — | Redis host that simple pipeline outputs (and the default input pipeline) write to. |
| `logstash_redis_tls` | `bool` | `false` | — | Enable TLS on the simple Redis inputs/outputs (`ssl`/`ssl_enabled`). |
| `logstash_elasticsearch` | `list` of `str` | N/A | — | Elasticsearch hosts for the default output. Defaults to the nodes from the elasticsearch group, or localhost when used standalone. |
| `logstash_validate_after_inactivity` | `str` | `"300"` | — | Seconds Logstash waits before validating a previously idle connection to Elasticsearch. |
| `logstash_sniffing` | `bool` | `false` | — | Enable sniffing for additional Elasticsearch nodes. |
Expand Down
6 changes: 6 additions & 0 deletions roles/logstash/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ logstash_input_queue_type: memory
logstash_input_queue_max_bytes: 1gb
logstash_forwarder_queue_type: memory
logstash_forwarder_queue_max_bytes: 1gb

# redis connection for simple pipeline inputs/outputs
logstash_redis_input_host: localhost
logstash_redis_output_host: localhost
logstash_redis_tls: false

logstash_sniffing: false

# logstash role / user
Expand Down
15 changes: 15 additions & 0 deletions roles/logstash/meta/argument_specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,21 @@ argument_specs:
type: str
description: Password used when the simple inputs/outputs connect to Redis. Unset by default.

logstash_redis_input_host:
type: str
default: localhost
description: Redis host that simple pipeline inputs (and the default forwarder input) read from.

logstash_redis_output_host:
type: str
default: localhost
description: Redis host that simple pipeline outputs (and the default input pipeline) write to.

logstash_redis_tls:
type: bool
default: false
description: Enable TLS on the simple Redis inputs/outputs (`ssl`/`ssl_enabled`).

# ----- Elasticsearch connection / output -----
logstash_elasticsearch:
type: list
Expand Down
5 changes: 4 additions & 1 deletion roles/logstash/templates/redis-input.conf.j2
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
input {
redis {
host => "localhost"
host => "{{ logstash_redis_input_host }}"
{% if logstash_redis_tls | bool %}
ssl => true
{% endif %}
data_type => "list"
key => "forwarder"
{% if logstash_redis_password is defined %}
Expand Down
5 changes: 4 additions & 1 deletion roles/logstash/templates/redis-output.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ filter {
{% endif %}
output {
redis {
host => "localhost"
host => "{{ logstash_redis_output_host }}"
{% if logstash_redis_tls | bool %}
ssl_enabled => true
{% endif %}
data_type => "list"
key => "input"
{% if logstash_beats_input_congestion is defined %} congestion_threshold => {{ logstash_beats_input_congestion }}{% endif %}
Expand Down
5 changes: 4 additions & 1 deletion roles/logstash/templates/simple-input.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ input {

# {{ input.name }} input
redis {
host => "localhost"
host => "{{ logstash_redis_input_host }}"
{% if logstash_redis_tls | bool %}
ssl => true
{% endif %}
data_type => "list"
key => "{{ input.key }}"
{% if logstash_redis_password is defined %}
Expand Down
5 changes: 4 additions & 1 deletion roles/logstash/templates/simple-output.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ output {
{% if not loop.first and pipelinename.exclusive | bool %}else {% endif %}{% if (not loop.last and pipelinename.exclusive | bool) or not pipelinename.exclusive %}if {% endif %}{% if output.condition is defined %}{{ output.condition }} {% endif %}{
{% endif %}
redis {
host => "localhost"
host => "{{ logstash_redis_output_host }}"
{% if logstash_redis_tls | bool %}
ssl_enabled => true
{% endif %}
data_type => "list"
key => "{{ output.key }}"
{% if logstash_redis_password is defined %}
Expand Down
Loading