Dynamically generate tags for oslo_log fluentd formatter
This proposes changing the tags added to the openstack logs gathered by the fluentd handler from `openstack.<service>` to `Namespace.Release` to account for multiple instances of openstack services being deployed into different namespaces. This allows for fine tuning the search queries in elasticsearch/kibana to target specific service deployments in specific namespaces Change-Id: Ia12dceb4089e107e15d8e30c92c91f350dc31318
This commit is contained in:
parent
c9d2f67168
commit
2f878e6cf7
@ -75,7 +75,7 @@ limitations under the License.
|
||||
{{- if and (empty .Values.conf.logging.handler_fluent) (has "fluent" .Values.conf.logging.handlers.keys) -}}
|
||||
{{- $fluentd_host := tuple "fluentd" "internal" $envAll | include "helm-toolkit.endpoints.hostname_namespaced_endpoint_lookup" }}
|
||||
{{- $fluentd_port := tuple "fluentd" "internal" "service" $envAll | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||
{{- $fluent_args := printf "('openstack.barbican', '%s', %s)" $fluentd_host $fluentd_port }}
|
||||
{{- $fluent_args := printf "('%s.%s', '%s', %s)" .Release.Namespace .Release.Name $fluentd_host $fluentd_port }}
|
||||
{{- $handler_fluent := dict "class" "fluent.handler.FluentHandler" "formatter" "fluent" "args" $fluent_args -}}
|
||||
{{- $_ := set .Values.conf.logging "handler_fluent" $handler_fluent -}}
|
||||
{{- end -}}
|
||||
|
@ -97,7 +97,7 @@ limitations under the License.
|
||||
{{- if and (empty .Values.conf.logging.handler_fluent) (has "fluent" .Values.conf.logging.handlers.keys) -}}
|
||||
{{- $fluentd_host := tuple "fluentd" "internal" $envAll | include "helm-toolkit.endpoints.hostname_namespaced_endpoint_lookup" }}
|
||||
{{- $fluentd_port := tuple "fluentd" "internal" "service" $envAll | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||
{{- $fluent_args := printf "('openstack.cinder', '%s', %s)" $fluentd_host $fluentd_port }}
|
||||
{{- $fluent_args := printf "('%s.%s', '%s', %s)" .Release.Namespace .Release.Name $fluentd_host $fluentd_port }}
|
||||
{{- $handler_fluent := dict "class" "fluent.handler.FluentHandler" "formatter" "fluent" "args" $fluent_args -}}
|
||||
{{- $_ := set .Values.conf.logging "handler_fluent" $handler_fluent -}}
|
||||
{{- end -}}
|
||||
|
@ -66,7 +66,7 @@ limitations under the License.
|
||||
{{- if and (empty .Values.conf.logging.handler_fluent) (has "fluent" .Values.conf.logging.handlers.keys) -}}
|
||||
{{- $fluentd_host := tuple "fluentd" "internal" $envAll | include "helm-toolkit.endpoints.hostname_namespaced_endpoint_lookup" }}
|
||||
{{- $fluentd_port := tuple "fluentd" "internal" "service" $envAll | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||
{{- $fluent_args := printf "('openstack.congress', '%s', %s)" $fluentd_host $fluentd_port }}
|
||||
{{- $fluent_args := printf "('%s.%s', '%s', %s)" .Release.Namespace .Release.Name $fluentd_host $fluentd_port }}
|
||||
{{- $handler_fluent := dict "class" "fluent.handler.FluentHandler" "formatter" "fluent" "args" $fluent_args -}}
|
||||
{{- $_ := set .Values.conf.logging "handler_fluent" $handler_fluent -}}
|
||||
{{- end -}}
|
||||
|
@ -147,7 +147,7 @@ limitations under the License.
|
||||
{{- if and (empty .Values.conf.logging.handler_fluent) (has "fluent" .Values.conf.logging.handlers.keys) -}}
|
||||
{{- $fluentd_host := tuple "fluentd" "internal" $envAll | include "helm-toolkit.endpoints.hostname_namespaced_endpoint_lookup" }}
|
||||
{{- $fluentd_port := tuple "fluentd" "internal" "service" $envAll | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||
{{- $fluent_args := printf "('openstack.glance', '%s', %s)" $fluentd_host $fluentd_port }}
|
||||
{{- $fluent_args := printf "('%s.%s', '%s', %s)" .Release.Namespace .Release.Name $fluentd_host $fluentd_port }}
|
||||
{{- $handler_fluent := dict "class" "fluent.handler.FluentHandler" "formatter" "fluent" "args" $fluent_args -}}
|
||||
{{- $_ := set .Values.conf.logging "handler_fluent" $handler_fluent -}}
|
||||
{{- end -}}
|
||||
|
@ -123,7 +123,7 @@ limitations under the License.
|
||||
{{- if and (empty .Values.conf.logging.handler_fluent) (has "fluent" .Values.conf.logging.handlers.keys) -}}
|
||||
{{- $fluentd_host := tuple "fluentd" "internal" $envAll | include "helm-toolkit.endpoints.hostname_namespaced_endpoint_lookup" }}
|
||||
{{- $fluentd_port := tuple "fluentd" "internal" "service" $envAll | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||
{{- $fluent_args := printf "('openstack.heat', '%s', %s)" $fluentd_host $fluentd_port }}
|
||||
{{- $fluent_args := printf "('%s.%s', '%s', %s)" .Release.Namespace .Release.Name $fluentd_host $fluentd_port }}
|
||||
{{- $handler_fluent := dict "class" "fluent.handler.FluentHandler" "formatter" "fluent" "args" $fluent_args -}}
|
||||
{{- $_ := set .Values.conf.logging "handler_fluent" $handler_fluent -}}
|
||||
{{- end -}}
|
||||
|
@ -187,7 +187,7 @@ limitations under the License.
|
||||
{{- if and (empty .Values.conf.logging.handler_fluent) (has "fluent" .Values.conf.logging.handlers.keys) -}}
|
||||
{{- $fluentd_host := tuple "fluentd" "internal" $envAll | include "helm-toolkit.endpoints.hostname_namespaced_endpoint_lookup" }}
|
||||
{{- $fluentd_port := tuple "fluentd" "internal" "service" $envAll | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||
{{- $fluent_args := printf "('openstack.ironic', '%s', %s)" $fluentd_host $fluentd_port }}
|
||||
{{- $fluent_args := printf "('%s.%s', '%s', %s)" .Release.Namespace .Release.Name $fluentd_host $fluentd_port }}
|
||||
{{- $handler_fluent := dict "class" "fluent.handler.FluentHandler" "formatter" "fluent" "args" $fluent_args -}}
|
||||
{{- $_ := set .Values.conf.logging "handler_fluent" $handler_fluent -}}
|
||||
{{- end -}}
|
||||
|
@ -32,7 +32,7 @@ limitations under the License.
|
||||
{{- if and (empty .Values.conf.logging.handler_fluent) (has "fluent" .Values.conf.logging.handlers.keys) -}}
|
||||
{{- $fluentd_host := tuple "fluentd" "internal" $envAll | include "helm-toolkit.endpoints.hostname_namespaced_endpoint_lookup" }}
|
||||
{{- $fluentd_port := tuple "fluentd" "internal" "service" $envAll | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||
{{- $fluent_args := printf "('openstack.keystone', '%s', %s)" $fluentd_host $fluentd_port }}
|
||||
{{- $fluent_args := printf "('%s.%s', '%s', %s)" .Release.Namespace .Release.Name $fluentd_host $fluentd_port }}
|
||||
{{- $handler_fluent := dict "class" "fluent.handler.FluentHandler" "formatter" "fluent" "args" $fluent_args -}}
|
||||
{{- $_ := set .Values.conf.logging "handler_fluent" $handler_fluent -}}
|
||||
{{- end -}}
|
||||
|
@ -76,7 +76,7 @@ limitations under the License.
|
||||
{{- if and (empty .Values.conf.logging.handler_fluent) (has "fluent" .Values.conf.logging.handlers.keys) -}}
|
||||
{{- $fluentd_host := tuple "fluentd" "internal" $envAll | include "helm-toolkit.endpoints.hostname_namespaced_endpoint_lookup" }}
|
||||
{{- $fluentd_port := tuple "fluentd" "internal" "service" $envAll | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||
{{- $fluent_args := printf "('openstack.magnum', '%s', %s)" $fluentd_host $fluentd_port }}
|
||||
{{- $fluent_args := printf "('%s.%s', '%s', %s)" .Release.Namespace .Release.Name $fluentd_host $fluentd_port }}
|
||||
{{- $handler_fluent := dict "class" "fluent.handler.FluentHandler" "formatter" "fluent" "args" $fluent_args -}}
|
||||
{{- $_ := set .Values.conf.logging "handler_fluent" $handler_fluent -}}
|
||||
{{- end -}}
|
||||
|
@ -66,7 +66,7 @@ limitations under the License.
|
||||
{{- if and (empty .Values.conf.logging.handler_fluent) (has "fluent" .Values.conf.logging.handlers.keys) -}}
|
||||
{{- $fluentd_host := tuple "fluentd" "internal" $envAll | include "helm-toolkit.endpoints.hostname_namespaced_endpoint_lookup" }}
|
||||
{{- $fluentd_port := tuple "fluentd" "internal" "service" $envAll | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||
{{- $fluent_args := printf "('openstack.mistral', '%s', %s)" $fluentd_host $fluentd_port }}
|
||||
{{- $fluent_args := printf "('%s.%s', '%s', %s)" .Release.Namespace .Release.Name $fluentd_host $fluentd_port }}
|
||||
{{- $handler_fluent := dict "class" "fluent.handler.FluentHandler" "formatter" "fluent" "args" $fluent_args -}}
|
||||
{{- $_ := set .Values.conf.logging "handler_fluent" $handler_fluent -}}
|
||||
{{- end -}}
|
||||
|
@ -160,7 +160,7 @@ just set it along with nova_metadata_host.
|
||||
{{- if and (empty .Values.conf.logging.handler_fluent) (has "fluent" .Values.conf.logging.handlers.keys) -}}
|
||||
{{- $fluentd_host := tuple "fluentd" "internal" $envAll | include "helm-toolkit.endpoints.hostname_namespaced_endpoint_lookup" }}
|
||||
{{- $fluentd_port := tuple "fluentd" "internal" "service" $envAll | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||
{{- $fluent_args := printf "('openstack.neutron', '%s', %s)" $fluentd_host $fluentd_port }}
|
||||
{{- $fluent_args := printf "('%s.%s', '%s', %s)" .Release.Namespace .Release.Name $fluentd_host $fluentd_port }}
|
||||
{{- $handler_fluent := dict "class" "fluent.handler.FluentHandler" "formatter" "fluent" "args" $fluent_args -}}
|
||||
{{- $_ := set .Values.conf.logging "handler_fluent" $handler_fluent -}}
|
||||
{{- end -}}
|
||||
|
@ -203,7 +203,7 @@ limitations under the License.
|
||||
{{- if and (empty .Values.conf.logging.handler_fluent) (has "fluent" .Values.conf.logging.handlers.keys) -}}
|
||||
{{- $fluentd_host := tuple "fluentd" "internal" $envAll | include "helm-toolkit.endpoints.hostname_namespaced_endpoint_lookup" }}
|
||||
{{- $fluentd_port := tuple "fluentd" "internal" "service" $envAll | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||
{{- $fluent_args := printf "('openstack.nova', '%s', %s)" $fluentd_host $fluentd_port }}
|
||||
{{- $fluent_args := printf "('%s.%s', '%s', %s)" .Release.Namespace .Release.Name $fluentd_host $fluentd_port }}
|
||||
{{- $handler_fluent := dict "class" "fluent.handler.FluentHandler" "formatter" "fluent" "args" $fluent_args -}}
|
||||
{{- $_ := set .Values.conf.logging "handler_fluent" $handler_fluent -}}
|
||||
{{- end -}}
|
||||
|
@ -86,7 +86,7 @@ limitations under the License.
|
||||
{{- if and (empty .Values.conf.logging.handler_fluent) (has "fluent" .Values.conf.logging.handlers.keys) -}}
|
||||
{{- $fluentd_host := tuple "fluentd" "internal" $envAll | include "helm-toolkit.endpoints.hostname_namespaced_endpoint_lookup" }}
|
||||
{{- $fluentd_port := tuple "fluentd" "internal" "service" $envAll | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||
{{- $fluent_args := printf "('openstack.senlin', '%s', %s)" $fluentd_host $fluentd_port }}
|
||||
{{- $fluent_args := printf "('%s.%s', '%s', %s)" .Release.Namespace .Release.Name $fluentd_host $fluentd_port }}
|
||||
{{- $handler_fluent := dict "class" "fluent.handler.FluentHandler" "formatter" "fluent" "args" $fluent_args -}}
|
||||
{{- $_ := set .Values.conf.logging "handler_fluent" $handler_fluent -}}
|
||||
{{- end -}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user