mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2026-02-22 06:55:27 +01:00
27 lines
811 B
Plaintext
27 lines
811 B
Plaintext
{% set CHECKS = salt['pillar.get']('healthcheck:checks', {} %}
|
|
{% set ENABLED = salt['pillar.get']('healthcheck:enabled', False %}
|
|
{% set SCHEDULE = salt['pillar.get']('healthcheck:schedule', 30 %}
|
|
|
|
{% if CHECKS and ENABLED %}
|
|
{% set STATUS = ['present','enabled'] %}
|
|
{% else %}
|
|
{% set STATUS = ['absent','disabled'] %}
|
|
nohealthchecks:
|
|
test.configurable_test_state:
|
|
- name: nohealthchecks
|
|
- changes: True
|
|
- result: False
|
|
- comment: No checks are enabled for the healthcheck schedule
|
|
- warnings: Add checks to the healcheck:checks pillar
|
|
{% endif %}
|
|
|
|
healthcheck_schedule_{{STATUS[0]}}:
|
|
schedule.{{STATUS[0]}}:
|
|
- name: healthcheck
|
|
- function: healthcheck.run
|
|
- minutes: {{ SCHEDULE }}
|
|
|
|
healthcheck_schedule_{{STATUS[1]}}:
|
|
schedule.{{STATUS[1]}}:
|
|
- name: healthcheck
|