Skip to content

Getting started with Perses #6669

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/getting-started/.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
CORTEX_VERSION=v1.19.0
GRAFANA_VERSION=10.4.2
PROMETHEUS_VERSION=v2.51.2
PROMETHEUS_VERSION=v3.2.1
SEAWEEDFS_VERSION=3.67
PERSES_VERSION=v0.49-distroless-debug
14 changes: 4 additions & 10 deletions docs/getting-started/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ This example uses [Docker Compose](https://docs.docker.com/compose/) to set up:
1. An instance of [SeaweedFS](https://github.com/seaweedfs/seaweedfs/) for S3-compatible object storage
1. An instance of [Cortex](https://cortexmetrics.io/) to receive metrics.
1. An instance of [Prometheus](https://prometheus.io/) to send metrics to Cortex.
1. An instance of [Grafana](https://grafana.com/) to visualize the metrics.
1. An instance of [Perses](https://perses.dev) for latest trend on dashboarding
1. An instance of [Grafana](https://grafana.com/) for legacy dashboarding

#### Instructions

Expand All @@ -53,14 +54,7 @@ $ cd cortex/docs/getting-started
##### Start the services

```sh
# Start SeaweedFS to emulate S3 storage for Cortex.
$ docker-compose up seaweedfs -d --wait
# Create buckets in SeaweedFS.
$ for bucket in cortex-blocks cortex-ruler cortex-alertmanager; do
curl --aws-sigv4 "aws:amz:local:seaweedfs" --user "any:any" -X PUT http://localhost:8333/$bucket
done
# Start the remaining services.
$ docker-compose up -d --wait
$ docker compose up -d
```

We can now access the following services:
Expand Down Expand Up @@ -123,7 +117,7 @@ Other things to explore:
### Clean up

```sh
$ docker-compose down
$ docker compose down -v
```

## Microservice Mode
Expand Down
4 changes: 2 additions & 2 deletions docs/getting-started/cortex-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# and development.

# https://cortexmetrics.io/docs/configuration/configuration-file/#supported-contents-and-default-values-of-the-config-file
target: all,compactor,alertmanager
Copy link
Member Author

@friedrichg friedrichg Mar 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No longer needed after #6204

target: all

# Disable the requirement that every request to Cortex has an
# X-Scope-OrgID header. `fake` will be substituted in instead.
Expand Down Expand Up @@ -100,4 +100,4 @@ alertmanager_storage:
backend: s3
s3:
<<: *s3
bucket_name: cortex-alertmanager
bucket_name: cortex-alertmanager
13 changes: 13 additions & 0 deletions docs/getting-started/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@ services:
- ./dashboards/:/var/lib/grafana/dashboards/:ro
ports:
- "3000:3000"
perses:
image: persesdev/perses:${PERSES_VERSION}
command: "--config=/etc/perses/config/config.yaml"
ports:
- "8080:8080"
volumes:
- ./perses/config.yaml:/etc/perses/config/config.yaml:ro
- ./perses/datasource.yaml:/etc/perses/resources/datasource.yaml:ro
- ./perses/project.yaml:/etc/perses/resources/project.yaml:ro
- ./perses/dashboards/cortex-writes.yaml:/etc/perses/resources/cortex-writes.yaml:ro
prometheus:
image: prom/prometheus:${PROMETHEUS_VERSION}
command:
Expand All @@ -55,8 +65,11 @@ services:
- -s3.config=/workspace/seaweedfs-config.json
ports:
- "8333:8333"
post_start:
- command: /seaweedfs-init.sh
volumes:
- ./seaweedfs-config.json:/workspace/seaweedfs-config.json:ro
- ./seaweedfs-init.sh:/seaweedfs-init.sh:ro
healthcheck:
test: wget -qO- http://127.0.0.1:8333/status
interval: 10s
Expand Down
21 changes: 21 additions & 0 deletions docs/getting-started/perses/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
security:
readonly: false
enable_auth: false
cookie:
same_site: lax
secure: false

database:
file:
extension: yaml
folder: /perses

schemas:
datasources_path: /etc/perses/cue/schemas/datasources
interval: 5m
panels_path: /etc/perses/cue/schemas/panels
queries_path: /etc/perses/cue/schemas/queries
variables_path: /etc/perses/cue/schemas/variables
provisioning:
folders:
- /etc/perses/resources
Loading
Loading