diff --git a/ansible/roles/grafana/defaults/main.yml b/ansible/roles/grafana/defaults/main.yml index 030d583346bde4d4f796826a0aaf1d6babb17a40..77f24ca5e347ba3fa253f92d3fe515951f05b8de 100644 --- a/ansible/roles/grafana/defaults/main.yml +++ b/ansible/roles/grafana/defaults/main.yml @@ -65,9 +65,9 @@ grafana_data_sources: access: "proxy" url: "{{ opensearch_internal_endpoint }}" jsonData: - flavor: "elasticsearch" - database: "[flog-]YYYY.MM.DD" - version: "7.0.0" + flavor: "OpenSearch" + database: "{{ opensearch_log_index_prefix }}-*" + version: "2.11.1" timeField: "@timestamp" ########## diff --git a/releasenotes/notes/grafana-opensearch-datasource-configuration-04202c059f1abd05.yaml b/releasenotes/notes/grafana-opensearch-datasource-configuration-04202c059f1abd05.yaml new file mode 100644 index 0000000000000000000000000000000000000000..4b966b144aa5a9e21dab1e32c7eb1cb604067e10 --- /dev/null +++ b/releasenotes/notes/grafana-opensearch-datasource-configuration-04202c059f1abd05.yaml @@ -0,0 +1,11 @@ +--- +fixes: + - | + Updates the default Grafana OpenSearch datasource configuration to use + values for OpenSearch that work out of the box. Replaces the Elasticsearch + values that were previously being used. The new configuration can be + applied by deleting your datasource and reconfiguring Grafana through kolla + ansible. In order to prevent dashboards from breaking when the datasource + is deleted, one should use `datasource variables + <https://grafana.com/docs/grafana/latest/dashboards/variables/add-template-variables/#add-a-data-source-variable>`__ + in Grafana. See bug `2039500 <https://bugs.launchpad.net/kolla-ansible/+bug/2039500>`__.