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

[enhancement] Add support for log-based metrics #1236

Closed
endemics opened this issue Mar 21, 2018 · 15 comments · Fixed by GoogleCloudPlatform/magic-modules#1702
Closed

[enhancement] Add support for log-based metrics #1236

endemics opened this issue Mar 21, 2018 · 15 comments · Fixed by GoogleCloudPlatform/magic-modules#1702

Comments

@endemics
Copy link

Hi,

We are planning to use log-based metrics to create counter metrics from application logs or google cloud API logs (such as reported errors for Cloud KMS Decrypt calls), and unless mistaken this is not yet supported in terraform.

I believe such terraform resource would be using the API detailed in https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics

Terraform Version

terraform v0.11.4
provider.google v1.8.0

Expected Behavior

Be able to create at least simple log-based metric counters that would look something like:

resource "google_logging_project_metric" "kms-metric" {
  name        = "kms-logs-error-metric"
  description = "Number of KMS decryption error"
  filter      = "resource.type=\"cloudkms_cryptokey\" logName=\"projects/${var.google_project_id}/logs/cloudaudit.googleapis.com%2Fdata_access\" protoPayload.status.message: \"denied\""
}
@cblecker
Copy link
Contributor

cblecker commented May 3, 2018

I would also love to see this.

@pepnova-9
Copy link

Is anyone already working on this issue?
@danawillow

@danawillow
Copy link
Contributor

Not that I know of! Are you looking to contribute?

@danawillow
Copy link
Contributor

(do keep in mind if you are, that these days we're trying to generate most new resources using the magic-modules framework)

@luckysamadhiya
Copy link

@danawillow any update on log-based metrics support in terrafrom ?

@luckysamadhiya
Copy link

@danawillow just wanna confirm again , any update on log-based metrics support in terraform ?

@danawillow
Copy link
Contributor

@chrisst do you know?

(I'm actually on a break from Terraform at the moment, so I'm afraid tagging me in issues isn't going to be much help)

@chrisst
Copy link
Contributor

chrisst commented Feb 26, 2019

No updates at this point :( I'll add it to my queue though when I get some time.

@heyakim
Copy link

heyakim commented Mar 26, 2019

Waiting for any updates.

@heyakim
Copy link

heyakim commented Apr 1, 2019

Hello @chrisst, do we have any update on this enhancement support? :)

@heyakim
Copy link

heyakim commented Apr 3, 2019

Hello @chrisst, thanks for checking on this lately. I see a pull request is pending approval on the magic modules repository. Will the update be pushed in this repository once approved? Looking forward to have it soonest.

@chrisst
Copy link
Contributor

chrisst commented Apr 3, 2019

Yes, Magic Modules is a code generator that we use to build the Terraform Provider Google code base. Once that PR is ready it will generate PR's into all the downstream code bases including this and https://github.com/terraform-providers/terraform-provider-google-beta/

@chrisst chrisst self-assigned this Apr 3, 2019
@heyakim
Copy link

heyakim commented Apr 3, 2019

That's good to know @chrisst. Looks like I have to wait for this update. Adding labels via terraform would also be great. :)

@git4raj
Copy link

git4raj commented Apr 4, 2019

We would like to have the ability to create the metric through Terraform. Currently, we validated by creating the manually / sdk and the log based alert policy through Terraform. Please notify when available..
Thanks,
Raj

@ghost
Copy link

ghost commented Jun 3, 2019

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators Jun 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants