Spring cloud security services combat micro -7-5 charts and alarm configuration grafana

First over what grafana profile

grafana profile.



Right-address services, such as the sender account number and surface

configured to be connected to the prometheus.

Login password is the number, the second line is not allowed to registered users.

dashboard.json inside too much content can not fully understand.

interface

admin password




to create a new dashboard



to import a previously already written up.


Dashboard.jsn find that we just look at the document

that we just configured in the profile data source. Is that the local prometheus 9090



duratin: average response time of service,

above are some of the filter conditions

Set the alarm

When something goes wrong, you can let me know.

Inside method throws an exception.

Start again OrderAPI
tool write a test to test, we stop to call it, then it would have been an error. Then there grafana configuration, what kind of hit frequency error triggers an alarm.







This test class ran up.

In this way he has been given 500,

Configuration grafana

可以看到5xx的错误 一直在增长。

争对这个情况配置一个报警。notification channels 通知的渠道。



报警的方式,支持很多种方式


证明我们测试的邮件发出去了。然后点击Save保存即可

一分钟之前收到的邮件。



查看最近15分钟,10秒的刷新频率。

改完再保存一下






这和就是之前介绍的promethous的查询语言,就是定义了一个怎么计算我当前错误的数据。



找的是状态是5开头的

我们要写的报警








这里改成application-app




这样这边 就不报错了。看过去一分钟总的错误数量,大于1就报警

选择通知的渠道。刚才我们在notification channels 配置的渠道。



等了一会。裂开的红心。

触发的报警的历史记录


收到邮件的内容。

面板的定义

面板就是这个几千行的json定义出来的


也可以通过可视化的界面去加panel




 

结束



 

Guess you like

Origin www.cnblogs.com/wangjunwei/p/12003955.html