Ingesting data into FusionReactor with the Observability Agent

Shipping Kubernetes monitoring data to FusionReactor Cloud
OpsPilot AI: Empowering Your Applications with Advanced Observability

This integration allows you to ingest vital metrics to monitor the health of your entire infrastructure, with metrics from all aspects of your application stack.

Metric exporters are libraries that expose integration metrics to an agent. At FusionReactor, we have developed a wrapper for the Grafana Agent called the Observability Agent, which allows you to ingest metrics with minimal configuration required.

With FusionReactor’s Observability Agent, you can:

  • detect which services are running on your machine
  • automatically create a configuration file with integrations for detected services

The Observability Agent is available via standalone installers or via Docker images.

Prerequisites

The script will have to be run with root privileges for Unix machines. Otherwise, you will be prompted for your password during execution.
Windows machines must have Powershell 5.1 or later installed.
MacOS is not currently supported.

The script will automatically detect what is running on your machine and add integrations to the config file. Each service requiring an integration must be running on its default port.

These are:

Integration Default port
MySQL 3306
MSSQL 1433
Postgres 5432

Procedure

Linux

To download and run the installer:

curl -O -L "https://github.com/intergral/observability-agent/releases/download/v0.1.0/observability-agent-autoconf.sh"
chmod a+x "observability-agent-autoconf.sh"`
sudo /bin/bash path/to/observability-agent-autoconf.sh

Windows

The installer for Windows assumes you are installing the Grafana Agent in the default location on the C drive. This is required for the config file to be placed in the correct location for the Grafana Agent to read it.

In a terminal, run:

Invoke-WebRequest -Uri "https://github.com/intergral/observability-agent/releases/download/v0.1.0/observability-agent-autoconf.ps1" -OutFile "observability-agent-autoconf.ps1"
.\observability-agent-autoconf.ps1

Options

Agent installation is enabled by default, but some options can be added if this is not required.

Run without the agent installed

To run without installing the agent, add –install false to the end of the run command.

sudo path/to/observability-agent-autoconf.sh --install false`

Modify a pre-existing config file
To modify a pre-existing config file, add --config.file, followed by the path to the file, to the end of the run command. A backup of your original file will be created.

sudo path/to/observability-agent-autoconf.sh --config.file path/to/configfile`

Docker

When running in Docker, you will not be prompted for any information. Therefore, you must specify an API key before running. Additionally, you must set the relevant environment variables for whichever services you run, so they can be configured.

We provide prebuilt images in our Docker Hub repository to run in Docker. You can also watch a quick video tutorial to help set up the Observability Agent.

Environment variables

To add integrations without being prompted for credentials, there are several environment variables you can use:

Ingest

Variable Type Description
api_key string API Key to authenticate with your FusionReactor Cloud Account. Generate an API key.
metricsEndpoint string Default: https://api.fusionreactor.io/v1/metrics
logsEndpoint string Default: https://api.fusionreactor.io/v1/logs

Metric exporters

 

Variable Type Description
mysql_user string User for the local Mysql database
mysql_password string Password for the local Mysql database
mysql_disabled bool Enables/Disables the Mysql exporter (enabled by default)
mssql_user string User for the local Mssql database
mssql_password string Password for the local Mssql database
mssql_disabled bool Enables/Disables the Mssql exporter (enabled by default)
postgres_user string User for the local Postgres database
postgres_password string Password for the local Postgres database
postgres_disabled bool Enables/Disables the Postgres exporter (enabled by default)

Exporting metrics from external machines

 

To replace these with a custom connection string, there are several environment variables you can use:

 

Variable Type Example (Defaults)
mysql_connection_string string <username>:<password>@(<host>:3306)/
mssql_connection_string string sqlserver://<username>:<password>@<host>:1433
postgres_connection_string string postgresql://<username>:<password>@<host>:5432/shop?

Log exporters

If you wish to enable log collection, the following environment variables must be set:

 

Variable Type Description
log_collection bool Enables log collection
service_name string Set a name for your log collection service
log_path string Set a file path for your log collection service

.Env files

If you wish to use an environment file to set environment variables, rather than setting them as system environment variables, name the file “.env” and place it in the same directory as the “observability-agent-autoconf” script.

Example “.env” file:

api_key=1234567890

mysql_connection_string=root:my-secret-pw@(mysql:3306)/

log_collection=true

service_name=service

log_path=path

Custom integrations

FusionReactor plans to continually add integrations. Should you require a specific integration, please contact us and we’ll see what we can do.

Visualize your data

Navigate to Fusion Reactor Cloud in your browser and access the many features available, such as dashboards, without needing any additional configuration. Try clicking on the MySQL Integrations dashboard, which will receive and visualize data from the Observability Agent. Here, you can monitor the health of your entire infrastructure with metrics from all aspects of your application stack.

Ingesting data into FusionReactor with the Observability Agent, FusionReactor

For more information see our documentation.

Recent Posts