README
¶
Prometheus Remote Write Exporter for Cortex Example
This example uses Docker Compose to set up:
- A Go program that creates two instruments and exports randomly generated metrics data using the exporter
- An instance of Cortex to receive the metrics data
- An instance of Grafana to visualize the exported data
Requirements
Installation instructions can be found in the Docker documentation.
Instructions
-
Run the docker container with the following command:
docker-compose up -d
The
-d
flag causes all services to be run in detached mode, or in the background. This causes no logs to show up. Users can attach themselves to a service's logs manually. -
Log in to the Grafana instance at http://localhost:3000
- The login credentials are admin/admin
- There may be an additional screen on setting a new password. It isn't needed and can be skipped
-
Go to the Data Sources tab page
- Look for a gear icon on the left sidebar and select Data Sources
-
Add a new Prometheus Data Source
- Use http://host.docker.internal:9009/api/prom/ as the URL
- Optionally, set the scrape interval to 3s to make updates appear quickly
- Click
Save & Test
-
Go to the New Dashboard page
- Look for a + sign and select Dashboard
- Click
Add New Panel
-
Add new metric queries
- Click the
+ Query
button to create a new query if an empty one isn't available - Under the
Metrics
dropdown, select a metric - Add new queries to see different metrics at the same time
- Optionally, adjust the time range by clicking the
Last 6 hours
button on the upper right side of the graph - Optionally, set up auto-refresh by selecting an option under the dropdown next to the refresh button on the upper right side of the graph
- Click the refresh button and data should show up on the graph
- Click the
-
Shut down the services when you're finished with the example
docker-compose down
Documentation
¶
There is no documentation for this package.