用于更新策略的 Stackdriver API
我想使用带有GCLOUD的监视器API更新StackDriver警报策略。我遇到了这个条件的错误。我基本上是在尝试添加一个过滤器以摆脱/Dev/loop.*设备。任何帮助将不胜感激。
gcloud alpha监视策略更新项目/projectNameID/alertpolicies/policynumberxxx/prencys/enditionnumberxxx \ -condition-filter ='metric.type =“ agent.googleapis.com/disk/percent_used” and resource.type =“ gce_instance”'metric.label。“ device”!= monitoring.regex.regex.regex.full_match/dev/dev/loop/dev/loop/loop/loop/loop/loop 。
I would like to update a stackdriver alert policy using the monitor api with gcloud. I'm getting an error for the condition. I'm basically trying to add a filter to get rid of /dev/loop.* devices. Any help would be very appreciated.
gcloud alpha monitoring policies update projects/projectnameID/alertPolicies/policynumberxxx/conditions/conditionnumberxxx \
--condition-filter='metric.type="agent.googleapis.com/disk/percent_used" AND resource.type="gce_instance"' metric.label."device"!=monitoring.regex.full_match "/dev/loop.*"
I can do this via the GUI but some legacy policies will only update via API calls.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论