Cloud observability integrated with Grafana provides insightful metrics, logs, and traces and is easily leveraged with other open-source software. Grafana cloud observability helps to
assemble information collected by practitioners, operators, and reliability engineers under one dashboard. It runs as a web app to detect visualizations and offers integration to cloud-based services such as Microsoft Azure data monitor, Amazon Cloud Watch, and InfluxDB. One of the favored open-source software to integrate with Grafana is Prometheus, which provides a wide variety of cloud support for better data visualization.
Grafana dashboard is supported by the axon framework, which helps in microservice systems used in CQRS (Command-Query Responsibility Segregation) and sourcing of events.
Prometheus - Loki
Tempo - Cortex
Tanka - Graphite
K6 - Metrictank
OpenTelemetry
Go programming language - It is used to channel metrics to Grafana cloud that enables the Grafana agent to integrate with other applications which detect the Go runtime.
Jsonnet - It is a data templating language used to generate config data and is used in Grafana cloud observability to integrate into other apps.
To integrate with other open-source software, a configuration agent file is created which defines the port, metrics endpoints with the Golang client library.
Install code for Grafana cloud observability with Prometheus and save in .yaml as indicated below:
Cloud observability with Grafana supports MySQL. The data collected and stored by MySQL via Prometheus is used to view metrics and system logs. The data source for Grafana is configured with query editor which supports the following technology stacks: Grafana v7.0+, NodeJS v14+, and yarn.
For the database to work well in Grafana, the environment for the data plugin is configured as displayed in the following steps:
The Grafana toolkit creates a data source for the plugin as shown in the below code:
1 2 3 4 5 6 7 8
#Create a plugin npx @grafana / toolkit plugin: create plugin - name #Install the necessary plugin yarn install #Building the plugin yarn dev
Once the plugin is configured, the data frames are easily attached in JavaScript and Jsonnet that sync the data source. The sample codes below show the configuration of the data frames.
After the query method is set, the data frame is now ready to receive data that can be visualized in the Grafana dashboard. The query and the model are defined to wrap the form to collect data to monitor and visualize in the dashboard.
The query model also supports custom queries to the data frame via the data source. The query wrapping form provides a user-friendly way to build menus and stitches that convert the query text. Below is how the model is defined to increase the frequency of the data source with MySQL:
After setting frequency, configure the data source to resolve the controls of the data points depending on how the data points are placed, either with higher resolution or lower resolution.
The events of the data points are bound with the model form which can also be linked with external APIs.
Grafana and Prometheus are mostly used to integrate for the purpose of time-series data. Prometheus helps with metrics and visualization in graphs and charts. However, there are other alternatives that are used to monitor data with Grafana, such as:
Go programming integration:
https://grafana.com/docs/grafana-cloud/integrations/integrations/integration-golang/
Grafana features and limitations:
https://github.com/grafana/metrictank
Grafana logs and metrics:
https://grafana.com/blog/2021/01/12/the-new-grafana-cloud-the-only-composable-observability-stack-for-metrics-logs-and-traces-now-with-free-and-paid-plans-to-suit-every-use-case/
Grafana configuration:
https://grafana.com/blog/2020/02/26/how-to-configure-grafana-as-code/