From 260baaf0191d90f83fe2286eb681b615ea7c486c Mon Sep 17 00:00:00 2001 From: Guido Grazioli Date: Mon, 2 Sep 2024 16:59:04 +0200 Subject: [PATCH 1/2] Add critical analyzer configuration --- roles/activemq/README.md | 10 ++++++++++ roles/activemq/defaults/main.yml | 5 +++++ roles/activemq/meta/argument_specs.yml | 16 ++++++++++++++++ roles/activemq/vars/main.yml | 4 ++++ 4 files changed, 35 insertions(+) diff --git a/roles/activemq/README.md b/roles/activemq/README.md index 755e29a6..1ba204ff 100644 --- a/roles/activemq/README.md +++ b/roles/activemq/README.md @@ -145,6 +145,16 @@ Role Defaults |`activemq_db_jdbc_driver_class`| The fully qualified class name of the desired database Driver | `org.apache.derby.jdbc.EmbeddedDriver` | +#### Critical Analyzer + +| Variable | Description | Default | +|:---------|:------------|:--------| +|`activemq_critical_analyzer`| Should the broker detect dead locks and other issues | `true` | +|`activemq_critical_analyzer_timeout`| Timeout used to do the critical analysis (milliseconds) | `120000` | +|`activemq_critical_analyzer_check_period`| Time used to check the response times (milliseconds) | `60000` | +|`activemq_critical_analyzer_policy`| Should the server log, be halted or shutdown upon failures (one of LOG, HALT, SHUTDOWN) | `HALT` | + + #### Acceptors / connectors | Variable | Description | Default | diff --git a/roles/activemq/defaults/main.yml b/roles/activemq/defaults/main.yml index 822b4fcc..325737df 100644 --- a/roles/activemq/defaults/main.yml +++ b/roles/activemq/defaults/main.yml @@ -140,6 +140,11 @@ activemq_db_bindings_table: BINDINGS_TABLE activemq_db_message_table: MESSAGE_TABLE activemq_db_large_message_table: LARGE_MESSAGES_TABLE activemq_db_jdbc_driver_class: org.apache.derby.jdbc.EmbeddedDriver +# critical analyzer +activemq_critical_analyzer: true +activemq_critical_analyzer_timeout: 120000 +activemq_critical_analyzer_check_period: 60000 +activemq_critical_analyzer_policy: LOG ### Enable TLS activemq_tls_enabled: false diff --git a/roles/activemq/meta/argument_specs.yml b/roles/activemq/meta/argument_specs.yml index 808bbf19..10e78a12 100644 --- a/roles/activemq/meta/argument_specs.yml +++ b/roles/activemq/meta/argument_specs.yml @@ -767,6 +767,22 @@ argument_specs: description: "The max percentage of data we should use from disks. The System will block while the disk is full." default: 96 type: 'int' + activemq_critical_analyzer: + description: "Should the broker detect dead locks and other issues" + default: true + type: 'bool' + activemq_critical_analyzer_timeout: + description: "Timeout used to do the critical analysis (milliseconds)" + default: 120000 + type: 'int' + activemq_critical_analyzer_check_period: + description: "Time used to check the response times (milliseconds)" + default: 60000 + type: 'int' + activemq_critical_analyzer_policy: + description: "Should the server log, be halted or shutdown upon failures (one of LOG, HALT, SHUTDOWN)" + default: 'HALT' + type: 'str' systemd: options: activemq_version: diff --git a/roles/activemq/vars/main.yml b/roles/activemq/vars/main.yml index 414bbbda..f6851d03 100644 --- a/roles/activemq/vars/main.yml +++ b/roles/activemq/vars/main.yml @@ -56,3 +56,7 @@ activemq_core_configuration_list: - message_counter_enabled - message_counter_sample_period - message_counter_max_day_history + - critical_analyzer + - critical_analyzer_timeout + - critical_analyzer_check_period + - critical_analyzer_policy From 0fc264994da78afbae0017686aa17d50b0490e63 Mon Sep 17 00:00:00 2001 From: Guido Grazioli Date: Mon, 2 Sep 2024 17:00:53 +0200 Subject: [PATCH 2/2] fix default value --- roles/activemq/meta/argument_specs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/activemq/meta/argument_specs.yml b/roles/activemq/meta/argument_specs.yml index 10e78a12..a9be5d07 100644 --- a/roles/activemq/meta/argument_specs.yml +++ b/roles/activemq/meta/argument_specs.yml @@ -781,7 +781,7 @@ argument_specs: type: 'int' activemq_critical_analyzer_policy: description: "Should the server log, be halted or shutdown upon failures (one of LOG, HALT, SHUTDOWN)" - default: 'HALT' + default: 'LOG' type: 'str' systemd: options: