nodejs-monitoring icon indicating copy to clipboard operation
nodejs-monitoring copied to clipboard

Can I use conditionMatchedLog?

Open bayerlse opened this issue 2 years ago • 1 comments

Hey there!

I'm trying to create an alertPolicy via AlertPolicyServiceClient and its createAlertPolicy method. If I include the conditionMatchedLog as condition key, i'm getting the error:

{"code":3,"details":"Field alert_policy.conditions[0].condition_case had an invalid value of \"0\": Condition subtype (e.g. \"condition_absent\",\"condition_threshold\", etc.) is absent or unknown.","metadata":{}}

But in the documentation https://cloud.google.com/logging/docs/alerting/log-based-alerts#lba-by-api it sounds like it should be possible.... Am I missing something?

Thanks in advance,

Sebi

bayerlse avatar Mar 07 '22 16:03 bayerlse

👋 I'd also like to use a conditionMatchedLog in the IAlertPolicy's ICondition.

I'm currently using npm's "@google-cloud/monitoring": "^3.0.0", which appears to be the latest release.

Any sense of if/when this will be added to the node sdk?

Thanks.

ogrubes avatar Jul 21 '22 23:07 ogrubes

Hi there! We're migrating this repo over to googleapis/google-cloud-node, and closing any stale questions. Please feel free to reopen over there if it's still giving you trouble! Thank you!

sofisl avatar Nov 10 '22 22:11 sofisl