Commit ed44adf8 authored by Paul Graydon's avatar Paul Graydon

software/simpleran: Add eNB fluentbit monitoring promises

See merge request nexedi/slapos!1668
parent 90b60ef4
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
[template] [template]
filename = instance.cfg filename = instance.cfg
md5sum = f1b9ae02222c020c89d1a3fa75475826 md5sum = 770fccd0e4c5ad30e9637fd643a126c5
[template-ors] [template-ors]
filename = instance-ors.cfg filename = instance-ors.cfg
...@@ -60,7 +60,7 @@ md5sum = 52da9fe3a569199e35ad89ae1a44c30e ...@@ -60,7 +60,7 @@ md5sum = 52da9fe3a569199e35ad89ae1a44c30e
[template-enb] [template-enb]
_update_hash_filename_ = instance-enb.jinja2.cfg _update_hash_filename_ = instance-enb.jinja2.cfg
md5sum = 4b5d980bd452981978520358e79fef38 md5sum = a05c6ed1830d77a9faea67ac54cf9c2f
[template-ors-enb] [template-ors-enb]
_update_hash_filename_ = instance-ors-enb.jinja2.cfg _update_hash_filename_ = instance-ors-enb.jinja2.cfg
......
...@@ -29,6 +29,8 @@ parts = ...@@ -29,6 +29,8 @@ parts =
request-wendelin-telecom-shared request-wendelin-telecom-shared
{%- if slapparameter_dict.xlog_forwarding_enabled %} {%- if slapparameter_dict.xlog_forwarding_enabled %}
xlog-fluentbit-service xlog-fluentbit-service
check-xlog-fluentbit-forward-host.py
check-xlog-fluentbit-health.py
{%- endif %} {%- endif %}
check-baseband-latency.py check-baseband-latency.py
monitor-base monitor-base
...@@ -209,9 +211,18 @@ forward-host = {{ slapparameter_dict.get('xlog_fluentbit_forward_host', '') or ' ...@@ -209,9 +211,18 @@ forward-host = {{ slapparameter_dict.get('xlog_fluentbit_forward_host', '') or '
forward-port = {{ slapparameter_dict.xlog_fluentbit_forward_port }} forward-port = {{ slapparameter_dict.xlog_fluentbit_forward_port }}
forward-shared-key = {{ slapparameter_dict.get('xlog_fluentbit_forward_shared_key', '') }} forward-shared-key = {{ slapparameter_dict.get('xlog_fluentbit_forward_shared_key', '') }}
forward-self-hostname = {{ B(comp_id['comp-id']) }} forward-self-hostname = {{ B(comp_id['comp-id']) }}
monitoring-host = {{ my_ipv4 }}
monitoring-port = {{ slapparameter_dict.xlog_fluentbit_forward_port + 1 }}
inline = inline =
[SERVICE] [SERVICE]
flush 5 flush 5
HTTP_Server On
HTTP_Listen ${:monitoring-host}
HTTP_PORT ${:monitoring-port}
Health_Check On
HC_Errors_Count 0
HC_Retry_Failure_Count 0
HC_Period 60
[INPUT] [INPUT]
name tail name tail
path ${:logfile} path ${:logfile}
...@@ -228,6 +239,7 @@ inline = ...@@ -228,6 +239,7 @@ inline =
Shared_Key ${:forward-shared-key} Shared_Key ${:forward-shared-key}
{%- endif %} {%- endif %}
Self_Hostname ${:forward-self-hostname} Self_Hostname ${:forward-self-hostname}
Retry_Limit 50
tls on tls on
tls.verify off tls.verify off
...@@ -238,6 +250,17 @@ fluentbit-config = ${xlog-fluentbit-config:output} ...@@ -238,6 +250,17 @@ fluentbit-config = ${xlog-fluentbit-config:output}
command-line = ${:fluentbit} -c ${:fluentbit-config} command-line = ${:fluentbit} -c ${:fluentbit-config}
wrapper-path = ${directory:service}/${:_buildout_section_name_} wrapper-path = ${directory:service}/${:_buildout_section_name_}
hash-files = ${:fluentbit-config} hash-files = ${:fluentbit-config}
[check-xlog-fluentbit-forward-host.py]
<= macro.promise
promise = check_socket_listening
config-host = ${xlog-fluentbit-config:forward-host}
config-port = ${xlog-fluentbit-config:forward-port}
[check-xlog-fluentbit-health.py]
<= macro.promise
promise = check_url_available
config-url = http://${xlog-fluentbit-config:monitoring-host}:${xlog-fluentbit-config:monitoring-port}/api/v1/health
{%- endif %} {%- endif %}
[config-base] [config-base]
......
...@@ -40,6 +40,7 @@ context = ...@@ -40,6 +40,7 @@ context =
section slap_connection slap-connection section slap_connection slap-connection
key slapparameter_dict slap-configuration:configuration key slapparameter_dict slap-configuration:configuration
key lan_ipv4 lan-ip:ipv4 key lan_ipv4 lan-ip:ipv4
key my_ipv4 slap-configuration:ipv4-random
key my_ipv6 slap-configuration:ipv6-random key my_ipv6 slap-configuration:ipv6-random
$${:extra-context} $${:extra-context}
import-list = import-list =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment