Observing Great Bear
To help you with the maintenance and troubleshooting of your sites, edge devices, and applications, Great Bear provides a centralized observability solution and collect the metrics from your edge nodes. You can access and query the collected data from your Grafana instance, or your Grafana Cloud account.
Enable metric collection
Collecting metrics must be enabled for your site. On the Great Bear dashboard, select your site, then select Edit Config and verify that the Collect site metrics option is enabled. For details, see Configure site.
Enable application metrics
If an application supports collecting metrics, you can enable collecting application metrics during the deployment or redeployment of the application by selecting the Collect application metrics or Enable monitoring option. For details, see the documentation of the specific application.
- For details on how to redeploy an application to enable monitoring, see Redeploy application.
- For details on adding custom metrics to an application that you are developing, see Adding Prometheus metrics to an app tutorial.
The collected metrics include CPU and memory utilization, and network usage.
Applications can have their own custom dashboards that show application-specific metrics. For example, the Edge MQTT broker has a dashboard that shows the number of published messages, the amount of transferred data, and the number of clients connected.
Connect Great Bear to Grafana
To access the site and application metrics of Great Bear, add Great Bear as a data source to your Grafana instance, or your Grafana Cloud account.
A running Grafana instance or a Grafana Cloud account. When using your own Grafana instance, make sure that it can access the https://api.greatbear.io/api/v1/metrics URL on port 443.
You must have the organization admin role to add data sources.
Your Great Bear API key
To access the API key, login to the Great Bear Dashboard, select the top right Profile icon, then click Copy API Key.
Add Great Bear as a data source to Grafana. Complete the following steps.
- Open Grafana.
- Select the cog icon, then select Data Sources > Add data source.
- Select Prometheus.
- Set URL to https://api.greatbear.io/api/v1/metrics.
- In the Custom HTTP headers section, add the
- Set the value of the
x-id-api-keyheader to your Great Bear API key.
- Select Save and Test.
For details on adding data sources to Grafana, see the official Grafana documentation.
Import the Great Bear dashboards
To import the Great Bear dashboards into Grafana, complete the following steps.
Download the Great Bear dashboards from https://files.greatbear.io/dist/dashboards/latest/dashboards.tgz and extract the file.
When prompted for credentials:
username: prod password: <access-token as stated in your tenant on-boarding pack>
If you’re unsure about the access token, contact the Great Bear administrator of your organization, or the Great Bear Support Team.
Select Dashboards > Import Dashboard.
Select Upload JSON and upload a dashboard file. Repeat this step to upload the other dashboard files.
Great Bear dashboards
If you have imported the Great Bear dashboards into Grafana, you can access them in Grafana. You can find the available dashboards in the Great Bear dashboards folder, grouped into subfolders:
- Applications: Dashboards for the deployed applications that have metrics collection enabled. For details, see Enable application metrics.
- Kubernetes: Dashboards of the Kubernetes resources of your sites, for example, the clusters, nodes, and pods.
- General: Dashboards specific to Great Bear.
Select a dashboard to display the related metrics.
Select the site you are interested in from the siteId field on the top of the dashboard.
Note: Only those sites are listed that have submitted metrics during the period set on the top-right of the dashboard. Adjust the period if needed.
To learn more about how Grafana dashboards work, see the official Grafana documentation.