The key problem is that ordinary users need to learn PromQL, even if grafana is provided, the cost of promql learning cannot be reduced.
It is not easy for everyone to learn PromQL. Kind regards, Allenzh li 在2020年12月9日星期三 UTC+8 下午4:21:24<Stuart Clark> 写道: > On 09/12/2020 06:50, Allenzh li wrote: > > When create a prometheus alerting rule, the promql is a bit > > complicated for ordinary users. > > > > Since I want to hide native promql expr and labels, ordinary users > > only select some metric name or labels in a web page then can create a > > alerting rule. > > > > Is there any best practice? > > > I would be cautious about hiding PromQL. You could create a simple web > page for some types of very basic alerts quite easily, for example a > very simple fixed threshold for a single metric, but in reality those > sort of rules are rarely very common. > > One of the big advantages of Prometheus above other systems is the more > expressive query language, which allows for much more useful alerting > rules. > > Common alerting rules might contain calculations (e.g. a ratio between > metrics), multiple metrics (e.g. comparing a value in two parts of the > system), aggregation (sum or sum_over_time) and rates (increase, rate, > predict_linear). It would be very difficult to represent such queries > via a web page, other than allowing for a text box input. > > However, there can be advantages of some extra help via an interface. > Grafana for example allows you to quickly find metrics and gives instant > visualisation as you write your query. > > -- You received this message because you are subscribed to the Google Groups "Prometheus Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/8a6edcf4-b6a2-4717-b7d3-54b2ef77ae9an%40googlegroups.com.

