Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

monitoring/metrics: update from 5 to 20 minutes #2210

Merged
merged 1 commit into from
Jun 19, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions monitoring/api/v3/cloud-client/snippets.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def list_time_series(project_id):
interval.end_time.seconds = int(now)
interval.end_time.nanos = int(
(now - interval.end_time.seconds) * 10**9)
interval.start_time.seconds = int(now - 300)
interval.start_time.seconds = int(now - 1200)
interval.start_time.nanos = interval.end_time.nanos
results = client.list_time_series(
project_name,
Expand All @@ -99,7 +99,7 @@ def list_time_series_header(project_id):
interval.end_time.seconds = int(now)
interval.end_time.nanos = int(
(now - interval.end_time.seconds) * 10**9)
interval.start_time.seconds = int(now - 300)
interval.start_time.seconds = int(now - 1200)
interval.start_time.nanos = interval.end_time.nanos
results = client.list_time_series(
project_name,
Expand All @@ -123,7 +123,7 @@ def list_time_series_aggregate(project_id):
interval.start_time.seconds = int(now - 3600)
interval.start_time.nanos = interval.end_time.nanos
aggregation = monitoring_v3.types.Aggregation()
aggregation.alignment_period.seconds = 300 # 5 minutes
aggregation.alignment_period.seconds = 1200 # 20 minutes
aggregation.per_series_aligner = (
monitoring_v3.enums.Aggregation.Aligner.ALIGN_MEAN)

Expand All @@ -150,7 +150,7 @@ def list_time_series_reduce(project_id):
interval.start_time.seconds = int(now - 3600)
interval.start_time.nanos = interval.end_time.nanos
aggregation = monitoring_v3.types.Aggregation()
aggregation.alignment_period.seconds = 300 # 5 minutes
aggregation.alignment_period.seconds = 1200 # 20 minutes
aggregation.per_series_aligner = (
monitoring_v3.enums.Aggregation.Aligner.ALIGN_MEAN)
aggregation.cross_series_reducer = (
Expand Down