Commit c3244027 authored by Paul Graydon's avatar Paul Graydon

software/ors-amarisoft: Improve eNB xlog forwarding

See merge request !1632
parents 86d54d98 18057126
Pipeline #36561 failed with stage
in 0 seconds
......@@ -88,7 +88,7 @@ md5sum = 52da9fe3a569199e35ad89ae1a44c30e
[template-enb]
_update_hash_filename_ = instance-enb.jinja2.cfg
md5sum = 8b9301f26fc4ffbc7eda9c1ac8da1a46
md5sum = 140cce72eb04768abbe87ea4982f36bd
[template-ors-enb]
_update_hash_filename_ = instance-ors-enb.jinja2.cfg
......
......@@ -198,18 +198,18 @@
"default": 0
},
"xlog_fluentbit_forward_host": {
"title": "Address to Forward Xlog by Fluenbit",
"description": "Address of Remote Fluentd or Fluentbit Server to Forward Xlog",
"title": "Fluentbit Xlog forwarding address",
"description": "Address of remote Fluentd or Fluentbit server to which Fluentbit should forward Xlog data",
"type": "string"
},
"xlog_fluentbit_forward_port": {
"title": "Port to Forward Xlog by Fluentbit",
"description": "Optional Port of Remote Fluentd or Fluentbit Server to Forward Xlog",
"title": "Fluentbit Xlog forwarding port",
"description": "(Optional) Port of remote Fluentd or Fluentbit server to which Fluentbit should forward Xlog data",
"type": "string"
},
"xlog_fluentbit_forward_shared_key": {
"title": "Shared Key to Forward Xlog by Fluentbit",
"description": "Secret Key Shared with Remote Fluentd or Fluentbit Server for Authentication when Forwarding Xlog",
"title": "Fluentbit Xlog forwarding shared key",
"description": "Secret Key shared with remote Fluentd or Fluentbit server for authentication when forwarding Xlog data",
"type": "string"
}
}
......
......@@ -80,6 +80,7 @@ script = ${:etc}/run
service = ${:etc}/service
promise = ${:etc}/promise
log = ${:var}/log
xlog-fluentbit = ${:var}/xlog-fluentbit
{% if slapparameter_dict.get("enb_config_link", None) %}
[enb-config-dl]
......@@ -149,6 +150,26 @@ command-line = ${xamari-xlog-script:output}
hash-files = ${:command-line}
{% if slapparameter_dict.get('xlog_fluentbit_forward_host') %}
[xlog-fluentbit-tag]
recipe = slapos.recipe.build
computer = ${slap-connection:computer-id}
enb-id = {{ slapparameter_dict.get("enb_id", "") }}
gnb-id = {{ slapparameter_dict.get("gnb_id", "") }}
init =
import socket
options['hostname'] = socket.gethostname()
radio_id = ''
if options['enb-id']:
radio_id = 'e%s' % options['enb-id']
elif options['gnb-id']:
radio_id = 'g%s' % options['gnb-id']
options['radio-id'] = radio_id
xlog_fluentbit_tag = '_'.join(options[x] for x in ('hostname', 'computer', 'radio-id') if options[x])
options['xlog-fluentbit-tag'] = xlog_fluentbit_tag
[xlog-fluentbit-config]
recipe = slapos.recipe.template
output = ${directory:etc}/${:_buildout_section_name_}.cfg
......@@ -163,7 +184,9 @@ inline =
[INPUT]
name tail
path ${:logfile}
tag ${xlog-fluentbit-tag:xlog-fluentbit-tag}
Read_from_Head True
db ${directory:xlog-fluentbit}/tail-state
[OUTPUT]
name forward
match *
......@@ -240,6 +263,9 @@ ru-list = {{ dumps(rulib.iru_dict.keys() | sort) }}
cell-list = {{ dumps(rulib.icell_dict.keys() | sort) }}
peer-list = {{ dumps(ipeer_dict.keys() | sort) }}
peer-cell-list = {{ dumps(ipeercell_dict.keys() | sort) }}
{%- if slapparameter_dict.get('xlog_fluentbit_forward_host') %}
fluentbit-tag = ${xlog-fluentbit-tag:xlog-fluentbit-tag}
{%- endif %}
[monitor-instance-parameter]
......
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