Skip to content

Commit

Permalink
fix alertmanager api version
Browse files Browse the repository at this point in the history
  • Loading branch information
aradwann committed Apr 5, 2024
1 parent 62c6c4f commit 6cf49ff
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,12 @@ func runGrpcServer(config util.Config, store db.Store, taskDistributor worker.Ta
}

slog.Info(fmt.Sprintf("start gRPC server at %s with TLS", listener.Addr().String()))
slog.Info("HOLA 1")
slog.Info("HOLA 2")
slog.Info("HOLA 3")
slog.Info("HOLA 4")
slog.Info("HOLA 5")

if err := grpcServer.Serve(listener); err != nil {
handleError("failed to serve", err)
}
Expand Down
1 change: 1 addition & 0 deletions observability/loki/loki-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,5 @@ ruler:
directory: /loki/rules
rule_path: /tmp/loki/rules-temp
alertmanager_url: http://alertmanager:9093
enable_alertmanager_v2: true
enable_api: true
4 changes: 2 additions & 2 deletions observability/loki/rules/loki_alert_rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ groups:
- name: example
rules:
- alert: HelloAlert
expr: count_over_time({job="your_job_label"} |= "HOLA" [5m]) > 4
for: 1m
expr: count_over_time({container_name="/api"} |= "HOLA" [5m]) > 4
# for: 1m
labels:
severity: critical
annotations:
Expand Down

0 comments on commit 6cf49ff

Please sign in to comment.