Ingest integration data into FusionReactor using the Grafana agent in Docker

preview_player
Показать описание
In this video, I will be setting up the Grafana agent so that it can be used to ingest data into the FusionReactor Cloud. This is a simple procedure that will only take a few minutes, and in doing so, give you additional insight into your product and the metrics it produces, so you can quickly investigate and pinpoint issues.

Scraped metrics will be available in both Explore and the Integrations dashboards within the FusionReactor Cloud.

This code allows the agent to scrape and write metrics to FusionReactor Cloud. Be careful to copy the indentation correctly as the yaml syntax here is very sensitive.

Remote Write clarifies the connection from the Grafana agent to an observability platform, in this case being the FusionReactor Cloud. Integrations allows you to ingest metrics to monitor the health of your infrastructure with metrics from all aspects of your application stack.

Metric exporters are libraries that expose integration metrics to an agent, in this case, the Grafana agent, which allows you to send data to one or more data collection endpoints such as FusionReactor Cloud. In this example, we are using a node exporter that can expose a wide variety of hardware and kernel related metrics, and a mySQLl exporter that will expose the mySQL metrics from our database server.

You will need to replace the credentials under authorization with your API key to authenticate with our ingest endpoints. To generate a new API key, go to your account settings in FusionReactor Cloud, Click on API keys, then generate to create a new key.

Copy this key and paste it under credentials.

In addition, be sure to replace the data source with your own details and a user password, and the MySQL host, as I have done so in my example.

In my Docker compose file, you can see we have the Grafana agent and a MySQL server. You can create the Grafana agent container and the MySQL container with this code.

Now if we navigate to FusionReactor Cloud in a browser, we can access the many features available such as dashboards, which gives us a lot to get started with without needing any additional configuration. For example, I can click on the MySQL Integrations Dashboard, which we can now see is receiving and visualizing data from the exporter that we have set up.

So in summary, the Grafana agent is a powerful tool to pull metrics from your servers. And this is just one example of the many implementations to use Grafana with FusionReactor.
Рекомендации по теме
join shbcf.ru