synthetic-monitoring-agent

module
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2020 License: Apache-2.0

README

Synthetic Monitoring Agent

This is the 'worker' for Grafana's Synthetic Monitoring application. The agent provides probe functionality and executes network checks for monitoring remote targets.

Please install Synthetic Monitoring in your Grafana Cloud or local Grafana instance before setting up your own private probe. You may need to generate a new API key to initialize the app.

Probes

Probes run checks from distributed locations around the world and send the resulting metrics and events directly to Grafana Cloud Prometheus and Loki services. You can select 1 or more 'public' probes to run checks from or run your own 'private' probes from any environment you choose.

To run your own probe

Add Probe

Add a new probe in your Grafana instance
  • Navigate to Synthetic Monitoring -> Probes.
  • Click New
  • Enter a Probe Name, Latitude, Longitude, and Region.
  • Optionally enter up to 3 custom labels to identify your probe.
  • Click Save
  • Copy the "Probe Authetication Token" and save for installing the agent.
Install the agent on Debian based systems
  • Add package repo GPG key

wget -q -O - https://packages-sm.grafana.com/gpg.key | sudo apt-key add -

  • Add Debian package repo

sudo add-apt-repository "deb https://packages-sm.grafana.com/deb stable main"

  • Install synthetic-monitoring-agent package

sudo apt-get install synthetic-monitoring-agent

  • Edit /etc/synthetic-monitoring/synthetic-monitoring-agent.conf and add the token retrieved from Grafana
# Enter API token retrieved from grafana.com here
API_TOKEN='YOUR TOKEN HERE'
  • Restart the agent

sudo service synthetic-monitoring-agent restart

Once the service is running, you will be able to select your new probe exactly the same as any public probe. You will need to manually add the new probe to any previously created checks.

Architecture

The agent obtains configuration information from the synthetic-monitoring-api and uses it to build a configuration for blackbox_exporter, which is how checks are executed.

agent process

Directories

Path Synopsis
cmd
internal
pkg
pb
package pb is empty and exists only to express build dependencies for protocol buffers code generation and to provide a nice clean way to obtain the location of the subpackages using "go list".
package pb is empty and exists only to express build dependencies for protocol buffers code generation and to provide a nice clean way to obtain the location of the subpackages using "go list".
pb/synthetic_monitoring
package synthetic_monitoring provides access to types and methods that allow for the production and consumption of protocol buffer messages used to communicate with synthetic-monitoring-api.
package synthetic_monitoring provides access to types and methods that allow for the production and consumption of protocol buffer messages used to communicate with synthetic-monitoring-api.
scripts
go Module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL