-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from aradwann/configure-loki
Configure loki
- Loading branch information
Showing
11 changed files
with
157 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
groups: | ||
- name: example | ||
rules: | ||
- alert: HighCPUUsage | ||
expr: process_cpu_seconds_total > 100 | ||
for: 5m | ||
labels: | ||
severity: page | ||
annotations: | ||
summary: High CPU usage detected |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
global: | ||
resolve_timeout: 5m | ||
|
||
route: | ||
group_by: ["alertname"] | ||
group_wait: 10s | ||
group_interval: 10s | ||
repeat_interval: 1h | ||
receiver: "web.hook" | ||
|
||
receivers: | ||
- name: "web.hook" | ||
webhook_configs: | ||
- url: "https://webhook.site/3899a074-7f71-4e32-b845-de1fd61fad44" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
auth_enabled: false | ||
server: | ||
http_listen_port: 3100 | ||
grpc_listen_port: 9095 | ||
|
||
schema_config: | ||
configs: | ||
- from: "2023-01-05" | ||
index: | ||
period: 24h | ||
prefix: index_ | ||
object_store: filesystem | ||
schema: v12 | ||
store: tsdb | ||
|
||
storage_config: | ||
filesystem: | ||
directory: /tmp/loki/ | ||
tsdb_shipper: | ||
active_index_directory: /loki/tsdb-index | ||
cache_location: /loki/tsdb-cache | ||
shared_store: filesystem | ||
|
||
compactor: | ||
working_directory: /loki/compactor | ||
shared_store: filesystem | ||
|
||
ingester: | ||
wal: | ||
enabled: true | ||
dir: /loki/wal | ||
lifecycler: | ||
ring: | ||
kvstore: | ||
store: inmemory | ||
replication_factor: 1 | ||
|
||
ruler: | ||
storage: | ||
type: local | ||
local: | ||
directory: /loki/rules | ||
rule_path: /tmp/loki/rules-temp | ||
alertmanager_url: http://alertmanager:9093 | ||
enable_api: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
groups: | ||
- name: example | ||
rules: | ||
- alert: HelloAlert | ||
expr: count_over_time({job="your_job_label"} |= "HOLA" [5m]) > 4 | ||
for: 1m | ||
labels: | ||
severity: critical | ||
annotations: | ||
summary: "HOLA found in logs" | ||
description: "The term 'HOLA' was found in five logs within the last 5 minutes." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,14 @@ | ||
scrape_configs: | ||
- job_name: 'otel-collector' | ||
- job_name: "otel-collector" | ||
scrape_interval: 2s | ||
static_configs: | ||
- targets: ['otel-collector:8888'] | ||
- targets: ["otel-collector:8888"] | ||
|
||
alerting: | ||
alertmanagers: | ||
- static_configs: | ||
- targets: | ||
- "alertmanager:9093" | ||
|
||
rule_files: | ||
- "alert.rules.yml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters