From a07cf66af0c3ab9e4d85de79a105ed31799b0c33 Mon Sep 17 00:00:00 2001 From: Kaviraj Date: Wed, 17 Feb 2021 17:37:42 +0100 Subject: [PATCH 1/4] Add some operation details to gcplog doc --- docs/sources/clients/promtail/gcplog-cloud.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/sources/clients/promtail/gcplog-cloud.md b/docs/sources/clients/promtail/gcplog-cloud.md index 25236ee16140..94126416b6ea 100644 --- a/docs/sources/clients/promtail/gcplog-cloud.md +++ b/docs/sources/clients/promtail/gcplog-cloud.md @@ -69,3 +69,19 @@ We need a service account with following permissions. - pubsub.subscriber This enables promtail to read log entries from the pubsub subscription created before. + +## Operations + +Sometimes you may have to check how much logs you are writting to the pubsub topic (mostly for cost estimation). + +These messages stays in Pubsub Subscription till its acknowledged. Following command just removes those log messages without having it to be consumed via promtail or any other pubsub consumer. + +```bash +gcloud pubsub subscriptions seek --time= +``` + +To delete all the old messages till now, set `--time` to current time. + +```bash +gcloud pubsub subscriptions seek projects/my-project/subscriptions/cloud-logs --time=$(date +%Y-%m-%dT%H:%M:%S) +``` From 7d09fb3f718be32b8f8cac7275d4c47eb37e0e98 Mon Sep 17 00:00:00 2001 From: Kaviraj Date: Mon, 22 Feb 2021 17:10:01 +0100 Subject: [PATCH 2/4] Update docs/sources/clients/promtail/gcplog-cloud.md Co-authored-by: Owen Diehl --- docs/sources/clients/promtail/gcplog-cloud.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sources/clients/promtail/gcplog-cloud.md b/docs/sources/clients/promtail/gcplog-cloud.md index 94126416b6ea..878a3f30863c 100644 --- a/docs/sources/clients/promtail/gcplog-cloud.md +++ b/docs/sources/clients/promtail/gcplog-cloud.md @@ -80,7 +80,7 @@ These messages stays in Pubsub Subscription till its acknowledged. Following com gcloud pubsub subscriptions seek --time= ``` -To delete all the old messages till now, set `--time` to current time. +To delete all the old messages until now, set `--time` to current time. ```bash gcloud pubsub subscriptions seek projects/my-project/subscriptions/cloud-logs --time=$(date +%Y-%m-%dT%H:%M:%S) From aac8502b0242e8b0ec03e67c80c5899be05bf9f7 Mon Sep 17 00:00:00 2001 From: Kaviraj Date: Mon, 22 Feb 2021 17:10:27 +0100 Subject: [PATCH 3/4] Update docs/sources/clients/promtail/gcplog-cloud.md Co-authored-by: Owen Diehl --- docs/sources/clients/promtail/gcplog-cloud.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sources/clients/promtail/gcplog-cloud.md b/docs/sources/clients/promtail/gcplog-cloud.md index 878a3f30863c..61b9fde0171d 100644 --- a/docs/sources/clients/promtail/gcplog-cloud.md +++ b/docs/sources/clients/promtail/gcplog-cloud.md @@ -74,7 +74,7 @@ This enables promtail to read log entries from the pubsub subscription created b Sometimes you may have to check how much logs you are writting to the pubsub topic (mostly for cost estimation). -These messages stays in Pubsub Subscription till its acknowledged. Following command just removes those log messages without having it to be consumed via promtail or any other pubsub consumer. +These messages stays in Pubsub Subscription until they're acknowledged. The following command removes log messages without needing to be consumed via promtail or any other pubsub consumer. ```bash gcloud pubsub subscriptions seek --time= From 970b1790cc7791148cafc6aa02e7706b9e2a9cbd Mon Sep 17 00:00:00 2001 From: Kaviraj Date: Mon, 22 Feb 2021 17:10:50 +0100 Subject: [PATCH 4/4] Update docs/sources/clients/promtail/gcplog-cloud.md Co-authored-by: Owen Diehl --- docs/sources/clients/promtail/gcplog-cloud.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sources/clients/promtail/gcplog-cloud.md b/docs/sources/clients/promtail/gcplog-cloud.md index 61b9fde0171d..518bda3bcf72 100644 --- a/docs/sources/clients/promtail/gcplog-cloud.md +++ b/docs/sources/clients/promtail/gcplog-cloud.md @@ -72,7 +72,7 @@ This enables promtail to read log entries from the pubsub subscription created b ## Operations -Sometimes you may have to check how much logs you are writting to the pubsub topic (mostly for cost estimation). +Sometimes you may wish to clear the pending pubsub queue containing logs. These messages stays in Pubsub Subscription until they're acknowledged. The following command removes log messages without needing to be consumed via promtail or any other pubsub consumer.