Skip to content
This repository has been archived by the owner on Nov 15, 2024. It is now read-only.

Commit

Permalink
Adding config vars for Humio caching
Browse files Browse the repository at this point in the history
  • Loading branch information
mwl committed Dec 2, 2019
1 parent 1326f4a commit 73eeed0
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
4 changes: 4 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ humio_working_dir: "{{ humio_data_path }}/{{ humio_host_id }}-%i"

humio_data_percentage: 80
humio_data_secondary_path: ~

humio_cache_percentage: 90
humio_cache_path: ~

humio_permissions: ~
humio_processes: "{{ ansible_local.numanodes | length }}"

Expand Down
11 changes: 11 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,17 @@
notify: Restart Humio
when: humio_data_secondary_path is defined

- name: Create Humio cache directories
file:
path: "{{ humio_cache_path }}/{{ humio_host_id }}-{{ item }}"
state: directory
owner: "humio"
group: "humio"
mode: 0755
loop: "{{ range(0, humio_processes|int)|list }}"
notify: Restart Humio
when: humio_cache_path is defined

- name: Download Humio jar
tags: humio-update
check_mode: no
Expand Down
4 changes: 4 additions & 0 deletions templates/server.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ DIRECTORY={{ humio_data_paths[item|string] }}/{{ humio_host_id }}-{{ item }}/dat
PRIMARY_STORAGE_PERCENTAGE={{ humio_data_percentage }}
SECONDARY_DATA_DIRECTORY={{ humio_data_secondary_path }}/{{ humio_host_id }}-{{ item }}/data
{%- endif %}
{%- if humio_cache_path %}
CACHE_STORAGE_DIRECTORY={{ humio_cache_path }}
CACHE_STORAGE_PERCENTAGE={{ humio_cache_percentage }}
{%- endif %}
HUMIO_AUDITLOG_DIR=/var/log/humio/{{ item }}
HUMIO_DEBUGLOG_DIR=/var/log/humio/{{ item }}
HUMIO_PORT={{ 8080 + item }}
Expand Down

0 comments on commit 73eeed0

Please sign in to comment.