[英]How to calculate percentage in grafana datasource elastic
Need your help,需要你的帮助,
currently I have value elastic data sample like below :目前我有如下价值弹性数据样本:
Completed : 100
Declined : 20
Canceled : 5
How to create percentage success rate result with above condition in grafana with formula :如何使用公式在grafana 中创建具有上述条件的百分比成功率结果:
Completed / ( Completed + Declined + Canceled )已完成 /(已完成 + 已拒绝 + 已取消)
expected result :
success rate : 99,13 %
Need your feedback please, thanks.需要您的反馈,谢谢。
A solution could be done by the plugin grafana-meta-queries which provided a way to made arithmetic operations with a mix of result of request made in grafana.一个解决方案可以通过插件grafana-meta-queries来完成,它提供了一种方法来进行算术运算,并混合在 grafana 中提出的请求结果。
B['Completed'] / (C['Declined']+B['Completed'] +D['Canceled']) B['已完成'] / (C['拒绝']+B['已完成'] +D['已取消'])
I've tried the solution with grafana 7.3.4 and elastic-oss 7.9.1 and the latest version of plugin and this works.我已经尝试过使用 grafana 7.3.4 和 elastic-oss 7.9.1 以及最新版本的插件的解决方案,并且有效。
Here a screen shot of a the panel set :这是面板集的屏幕截图:
The alert engine publishes some internal metrics about itself.警报引擎会发布一些关于自身的内部指标。 You can read more about how Grafana publishes internal metrics.您可以阅读有关 Grafana 如何发布内部指标的更多信息。
Total number of alerts counter alerting.active_alerts
Alert execution result counter alerting.result
Notifications sent counter counter alerting.notifications_sent
Alert execution timer timer alerting.execution_time
also find info at https://grafana.com/docs/grafana/latest/alerting/还可以在https://grafana.com/docs/grafana/latest/alerting/找到信息
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.