-
Notifications
You must be signed in to change notification settings - Fork 487
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use loki in k3d agent DS instead of promtail (#406)
- Loading branch information
Showing
14 changed files
with
56 additions
and
361 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
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,41 @@ | ||
local grafana_agent = import 'grafana-agent/v1/main.libsonnet'; | ||
|
||
grafana_agent.scrapeKubernetesLogs { | ||
local pipeline_stages = [ | ||
// k3d uses cri for logging | ||
{ cri: {} }, | ||
|
||
// Bad words metrics, used in Agent dashboard | ||
{ | ||
regex: { | ||
expression: '(?i)(?P<bad_words>panic:|core_dumped|failure|error|attack| bad |illegal |denied|refused|unauthorized|fatal|failed|Segmentation Fault|Corrupted)', | ||
}, | ||
}, | ||
{ | ||
metrics: { | ||
panic_total: { | ||
type: 'Counter', | ||
description: 'total count of panic: found in log lines', | ||
source: 'panic', | ||
config: { | ||
action: 'inc', | ||
}, | ||
}, | ||
bad_words_total: { | ||
type: 'Counter', | ||
description: 'total count of bad words found in log lines', | ||
source: 'bad_words', | ||
config: { | ||
action: 'inc', | ||
}, | ||
}, | ||
}, | ||
}, | ||
], | ||
|
||
scrape_configs: [ | ||
x { pipeline_stages: pipeline_stages } | ||
for x | ||
in super.scrape_configs | ||
], | ||
} |
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
25 changes: 0 additions & 25 deletions
25
example/k3d/vendor/github.com/grafana/loki/production/ksonnet/promtail/config.libsonnet
This file was deleted.
Oops, something went wrong.
14 changes: 0 additions & 14 deletions
14
example/k3d/vendor/github.com/grafana/loki/production/ksonnet/promtail/jsonnetfile.json
This file was deleted.
Oops, something went wrong.
69 changes: 0 additions & 69 deletions
69
example/k3d/vendor/github.com/grafana/loki/production/ksonnet/promtail/promtail.libsonnet
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.