Skip to content

Commit

Permalink
fix: added loki srep ui rule
Browse files Browse the repository at this point in the history
  • Loading branch information
henrywhitaker3 committed Mar 5, 2024
1 parent 26168e0 commit 11a9b90
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
15 changes: 15 additions & 0 deletions argo/cluster/monitoring/loki/chart/templates/recordingrules.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: loki-rules
data:
srep-ui.yaml: |
groups:
- name: ui
interval: 1m
rules:
- record: srep_ui_requests_total
expr: |
sum(
rate({app="srep-ui-chart"} |= `` | pattern `<_> - - <_> "<method> <url> <_>" <status> <size> <_> "<agent>" "<ip>"` [1m])
) by(job, status, url, method, container, pod, instance)
20 changes: 20 additions & 0 deletions argo/cluster/monitoring/loki/chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,31 @@ loki:
type: 'filesystem'
limits_config:
retention_period: 168h
rulerConfig:
enable_alertmanager_v2: true
alertmanager_url: http://kube-prometheus-stack-alertmanager.monitoring.svc:9093
storage:
type: local
local:
directory: /tmp/rules
rule_path: /tmp/scratch

singleBinary:
replicas: 1
persistence:
storageClass: longhorn
size: 5Gi
extraVolumes:
- name: rules
configMap:
name: loki-rules
- name: scratch
emptyDir: {}
extraVolumeMounts:
- name: rules
mountPath: /tmp/rules
- name: scratch
mountPath: /tmp/scratch

test:
enabled: false
Expand Down

0 comments on commit 11a9b90

Please sign in to comment.