Skip to content

Commit

Permalink
Release Coherence Operator snapshot docs 3.3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
thegridman committed Feb 13, 2024
1 parent 08e9811 commit bdae2d0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/snapshot/main/search-index.json
Original file line number Diff line number Diff line change
Expand Up @@ -1102,7 +1102,7 @@
},
{
"location": "/docs/metrics/030_importing",
"text": " The dashboard .json files can be manually imported into Grafana using the Grafana UI following the instructions in the Grafana Import Dashboard documentation. ",
"text": " The dashboard .json files can be manually imported into Grafana using the Grafana UI following the instructions in the Grafana Import Dashboards documentation. ",
"title": "Manually Import Grafana Dashboards"
},
{
Expand All @@ -1112,7 +1112,7 @@
},
{
"location": "/docs/metrics/030_importing",
"text": " This section shows you how to import the Grafana dashboards into your own Grafana instance. Once you have obtained the dashboards using one of the methods above, the Grafana dashboard .json files will be in the dashboards/grafana/ subdirectory Important By default, the Coherence dashboards require a datasource in Grafana named prometheus (which is case-sensitive). This datasource usually exists in an out-of-the-box Prometheus Operator installation. If your Grafana environment does not have this datasource, then there are two choices. Create a Prometheus datasource named prometheus as described in the Grafana Add a Datasource documentation and make this the default datasource. If you have an existing Prometheus datasource with a different name then you will need to edit the dashboard json files to change all occurrences of \"datasource\": \"prometheus\" to have the name of your Prometheus datasource. For example, running the script below in the directory containing the datasource .json files to be imported will change the datasource name from prometheus to Coherence-Prometheus . for file in *.json do sed -i '' -e 's/\"datasource\": \"prometheus\"/\"datasource\": \"Coherence-Prometheus\"/g' $file; done The above sed command works for MacOS, but if you are running on Linux you need to remove the '' after the -i . Manually Import Grafana Dashboards The dashboard .json files can be manually imported into Grafana using the Grafana UI following the instructions in the Grafana Import Dashboard documentation. Bulk Import Grafana Dashboards At the time of writing, for whatever reason, Grafana does not provide a simple way to bulk import a set of dashboard files. There are many examples and scripts on available in the community that show how to do this. The Coherence Operator source contains a script that can be used for this purpose grafana-import.sh The grafana-import.sh script requires the JQ utility to parse json. The commands below will download and run the shell script to import the dashboards. Change the &lt;GRAFANA-USER&gt; and &lt;GRAFANA_PWD&gt; to the Grafana credentials for your environment. For example if using the default Prometheus Operator installation they are as specified on the Access Grafana section of the Quick Start page. We do not document the credentials here as the default values have been known to change between Prometheus Operator and Grafana versions. <markup lang=\"bash\" >curl -Lo grafana-import.sh https://github.com/oracle/coherence-operator/raw/main/hack/grafana-import.sh chmod +x grafana-import.sh <markup lang=\"bash\" >./grafana-import.sh -u &lt;GRAFANA-USER&gt; -w &lt;GRAFANA_PWD&gt; -d dashboards/grafana -t localhost:3000 Note: the command above assumes you can reach Grafana on localhost:3000 (for example, if you have a kubectl port forward process running to forward localhost:3000 to the Grafana service in Kubernetes). You may need to change the host and port to match however you are exposing your Grafana instance. Coherence clusters can now be created as described in the Publish Metrics page, and metrics will eventually appear in Prometheus and Grafana. It can sometimes take a minute or so for Prometheus to start scraping metrics and for them to appear in Grafana. ",
"text": " This section shows you how to import the Grafana dashboards into your own Grafana instance. Once you have obtained the dashboards using one of the methods above, the Grafana dashboard .json files will be in the dashboards/grafana/ subdirectory Important By default, the Coherence dashboards require a datasource in Grafana named prometheus (which is case-sensitive). This datasource usually exists in an out-of-the-box Prometheus Operator installation. If your Grafana environment does not have this datasource, then there are two choices. Create a Prometheus datasource named prometheus as described in the Grafana Add a Datasource documentation and make this the default datasource. If you have an existing Prometheus datasource with a different name then you will need to edit the dashboard json files to change all occurrences of \"datasource\": \"prometheus\" to have the name of your Prometheus datasource. For example, running the script below in the directory containing the datasource .json files to be imported will change the datasource name from prometheus to Coherence-Prometheus . for file in *.json do sed -i '' -e 's/\"datasource\": \"prometheus\"/\"datasource\": \"Coherence-Prometheus\"/g' $file; done The above sed command works for MacOS, but if you are running on Linux you need to remove the '' after the -i . Manually Import Grafana Dashboards The dashboard .json files can be manually imported into Grafana using the Grafana UI following the instructions in the Grafana Import Dashboards documentation. Bulk Import Grafana Dashboards At the time of writing, for whatever reason, Grafana does not provide a simple way to bulk import a set of dashboard files. There are many examples and scripts on available in the community that show how to do this. The Coherence Operator source contains a script that can be used for this purpose grafana-import.sh The grafana-import.sh script requires the JQ utility to parse json. The commands below will download and run the shell script to import the dashboards. Change the &lt;GRAFANA-USER&gt; and &lt;GRAFANA_PWD&gt; to the Grafana credentials for your environment. For example if using the default Prometheus Operator installation they are as specified on the Access Grafana section of the Quick Start page. We do not document the credentials here as the default values have been known to change between Prometheus Operator and Grafana versions. <markup lang=\"bash\" >curl -Lo grafana-import.sh https://github.com/oracle/coherence-operator/raw/main/hack/grafana-import.sh chmod +x grafana-import.sh <markup lang=\"bash\" >./grafana-import.sh -u &lt;GRAFANA-USER&gt; -w &lt;GRAFANA_PWD&gt; -d dashboards/grafana -t localhost:3000 Note: the command above assumes you can reach Grafana on localhost:3000 (for example, if you have a kubectl port forward process running to forward localhost:3000 to the Grafana service in Kubernetes). You may need to change the host and port to match however you are exposing your Grafana instance. Coherence clusters can now be created as described in the Publish Metrics page, and metrics will eventually appear in Prometheus and Grafana. It can sometimes take a minute or so for Prometheus to start scraping metrics and for them to appear in Grafana. ",
"title": "Import the Dashboards into Grafana."
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/snapshot/pages/docs/metrics/030_importing.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ done</pre>
<div class="section">
<p>The dashboard <code>.json</code> files can be manually imported into Grafana using the Grafana UI following the instructions
in the
<a id="" title="" target="_blank" href="https://grafana.com/docs/grafana/latest/dashboards/manage-dashboards/#import-a-dashboard">Grafana Import Dashboard</a>
<a id="" title="" target="_blank" href="https://grafana.com/docs/grafana/latest/dashboards/build-dashboards/import-dashboards/">Grafana Import Dashboards</a>
documentation.</p>

</div>
Expand Down

0 comments on commit bdae2d0

Please sign in to comment.