Getting Started
Asserts is cloud-agnostic and has no proprietary application agents to install. It is natively built on the open Prometheus ecosystem with 100s of exporters.
You can start by configuring a remote-write on your Prometheus to write to the Asserts Cloud or Asserts Enterprise installation.

Remote Write

Remote Writing from Prometheus can be done multiple ways. Here we cover using a standard Prometheus config as well as using the values from the Prometheus-Operator (kube-prometheus-stack) helm chart.

Standard Prometheus Config

Here’s an example of a Prometheus remote write configuration: Note it is recommended to have ~25% more memory for your prometheus to accommodate the remote-write assuming you're already operating at optimal efficiency.
1
global:
2
external_labels:
3
asserts_env: <your-env> # recommended dev/stage/prod or k8s cluster name
4
asserts_site: <your-site> # optional us-west-2 / us-east-1
5
6
remote_write:
7
- url: https://<your-tenant-name>.tsdb.asserts.ai/api/v1/write
8
basic_auth:
9
username: <your-tenant-name>
10
password: <secret>
11
queue_config:
12
capacity: 20000
13
max_samples_per_send: 10000
14
max_shards: 30
Copied!
Here you will populate external_labels (optional) but ensuring to fill in <your-tenant-name> for the remote_write url and the basic_auth username. Additionally, the <secret> needs to be filled out with the remote-write password Asserts has provided during onboarding.
Sometimes it’s desirable to only remote write some metrics. You can add a write_relabel_configs section to do this:
1
remote_write:
2
- url: https://<your-tenant-name>.tsdb.asserts.ai/api/v1/write
3
basic_auth:
4
username: <your-tenant-name>
5
password: <secret>
6
write_relabel_configs:
7
- source_labels: [ namespace ] # keep all metrics in the dev namespace
8
regex: dev
9
target_label: __tmp_keep
10
replacement: 'true'
11
- source_labels: [ created_by_kind ] # drop all metrics with label name -> created_by_kind=Job
12
regex: Job
13
action: drop
14
- source_labels: [ __name__ ] # keep all metrics matching the various metrics names (this will include those outside the dev namespace)
15
regex: node_.*|kubelet_.*|kube_node_.*|prometheus_.*|alertmanager_.*
16
target_label: __tmp_keep
17
replacement: 'true'
18
- source_labels: [ __tmp_keep ] # keep all the metrics with the label __tmp_keep=true
19
regex: 'true'
20
action: keep
21
- regex: __tmp_keep # drop all the __tmp_keep labels (not the metric)
22
action: labeldrop
23
queue_config:
24
capacity: 20000
25
max_samples_per_send: 10000
26
max_shards: 30
Copied!

Prometheus Operator Helm Chart Config

First, you'll want to create a kubernetes secret from which to use to authenticate to Asserts via remote-write. Just fill in the <your-namespace>, <your-tenant-name>, and <your-password> blocks, then run the following:
1
kubectl create secret generic asserts-remote-write \
2
--namespace=<your-namespace> \
3
--from-literal=username=<your-tenant-name> \
4
--from-literal=password=<your-password>
Copied!
You can verify the secret has been created with the appropriate password by running:
1
kubectl get secret asserts-remote-write -n <namespace> -o jsonpath={.data.password} | base64 --decode
Copied!
Now, configure your prometheus-operator values, filling in the externalLabels (optional) but ensuring <your-tenant-name> is populated for the remoteWrite url.
1
prometheus:
2
prometheusSpec:
3
externalLabels:
4
asserts_env: <your-env> # recommended dev/stage/prod or k8s cluster name
5
asserts_site: <your-site> # optional us-west-2 / us-east-1
6
remoteWrite:
7
- url: https://<your-tenant-name>.tsdb.asserts.ai/api/v1/write
8
basicAuth:
9
password:
10
name: asserts-remote-write
11
key: password
12
username:
13
name: asserts-remote-write
14
key: username
15
queueConfig:
16
capacity: 20000
17
maxSamplesPerSend: 10000
18
maxShards: 30
Copied!
Reiterating from the standard configuration, Asserts will provide your tenant name and password used in the above configuration during onboarding.
Sometimes it’s desirable to only remote write some metrics. You can add a writeRelabelConfigs section to do this:
1
prometheus:
2
prometheusSpec:
3
remoteWrite:
4
- url: https://<your-tenant-name>.tsdb.asserts.ai/api/v1/write
5
basicAuth:
6
password:
7
name: asserts-remote-write
8
key: password
9
username:
10
name: asserts-remote-write
11
key: username
12
writeRelabelConfigs:
13
- sourceLabels: [ namespace ] # keep all metrics in the dev namespace
14
regex: dev
15
targetLabel: __tmp_keep
16
replacement: 'true'
17
- sourceLabels: [ created_by_kind ] # drop all metrics with label name -> created_by_kind=Job
18
regex: Job
19
action: drop
20
- sourceLabels: [ __name__ ] # keep all metrics matching the various metrics names (this will include those outside the dev namespace)
21
regex: node_.*|kubelet_.*|kube_node_.*|prometheus_.*|alertmanager_.*
22
targetLabel: __tmp_keep
23
replacement: 'true'
24
- sourceLabels: [ __tmp_keep ] # keep all the metrics with the label __tmp_keep=true
25
regex: 'true'
26
action: keep
27
- regex: __tmp_keep # drop all the __tmp_keep labels (not the metric)
28
action: labeldrop
29
queueConfig:
30
capacity: 20000
31
maxSamplesPerSend: 10000
32
maxShards: 30
Copied!
Copy link
Contents
Remote Write