Skip to content
Merged
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
2 changes: 2 additions & 0 deletions roles/activemq/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,8 @@ See _Role Variables_ below for additional TLS/SSL settings.
|`activemq_logger_config_template_path` | Optional subdirectory of any playbook template lookup directories for the logging facility configuration | `''` |
|`activemq_logger_config_keep_name` | Whether to keep the custom template filename or use the default | `False` |
|`activemq_logger_filepath` | Path for main logfile relative to instance directory | `/log/artemis.log` |
|`activemq_logger_cron_eval_on_startup`| Evaluate cron log rotation when starting service up | `true` |
|`activemq_logger_audit_cron_eval_on_startup`| Evaluate audit cron log rotation when starting service up | `true` |


#### Broker plugins
Expand Down
2 changes: 2 additions & 0 deletions roles/activemq/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,8 @@ activemq_logger_audit_rollover_files: 5
activemq_logger_filepath: /log/artemis.log
activemq_logger_max_file_size: 104857600 # 100MB in bytes
activemq_logger_audit_max_file_size: 52428800 # 50MB in bytes
activemq_logger_cron_eval_on_startup: true
activemq_logger_audit_cron_eval_on_startup: true

# Metrics
activemq_jmx_exporter_port: 18080
Expand Down
16 changes: 16 additions & 0 deletions roles/activemq/meta/argument_specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,14 @@ argument_specs:
description: "Number of rollover audit log files"
default: 5
type: 'int'
activemq_logger_cron_eval_on_startup:
description: "Evaluate cron log rotation when starting service up"
default: true
type: 'bool'
activemq_logger_audit_cron_eval_on_startup:
description: "Evaluate audit cron log rotation when starting service up"
default: true
type: 'bool'
activemq_password_codec:
description: >
Fully qualified class name and its parameters for the Decoder used to decode the masked password,
Expand Down Expand Up @@ -932,6 +940,14 @@ argument_specs:
default: "{{ activemq_port }}"
type: 'int'
description: "The port number to wait for when activemq_systemd_wait_for_port is true"
activemq_logger_cron_eval_on_startup:
description: "Evaluate cron log rotation when starting service up"
default: true
type: 'bool'
activemq_logger_audit_cron_eval_on_startup:
description: "Evaluate audit cron log rotation when starting service up"
default: true
type: 'bool'
downstream:
options:
amq_broker_version:
Expand Down
4 changes: 2 additions & 2 deletions roles/activemq/templates/amq_broker.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ ExecStartPost=/usr/bin/timeout {{ activemq_systemd_wait_for_timeout }} sh -c 'wh
{% endif %}
{% if activemq_systemd_wait_for_log %}
{% if activemq_ha_enabled %}
ExecStartPost=/usr/bin/timeout {{ activemq_systemd_wait_for_timeout }} sh -c 'tail -n 15 -f {{ activemq.instance_home }}/log/artemis.log | sed "/{{ activemq_systemd_wait_for_log_ha_string }}/ q" && /bin/sleep {{ activemq_systemd_wait_for_delay }}'
ExecStartPost=/usr/bin/timeout {{ activemq_systemd_wait_for_timeout }} sh -c 'tail -n 15 -F {{ activemq.instance_home }}/log/artemis.log | sed "/{{ activemq_systemd_wait_for_log_ha_string }}/ q" && /bin/sleep {{ activemq_systemd_wait_for_delay }}'
{% else %}
ExecStartPost=/usr/bin/timeout {{ activemq_systemd_wait_for_timeout }} sh -c 'tail -n 15 -f {{ activemq.instance_home }}/log/artemis.log | sed "/{{ activemq_systemd_wait_for_log_string }}/ q" && /bin/sleep {{ activemq_systemd_wait_for_delay }}'
ExecStartPost=/usr/bin/timeout {{ activemq_systemd_wait_for_timeout }} sh -c 'tail -n 15 -F {{ activemq.instance_home }}/log/artemis.log | sed "/{{ activemq_systemd_wait_for_log_string }}/ q" && /bin/sleep {{ activemq_systemd_wait_for_delay }}'
{% endif %}
{% endif %}

Expand Down
4 changes: 2 additions & 2 deletions roles/activemq/templates/log4j2.properties.j2
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ appender.log_file.layout.pattern = %d %-5level [%logger] %msg%n
appender.log_file.policies.type = Policies
appender.log_file.policies.cron.type = CronTriggeringPolicy
appender.log_file.policies.cron.schedule = 0 0 0 * * ?
appender.log_file.policies.cron.evaluateOnStartup = true
appender.log_file.policies.cron.evaluateOnStartup = {{ activemq_logger_cron_eval_on_startup }}
appender.log_file.policies.size.type = SizeBasedTriggeringPolicy
appender.log_file.policies.size.size = {{ activemq_logger_max_file_size }}
appender.log_file.strategy.type = DefaultRolloverStrategy
Expand All @@ -100,7 +100,7 @@ appender.audit_log_file.layout.pattern = %d [AUDIT](%t) %msg%n
appender.audit_log_file.policies.type = Policies
appender.audit_log_file.policies.cron.type = CronTriggeringPolicy
appender.audit_log_file.policies.cron.schedule = 0 0 0 * * ?
appender.audit_log_file.policies.cron.evaluateOnStartup = true
appender.audit_log_file.policies.cron.evaluateOnStartup = {{ activemq_logger_audit_cron_eval_on_startup }}
appender.audit_log_file.policies.size.type = SizeBasedTriggeringPolicy
appender.audit_log_file.policies.size.size = {{ activemq_logger_audit_max_file_size }}
appender.audit_log_file.strategy.type = DefaultRolloverStrategy
Expand Down