Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opensearch grafana plugin config #555

Merged
merged 2 commits into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions ansible/roles/grafana/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,11 @@ 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"
logLevelField: "log_level"

##########
# Grafana
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
features:
- |
Configures the log level field for the Grafana OpenSearch datasource. This
allows for logs to be coloured based on log level. To apply this you need
to delete the datasource and reconfigure grafana.
Original file line number Diff line number Diff line change
@@ -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
technowhizz marked this conversation as resolved.
Show resolved Hide resolved
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>`__.