Skip to content

Commit 1bf5488

Browse files
committed
fix: es https
1 parent cca8813 commit 1bf5488

File tree

4 files changed

+362
-3
lines changed

4 files changed

+362
-3
lines changed

doc/readme/conf-es.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
- 支持 ES 7.x 和 8.x 版本。(ES 从 v7 到 v8 有一些变化,但主要的 API 设计上是保持兼容的。)
66
- 索引根据年月动态创建 `prometheusalert-YYMM`(如prometheusalert-202112)
7+
- 支持 ES HTTPS。
78

89
<br/>
910
<br/>
@@ -19,6 +20,8 @@ alert_to_es=0
1920
to_es_url=http://localhost:9200
2021
# 多个地址
2122
# to_es_url=http://es1:9200;http://es2:9200;http://es3:9200
23+
# 多个 https 地址,程序里会跳过 https 证书检查
24+
# to_es_url=https://es1:9200;https://es2:9200;https://es3:9200
2225
2326
# 是否有认证,es用户和密码, 无认证则不需要填写。
2427
# to_es_user=username

go.mod

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ require (
77
github.com/aliyun/alibaba-cloud-sdk-go v1.62.771
88
github.com/astaxie/beego v1.12.3
99
github.com/baidubce/bce-sdk-go v0.9.183
10+
github.com/elastic/go-elasticsearch/v7 v7.17.10
1011
github.com/go-gomail/gomail v0.0.0-20160411212932-81ebce5c23df
1112
github.com/go-sql-driver/mysql v1.8.1
1213
github.com/go-telegram-bot-api/telegram-bot-api/v5 v5.5.1
1314
github.com/lib/pq v1.10.9
1415
github.com/mattn/go-sqlite3 v2.0.3+incompatible
15-
github.com/olivere/elastic/v7 v7.0.32
1616
github.com/prometheus/client_golang v1.19.1
1717
github.com/robfig/cron/v3 v3.0.1
1818
github.com/smartystreets/goconvey v1.8.1
@@ -40,11 +40,9 @@ require (
4040
github.com/jcmturner/gokrb5/v8 v8.4.4 // indirect
4141
github.com/jcmturner/rpc/v2 v2.0.3 // indirect
4242
github.com/jmespath/go-jmespath v0.4.0 // indirect
43-
github.com/josharian/intern v1.0.0 // indirect
4443
github.com/json-iterator/go v1.1.12 // indirect
4544
github.com/jtolds/gls v4.20.0+incompatible // indirect
4645
github.com/klauspost/compress v1.17.8 // indirect
47-
github.com/mailru/easyjson v0.7.7 // indirect
4846
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
4947
github.com/modern-go/reflect2 v1.0.2 // indirect
5048
github.com/opentracing/opentracing-go v1.2.1-0.20220228012449-10b1cf09e00b // indirect

0 commit comments

Comments
 (0)