Exclude pgbouncer logs with loki command
This commit is contained in:
parent
4a214e5a5a
commit
917f5bdd75
2
ctctl
2
ctctl
|
@ -773,7 +773,7 @@ ctctl_loki_logs(){
|
|||
${LOGCLI_CMD} $@
|
||||
else
|
||||
# Exclude connect-proxy logs as it's often not wanted
|
||||
SELECTOR='{job=~"'$(ctctl_ls_jobs | sed -zE 's/\n/|/g' | sed -E 's/\s+//' | sed -E 's/\|$//')'", task!~"connect-proxy-.+|tls-proxy|metrics-proxy"}'
|
||||
SELECTOR='{job=~"'$(ctctl_ls_jobs | sed -zE 's/\n/|/g' | sed -E 's/\s+//' | sed -E 's/\|$//')'", task!~"'${LOKI_IGNORE_TASKS:-connect-proxy-.+|tls-proxy|metrics-proxy|pgbouncer}'"}'
|
||||
echo "Running ${LOGCLI_CMD} $@ ${SELECTOR}"
|
||||
${LOGCLI_CMD} $@ "${SELECTOR}"
|
||||
fi
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
# LOKI_PASSWORD=S3cr3t.
|
||||
# Alternatively, you can use a command to fetch the password on demande
|
||||
# LOKI_PWD_CMD="vault read -field pwd kv/admin/loki"
|
||||
# Regex of tasks to ignore with ctctl loki
|
||||
# LOKI_IGNORE_TASKS="connect-proxy-.+|tls-proxy|metrics-proxy|pgbouncer"
|
||||
|
||||
# You can render a bundle in the example directory of the bundle itself
|
||||
# using only the default variables
|
||||
|
|
Loading…
Reference in New Issue