Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Kibana log alarm

2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

1. Download the appropriate version of sentinl

Wget https://github.com/sirensolutions/sentinl/releases/download/tag-6.6.1/sentinl-v6.6.1.zip

2.kiban integrated installation plug-in

Kibana-plugin install file:///home/cloud/software/sentinl-v6.6.1.zip

3. Configure Mail

Sentinl: settings: email: active: true user: l username password: mailbox client authorization code host: smtp.exmail.qq.com ssl: true port: 465timeout: 10000

4. Restart kibana

Systemctl restart kibana

5.kibana Settin

6. View advanced configuration

{"actions": {"email_html_alarm_76b83c8f-0f4a-4db5-8a15-185933e17ca2": {"name": "Project credit-manager log alarm", "throttle_period": "2m", "email_html": {"stateless": false, "subject": "Project credit-manager log alarm", "priority": "medium", "html": "

Hi {{watcher.username}}

\ n

There are {{payload.hits.total}} results found by the watcher {{watcher.title}}.

\ n\ n

This watcher sends alerts based on the following criteria:

\ n {{watcher.wizard.chart_query_params.queryType}} of {{watcher.wizard.chart_query_params.over.type}} over the last {{watcher.wizard.chart_query_params.last.n}} {{watcher.wizard.chart_query_params.last.unit}} {watcher.wizard.chart_query_params.threshold.direction}} {{watcher.wizard.chart_query_params.threshold.n}} in index {{watcher.wizard.chart_ Query_params.index}}\ n\ n exception information is as follows:\ n {{# payload.hits.hits}} {{_ source.message}\ n\ n\ n {/ payload.hits.hits}}\ n " "to": "w67307788@163.com", "from": "lii@linccc.com"}, "Webhook_f3303006-a643-42f6-a2ff-8d4066d18c3a": {"name": "Project credit-manager log alarm", "throttle_period": "2m", "webhook": {"priority": "medium", "stateless": false "method": "POST", "host": "oapi.dingtalk.com", "port": "443", "path": "/ robot/send?access_token=token", "body": "{\ r\ n\" msgtype\ ":\" markdown\ " \ r\ n\ "at\": {\ r\ n\ "isAtAll\":\ "True\"\ r\ n},\ r\ n\ "markdown\": {\ r\ n\ "title\":\ "exception message\" \ r\ n\ "text\":\ "credit-manager project exception log:\\ n {{payload.hits.hits}} {{_ payload.hits.hits}\ r\ n\ n\"\ r\ n}\ r\ n}, "params": {"watcher": "{{watcher.title}}" "payload_count": "{{payload.hits.total}}"}, "headers": {"Content-Type": "application/json"}, "message": "credit-manager project production environment exception", "use_https": true} "input": {"search": {"request": {"index": ["credit-manager-*"] "body": {"query": {"bool": {"must": {"match": {"message": "ERROR"}} "filter": {"range": {"@ timestamp": {"gte": "now-3m/m", "lte": "now/m" "format": "epoch_millis"}, "size": 2, "aggs": {"dateAgg": {"date_histogram": {"field": "@ timestamp" "time_zone": "Asia/Shanghai", "interval": "1m", "min_doc_count": 1}}, "condition": {"script": {"script": "payload.hits.total > = 1"} "trigger": {"schedule": {"later": "every 1 minutes"}}, "disable": false, "report": false, "title": "credit-manager project alarm", "wizard": {}, "save_payload": false, "spy": false, "impersonate": false}

Test:

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report