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

字符串模板如何截取或是转换类型 #425

Open
BadMan008 opened this issue Aug 12, 2024 · 0 comments
Open

字符串模板如何截取或是转换类型 #425

BadMan008 opened this issue Aug 12, 2024 · 0 comments

Comments

@BadMan008
Copy link

"commonAnnotations": {
"alerting_rule_type": "vmp/PromQL",
"alerting_rule_query": "{"AlertingID":"0445bd68-a6d4-a504e5852b34","PromQL":"1 - (es_fs_path_available_bytes{cluster=\\"control-plane-cluster\\"} / es_fs_path_total_bytes{cluster=\\"control-plane-cluster\\"})\\n","WorkspaceID":"c4ca4238a0dcc509a6f75849b"}",
"alerting_rule_levels": "[{"AlertingRuleID":"0445bd68-a6d4-a504e5852b34","Level":"P1","For":"0s","Comparator":"\\u003e","Threshold":0.5}]"
}

标签commonAnnotations.__alerting_rule_query__是 json 格式的字符串,没办法commonAnnotations.alerting_rule_query.AlertingID提取到自字段值。
请问有没有办法进行字符串转 json,进行commonAnnotations.__alerting_rule_query__值的拆分

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

No branches or pull requests

1 participant