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

Add table gcp_compute_instance_metric_cpu_utilization_daily closes #225 #256

Merged
merged 5 commits into from
Jun 30, 2021

Conversation

ParthaI
Copy link
Contributor

@ParthaI ParthaI commented Jun 28, 2021

Integration test logs

Logs
Add passing integration test logs here

Example query results

Results

Basic Info

select
  instance_id,
  timestamp,
  minimum,
  maximum,
  average,
  sample_count
from
  gcp_compute_instance_metric_cpu_utilization_daily
order by
  instance_id,
  timestamp;
+----------------+----------------------+-------------------------+---------------------+----------------------+--------------+
| instance_id    | timestamp            | minimum                 | maximum             | average              | sample_count |
+----------------+----------------------+-------------------------+---------------------+----------------------+--------------+
| instance-test  | 2021-06-28T08:38:00Z | 0.0050000037098908955   | 0.24777208183347602 | 0.008507277855846422 | 213          |
| raj-cis-test-3 | 2021-05-11T10:02:00Z | 0.000042576415520064374 | 0.27373825512029976 | 0.009711430738157894 | 38           |
| raj-cis-test-3 | 2021-05-12T10:02:00Z | 0.00005298129142117247  | 0.5786255544511041  | 0.11527530962889737  | 25           |
| raj-cis-test2  | 2021-05-11T07:40:00Z | 0.0032023567739107267   | 1.9566120014064348  | 0.04162362604162775  | 267          |
| raj-cis-test3  | 2021-05-10T17:43:00Z | 0.11868870358380453     | 0.11868870358380453 | 0.11868870358380453  | 1            |
+----------------+----------------------+-------------------------+---------------------+----------------------+--------------+

CPU Over 0.04 average

select
  instance_id,
  timestamp,
  round(minimum::numeric,2) as min_cpu,
  round(maximum::numeric,2) as max_cpu,
  round(average::numeric,2) as avg_cpu,
  sample_count
from
  gcp_compute_instance_metric_cpu_utilization_daily
where average > 0.04
order by
  instance_id,
  timestamp;
+----------------+----------------------+---------+---------+---------+--------------+
| instance_id    | timestamp            | min_cpu | max_cpu | avg_cpu | sample_count |
+----------------+----------------------+---------+---------+---------+--------------+
| raj-cis-test-3 | 2021-05-12T10:02:00Z | 0.00    | 0.58    | 0.12    | 25           |
| raj-cis-test2  | 2021-05-11T07:40:00Z | 0.00    | 1.96    | 0.04    | 267          |
| raj-cis-test3  | 2021-05-10T17:43:00Z | 0.12    | 0.12    | 0.12    | 1            |
+----------------+----------------------+---------+---------+---------+--------------+

@ParthaI ParthaI requested a review from Subhajit97 June 28, 2021 08:45
@ParthaI ParthaI self-assigned this Jun 28, 2021
@ParthaI ParthaI linked an issue Jun 28, 2021 that may be closed by this pull request
Copy link

@rajlearner17 rajlearner17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Subhajit97 Subhajit97 requested a review from cbruno10 June 30, 2021 05:17
@cbruno10 cbruno10 merged commit 913b76d into main Jun 30, 2021
@cbruno10 cbruno10 deleted the issue-225 branch June 30, 2021 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add table gcp_compute_instance_metric_cpu_utilization_daily
4 participants