Skip to content

Commit

Permalink
fix time duration unit (#3124)
Browse files Browse the repository at this point in the history
time.ParseDuration does not support unit `d`
  • Loading branch information
wujie1993 authored Jan 6, 2021
1 parent c971e8e commit ca344ca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/sources/clients/promtail/stages/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,15 +158,15 @@ config:
type: Counter
description: "total number of log lines"
prefix: my_promtail_custom_
max_idle_duration: 1d
max_idle_duration: 24h
config:
match_all: true
action: inc
log_bytes_total:
type: Counter
description: "total bytes of log lines"
prefix: my_promtail_custom_
max_idle_duration: 1d
max_idle_duration: 24h
config:
match_all: true
count_entry_bytes: true
Expand All @@ -179,7 +179,7 @@ by using the `match_all: true` parameter.
It also creates a `log_bytes_total` counter which adds the byte size of every log line received
to the counter by using the `count_entry_bytes: true` parameter.

Those two metrics will disappear after 1d if they don't receive new entries, this is useful to reduce the building up of stage metrics.
Those two metrics will disappear after 24h if they don't receive new entries, this is useful to reduce the building up of stage metrics.

The combination of these two metric stages will give you two counters to track the volume of
every log stream in both number of lines and bytes, which can be useful in identifying sources
Expand Down

0 comments on commit ca344ca

Please sign in to comment.