Commit Graph

694 Commits

Author SHA1 Message Date
Ulric Qin cddc99981d modify perm of read tasks 2022-02-26 12:00:08 +08:00
zheng 01f1f50880
限制timestamp不能大于当前时间5分钟 (#872) 2022-02-18 19:17:28 +08:00
Ulric Qin 8664c3df37 refactor 2022-02-18 16:29:49 +08:00
eshun f009c43878
add windows support (#867)
* add windows support

* add windows support

* add windows support

Co-authored-by: 78552423@qq.com <chenyz0812>
2022-02-18 15:55:00 +08:00
Ulric Qin f8482601a8 Merge branch 'main' of github.com:didi/nightingale 2022-02-17 19:29:51 +08:00
Ulric Qin 8c4ab88888 return all busi-groups when subscribe 2022-02-17 19:28:35 +08:00
张哲铭 37421dd56a
兼容使用pg数据库,contacts字段json格式无法转换的问题 (#868) 2022-02-15 17:58:33 +08:00
UlricQin d31fe9cb71 modify user-groups query limit 2022-02-11 13:05:20 +08:00
UlricQin bd762172d4 add space in error log 2022-02-10 17:54:52 +08:00
UlricQin b32a7b3a9e add global callback 2022-02-10 17:32:06 +08:00
UlricQin 3ccc09674e query user-groups 2022-02-10 15:45:38 +08:00
UlricQin 9beef8f36a add last_sent_time for alert_cur_event 2022-01-29 13:46:10 +08:00
UlricQin 2e63993b7f fix 2022-01-29 11:08:32 +08:00
UlricQin b482c7a076 recover_duration done 2022-01-29 11:01:44 +08:00
Ulric Qin 598ae07fc2 add feature: recover_duration 2022-01-26 08:59:30 +08:00
Ulric Qin e5d7612af9 n9e-server support basic auth for Reader 2022-01-21 23:34:25 +08:00
UlricQin f3924dab5b delete pendings when recoverRule 2022-01-12 13:50:29 +08:00
UlricQin 7f4cb3888f support falcon datamodel 2022-01-11 11:25:03 +08:00
UlricQin 120c2fe52a fix proxy Host header 2022-01-10 20:16:44 +08:00
UlricQin b9c674d662 prometheus proxy add Header Host 2022-01-08 19:40:43 +08:00
Ulric Qin dcee4677ed Merge branch 'main' of github.com:didi/nightingale 2022-01-08 17:52:42 +08:00
Ulric Qin d590f6d5c1 enable_in_bg logic 2022-01-08 17:52:29 +08:00
UlricQin 850a370f9d add targets apis 2022-01-06 11:48:30 +08:00
UlricQin 40e7ede5e3 Merge branch 'main' of github.com:didi/nightingale 2022-01-04 16:47:15 +08:00
UlricQin 9a2257dd1e ldap user default role configuration 2022-01-04 16:47:03 +08:00
Ulric Qin b693e80d75 check basicauth 2021-12-31 12:07:23 +08:00
Ulric Qin e9ce679649 handle python2 encoding 2021-12-31 11:13:57 +08:00
Ulric Qin a56d6b568b refactor log print 2021-12-30 09:37:52 +08:00
Ulric Qin 904d09d91c add datadog deflate encoding 2021-12-29 14:59:05 +08:00
Ulric Qin 3700f7a10b update datadog url 2021-12-29 14:52:22 +08:00
Ulric Qin d57415d23d add datadog receiver 2021-12-28 11:00:48 +08:00
Ulric Qin 06eca94492 add datadogSeries 2021-12-27 13:30:45 +08:00
Ulric Qin 74e4724e66 delete no use code: repeater.go 2021-12-23 22:54:37 +08:00
Ulric Qin 1ea8694769 refactor fireEvent 2021-12-23 22:43:18 +08:00
Ulric Qin 218140066b fix r.rule.NotifyRepeatStep unit 2021-12-23 22:26:53 +08:00
Ulric Qin 837cfab1bd refactor repeater 2021-12-23 22:19:49 +08:00
Ulric Qin 3428b11ea8 configuration for metrics.yaml and templates 2021-12-23 12:53:32 +08:00
Ulric Qin 49176ae240 support grafana-agent 2021-12-16 17:58:49 +08:00
Ulric Qin 8eb4a39e7d fix index out of range 2021-12-16 17:07:27 +08:00
Ulric Qin 0f65a1f5dd add remote write api support 2021-12-16 16:59:51 +08:00
Ulric Qin a71edc4040 extract IamLeader function and fix repeat 2021-12-15 20:52:00 +08:00
Ulric Qin 23b6cf1a68 fix repeat sender 2021-12-15 19:37:55 +08:00
Ulric Qin 0f3bbf6368 use NotifyRepeatNext as TriggerTime when repeat notify 2021-12-15 18:37:48 +08:00
Ulric Qin caa33c29e9 refactor creating busi group 2021-12-13 11:12:49 +08:00
Ulric Qin d5050338f3 use last_eval_time for filter 2021-12-11 18:14:23 +08:00
Ulric Qin 7f0877bf28 add table column: last_eval_time in alert_his_event 2021-12-11 18:07:01 +08:00
Ulric Qin d4c4257517 code refactor for i18n when occur duplicate tagkey 2021-12-11 17:25:45 +08:00
Ulric Qin 61f76afa0d handle duplicate tagkey 2021-12-11 17:23:18 +08:00
Ulric Qin 5634f48725 remove perm of targets 2021-12-10 09:49:11 +08:00
Ulric Qin 964d50b4e7 add perm function in routers 2021-12-10 09:44:06 +08:00
Ulric Qin d2cb48a2ef remove writer name 2021-12-09 23:07:45 +08:00
Ulric Qin 53411dc5d9 add perm 2021-12-09 22:08:22 +08:00
Ulric Qin cab6089a37 add perm control busi-group adding 2021-12-09 22:04:16 +08:00
Ulric Qin 32fea64f3e use configuration file to control AnonymousAccess 2021-12-09 16:59:02 +08:00
Ulric Qin aa2e5f15ee update recover event 2021-12-08 22:31:48 +08:00
Ulric Qin ed5e93f373 modify event url 2021-12-08 21:36:21 +08:00
Ulric Qin 48247ea7fe At least one team have rw permission 2021-12-08 13:18:53 +08:00
Ulric Qin 12a5f335bd get event detail no need login 2021-12-08 10:04:31 +08:00
Ulric Qin 5e19eadd61 add recover_time only when IsRecovered 2021-12-08 00:17:42 +08:00
Ulric Qin 0e88f0074c add recover_time 2021-12-08 00:07:25 +08:00
Ulric Qin 2bfc67686d refactor alert_subscribe.user_group_ids 2021-12-07 19:33:39 +08:00
Ulric Qin 4f8fedbaa0 delete no use code 2021-12-07 13:44:14 +08:00
Ulric Qin b108c9f11a refactor: The business group must retain at least one team 2021-12-06 21:33:36 +08:00
Ulric Qin bef8e8e548 bugfix: handle rule judge 2021-12-06 18:44:56 +08:00
Ulric Qin 88063cd30e bugfix: callback ibex 2021-12-06 18:20:44 +08:00
Ulric Qin a94a602d4f remove jwtAuth in prom api 2021-12-06 15:18:56 +08:00
UlricQin df97166f07 add api: check perm 2021-12-05 20:40:13 +08:00
UlricQin b418dec3ab bugfix: event mute 2021-12-04 12:07:30 +08:00
UlricQin 79401183ca bugfix 2021-12-02 17:37:42 +08:00
UlricQin 270d3b7e5b code refactor 2021-12-02 17:34:54 +08:00
UlricQin 4e3f9914f1 use i18n error when import rules and dashboards 2021-12-02 10:19:10 +08:00
UlricQin dd8e1f2d71 add api: /api/n9e/version 2021-12-01 16:46:37 +08:00
UlricQin 11e7c41908 add EngineDelay 2021-12-01 14:09:08 +08:00
UlricQin 57c2fd9b73 update jwt 2021-12-01 11:40:49 +08:00
UlricQin dc9fe38735 modify args: hours->days 2021-12-01 11:26:44 +08:00
UlricQin 622d4ac165 refactor 2021-12-01 10:14:35 +08:00
Ulric Qin 3090e13be7 verify tpl tags modify 2021-11-30 18:16:09 +08:00
UlricQin f96a36aa43 bugfix 2021-11-30 14:25:02 +08:00
UlricQin 6ad24419ab engine wait 2min 2021-11-30 12:33:37 +08:00
UlricQin 04319a6b41 add /v1/n9e/users 2021-11-30 11:57:55 +08:00
UlricQin 952f6b139d add api: get one alert-subscribe 2021-11-30 11:49:08 +08:00
UlricQin d43067bad4 bugfix 2021-11-29 20:06:45 +08:00
UlricQin c17ade64e1 bugfix 2021-11-29 19:56:36 +08:00
UlricQin 4ddbba1400 bugfix 2021-11-29 15:36:15 +08:00
UlricQin 6e3ad3dd6b version 5.1 2021-11-28 18:57:49 +08:00
qinyening 4e6e70c14d
release v5.0.0-rc1 (#708)
* release v5.0.0-rc1
2021-06-28 00:42:39 +08:00
710leo 18b9fb3ee2 add some log 2021-06-25 11:46:34 +08:00
710leo 02f2554cc1 fix: nodata repeated recovery alerting 2021-06-22 23:11:55 +08:00
stonelgh 07961c9f21
m3db: fix Errorf calls (#703) 2021-06-21 15:06:44 +08:00
wjkxiaowu f770b3cf14
add system env when plugin run (#699)
Co-authored-by: root <root@localhost.localdomain>
2021-06-15 11:13:51 +08:00
yubo 37abf19f0d
add m3db client timeout check (#693) 2021-05-31 15:35:00 +08:00
710leo bbbd7faeb1 bugfix: user and team info cache 2021-05-27 20:55:47 +08:00
710leo a73f2654df bugfix: aggr output and alert 2021-05-27 00:46:21 +08:00
710leo 22f0aee55d add event write perm check 2021-05-25 17:54:09 +08:00
710leo 01420ff1d8 optimize user information filling 2021-05-16 17:42:53 +08:00
710leo c4b5d13348 optimize user information filling 2021-05-16 15:42:30 +08:00
hubo 9cf2d47eef
agent 增加默认tags功能, agent 增加正则匹配磁盘挂载类型过滤功能 (#683)
* agent 增加默认tags功能, agent 增加正则匹配磁盘挂载类型过滤功能

* agent 增加默认tags功能, agent 增加正则匹配磁盘挂载类型过滤功能

Co-authored-by: huboc <huboc@zbj.com>
2021-05-08 19:17:01 +08:00
Paul Chu a9d6d6f820
支持节点迁移 (#680)
* enable promethues summary

* ADD: 添加节点迁移的方法

* FIX: node move session commit

* ADD: 注册迁移节点的接口

* MOD: fix error handle

Co-authored-by: zhupeiyuan <zhupeiyuan@fenbi.com>
2021-05-07 11:10:05 +08:00
Ulric Qin f70d303942 fix http_response compile error 2021-05-06 17:00:18 +08:00
peng19940915 1112186d1c
新增postgresql监控 (#671)
* add postgresql & remove http_response status_code tag

* add postgresql & remove http_response status_code tag

Co-authored-by: leiyupeng <susu898287771@>
2021-04-27 23:16:07 +08:00
yubo f40332f197
bugfix: add user.Type (#667) 2021-04-26 19:15:33 +08:00
joyexpr 41efc66d25
fix: send mail not work(wrong notifyType and subject) (#660) 2021-04-19 23:57:20 +08:00
710leo d49d40768c organize configuration 2021-04-19 21:28:02 +08:00
710leo c71264ab30 fix send message 2021-04-19 20:10:29 +08:00
710leo bb64a2f1ec support static files 2021-04-16 19:21:02 +08:00
710leo 3f0dfd63d4 support static files 2021-04-15 21:23:59 +08:00
710leo 46f7ec7af9 complete version information 2021-04-15 19:35:25 +08:00
yubo 999c1b4239
bugfix: use InviteMustGet instead of InviteGet (#654)
* add fmt import
2021-04-14 20:57:27 +08:00
yubo f6b2535cdb
bugfix: use InviteMustGet instead of InviteGet (#653) 2021-04-14 12:48:26 +08:00
yubo 5f1c868006
feature: logout when the user is invalidated (#652) 2021-04-13 14:33:21 +08:00
qinyening 59366e4d3a
发布v4版本 (#651)
* init
2021-04-13 11:38:40 +08:00
710leo eed2f073a0 Merge branch 'master' of https://github.com/didi/nightingale 2021-04-09 15:34:06 +08:00
710leo 31a03aa331 alert event modify filling user detail 2021-04-09 15:33:52 +08:00
yubo 71984c72b5
feature: add password changed notify (#647)
* feature: add password changed notify
2021-04-09 11:21:09 +08:00
yubo 72573e32cb
feature: add get self permissions by nodeID (#643) 2021-04-07 13:12:00 +08:00
chixianliangGithub 50f4cc10c4
去除重复代码 (#641) 2021-04-03 16:00:32 +08:00
yubo 1ff6d0a2dc
feature: add [start,end) param for clude, endpointMetric, endpoints api (#639) 2021-03-30 18:10:14 +08:00
yubo 92ac8b09c0
prober plugin use `all` mode as default (#634) 2021-03-26 11:17:31 +08:00
Paul Chu 384e993ca1
enable promethues summary (#630) 2021-03-24 16:08:42 +00:00
yubo c1241fdfbc
bugfix: created_at -> create_at for rdb.user table (#632) 2021-03-24 19:10:01 +08:00
yubo be9d6ac660
use logger.Warning instead of fmt.Printf at loading plugins (#629) 2021-03-23 18:37:03 +08:00
yubo 30b469ddbd
add subject for rdb rst-code/login-code mail (#628) 2021-03-22 17:27:01 +08:00
yubo 111c6fc1bf
feature: support node event notify with webhook (#627)
* feature: support node event notify with webhook
2021-03-19 13:06:41 +08:00
710leo 0cd2761021 Merge branch 'master' of https://github.com/didi/nightingale 2021-03-19 11:12:41 +08:00
710leo 0a7c8988c6 stra add user group detail 2021-03-19 11:12:32 +08:00
UlricQin 7947533182 monapi support new timestamp 2021-03-19 10:48:40 +08:00
710leo 184c39d311 add some audit log 2021-03-18 21:22:50 +08:00
UlricQin d89eaec596 bugfix: GetTeamsNameByIds 2021-03-18 10:03:20 +08:00
yubo 40ce0d75ed
prettify msg (#620) 2021-03-17 11:57:30 +08:00
ning1875 61bd28db31
日志采集字段变更 whether_attache_one_log_line--> whether_attach_one_log_line (#619)
* m3db writetagged应该并发做,不然会导致transfer rpc变慢

* go func指针传参问题

* 新增k8s-mon三个大盘文件

* 新增k8s-mon三个大盘文件

* 修改k8s-mon三个大盘文件

* 日志采集新增带上最后一条日志 到extra字段中,为后续报警做准备

* 日志采集字段变更 whether_attache_one_log_line--> whether_attach_one_log_line

* 日志采集带上日志
2021-03-15 16:03:02 +08:00
710leo b1426945d4 fix agent proc.cpu.util 2021-03-13 18:21:21 +08:00
ning1875 dec9097ce7
transfer写m3db出错时打印metric信息帮助定位 (#615)
* m3db writetagged应该并发做,不然会导致transfer rpc变慢

* go func指针传参问题

* 新增k8s-mon三个大盘文件

* 新增k8s-mon三个大盘文件

* 修改k8s-mon三个大盘文件

* transfer写m3db出错时打印metric信息帮助定位
2021-03-13 13:21:05 +08:00
ning1875 7bb93e8351
日志采集新增带上最后一条日志 到extra字段中,为后续报警做准备 (#614)
* m3db writetagged应该并发做,不然会导致transfer rpc变慢

* go func指针传参问题

* 新增k8s-mon三个大盘文件

* 新增k8s-mon三个大盘文件

* 修改k8s-mon三个大盘文件

* 日志采集新增带上最后一条日志 到extra字段中,为后续报警做准备
2021-03-13 13:19:45 +08:00
alick-liming 7a84223d5b
Aggr lanteness (#611)
* aggr lateness

* default value

* test

* test

Co-authored-by: alickliming <alickliming@didiglobal.com>
2021-03-12 15:10:42 +08:00
yubo 398628870c
bugfix: add prober.plugins Stop() for release resource (#610) 2021-03-11 16:22:55 +08:00
yubo 3e426537c7
add maxSeriesPoints for config.transfer.m3db (#609) 2021-03-10 17:50:38 +08:00
HONG YANG bf1bd3ef5a
“massage” (#603) 2021-03-10 17:36:58 +08:00
yubo b85b1e44ef
bugfix: auth password history size (#607) 2021-03-10 17:35:12 +08:00
yubo ff194c0382
add sample.out for mysql & redist (#605) 2021-03-09 19:10:40 +08:00
stiei13wangluo bd72a773f4
telegraf dns_query plugins (#601)
* dns_query

* dns_query

Co-authored-by: root <root@localhost.localdomain>
2021-03-05 11:54:13 +08:00
yubo 22dc5c909c
feature: add dryrun for collect_rule add/update (#599)
* feature: add dryrun for collect_rule add/update

* ignore sso when it is disable
2021-03-04 17:35:40 +08:00
Feng_Qi acaa88f1a9
add ping/net_response/http_response support (#594)
* fix port check and push debug log

1:如果服务没有监听在 0.0.0.0 上,而是监听在特定地址上的话,在 127.0.0.1 上无法检测到端口。修改为如果 127.0.0.1 检测不到话,在 identity 的地址上再检测一次。
2. http push 部分缺乏 debug 日志,把 debug log 改到 push 里面以补全。

* Update cron.go

* notify add resource name and note

* Update notify.go

* Update notify.go

修复一个当 name/note 为空值且 resource 只有一台时, 由于被 config.Set 清空
因此获取下标 index out of range 导致 panic 的 bug

* add ping, net_response, http_response plugin

增加
ping
net_response
http_response
的插件支持

* Update all.go

* add example config yml

* Update notify.go
2021-02-28 07:56:35 +08:00
yubo 005dc47868
fix: https://github.com/didi/nightingale/issues/583 (#590) 2021-02-25 15:37:35 +08:00
yubo 9c1c894e29
feature: support dlopen for prober plugin (#588) 2021-02-23 18:04:03 +08:00
yubo b055bc73c5
add a demo plugin for prober (#586)
* add a demo plugin for prober

* update demo plugin
2021-02-23 11:41:38 +08:00
yubo 322cbf27dc
use testhttp instead of http for ut (#585)
* use testhttp instead of http for ut
* bugfix: add username check
2021-02-22 11:25:02 +08:00
UlricQin 417a13c1be bugfix: judge: redis conn pools 2021-02-07 17:07:00 +08:00
yubo 66c93f472a
update vendor for local_build (#578) 2021-02-03 19:10:19 +08:00
710leo 023b23a0ef fix build monapi 2021-02-03 17:01:54 +08:00
710leo 900896c045 add sync stra log 2021-02-03 16:55:14 +08:00
yubo db97453c54
build error fix: replace grpc to 1.29.1 (#577) 2021-02-03 16:42:27 +08:00
sun763625521 3fdd61edfc
新增rabbitmq、haproxy组件采集 (#575)
* add

* add prober plugin for rabbitmq

* add prober plugin for haproxy

Co-authored-by: root <root@localhost.localdomain>
Co-authored-by: UlricQin <ulric.qin@gmail.com>
2021-02-03 15:02:48 +08:00
yubo e839c6bd6b
bugfix: update session param has a mistake (#576)
* add cache counter for login part.1

* add login counter api

* feature: prober support multi-metric with different tags

* bugfix: session counter reset

* add models.stats for counter

* bugfix: update session param has a mistake
2021-02-03 15:00:14 +08:00
lynxcat 2d9bc50401
新增zookeeper,tengine采集 (#574)
* add prober plugin for elasticsearch

* 新增zookeeper,tengine插件,补齐了prober采集插件的测试

* 添加zookeeper插件描述

Co-authored-by: lynxcat <lynxcatdeng@gmail.com>
2021-02-03 14:43:39 +08:00
qinyening c48d8b93dd
add some permssion api (#572) 2021-02-03 11:01:29 +08:00
alick-liming e2e96a04d1
权限调整 (#571) 2021-02-02 14:03:05 +08:00
yubo c724896ecd
adjust session GC interval (#569)
* keep at least 4 history passwords

* adjust gc time for session
2021-02-01 23:29:38 +08:00
Ulric Qin 3663ed0235 uniq res bindings 2021-01-31 10:52:04 +08:00
yubo 7fa84af66a
add session get api (#566) 2021-01-31 10:48:37 +08:00
yubo 3754e0cbe3
remove local telegraf plugins.inputs (#563) 2021-01-29 23:49:48 +08:00
lynxcat 3df2536bb6
add prober plugin for elasticsearch (#562)
Co-authored-by: lynxcat <lynxcatdeng@gmail.com>
2021-01-29 23:47:50 +08:00
yubo fbf4544849
add accumulator for prober & generate default plugin config (#560)
* add accumulator for prober & generate default plugin config

* add prometheus plugin

* add prober plugin test util
2021-01-29 08:26:28 +08:00
lynxcat 2d4e6bb8da
prober nginx 采集插件 (#557)
* add a method to get the Endpoint

* 增加nginx插件,修改control。支持./control build prober job这种多个参数

* 修改提示

Co-authored-by: lynxcat <lynxcatdeng@gmail.com>
2021-01-28 17:23:46 +08:00
UlricQin 679c5892a4
Revert "add Prometheus as a plugin for prober (#556)" (#558)
This reverts commit 1dac755787.
2021-01-27 23:51:42 +08:00
yubo 1dac755787
add Prometheus as a plugin for prober (#556)
* update changelog

* add prometheus as a plugin for prober

* bugfix: add counter type for summary & histogram

* ignore summary, histogram for prometheus plugin
2021-01-27 23:47:53 +08:00
yubo afa95f79cd
update changelog (#552) 2021-01-26 18:13:42 +08:00
yubo 8fe3457e0a
support anonymous struct field for monapi.plugins.template (#547)
* move get collectrule api from /api/mon to /v1/mon

* support anonymous struct field for monapi.plugins.template

* add tls with mysql, redis and mongodb

* add rdb.user.pwdExpiresAt
2021-01-25 20:43:15 +08:00
alick-liming 7bfd60be86
资源排行去掉内置租户 (#544)
Co-authored-by: alickliming <alickliming@didi.global.com>
2021-01-25 10:28:40 +08:00
yubo 66e2dc73f9
remove prober RPC.port from config (#543)
* remove prober rpc.port from yml config

* remove prober.config.rpcPort && add prober.plugins.config.metrics checker
2021-01-24 14:09:08 +08:00
Ulric Qin 9c945b33fb is tag value is blank, use nil instead 2021-01-23 14:08:44 +08:00
yubo c53a66d20e
remove sql.mon.collect_rule.created (#542) 2021-01-23 13:28:45 +08:00
Ulric Qin 122590265d ignore EOF error 2021-01-23 10:59:57 +08:00
lynxcat aab2f8b090
add a method to get the Endpoint (#540)
Co-authored-by: lynxcat <lynxcatdeng@gmail.com>
2021-01-23 08:50:36 +08:00
shaojie f0a4c130f6
后端日志格式更改 (#539) 2021-01-23 08:06:02 +08:00
yubo 029f0a09ba
bugfix: return err when unable to get monapi.collectRule (#537) 2021-01-22 17:39:02 +08:00
yubo 8fe3d2b0b3
bugfix: replace ref with instantiated variable for prober.rules.updatedAt (#536)
* add mon.plugins.redis descriptions

* bugfix: add region field for instances/heartbeat

* bugfix: replace ref with instantiated variable for prober.rules.updatedAt
2021-01-22 16:20:07 +08:00
710leo 2f87121e27 fix typo 2021-01-21 20:23:13 +08:00
710leo b72e2d3fe0 Merge branch 'master' of https://github.com/didi/nightingale 2021-01-21 20:18:48 +08:00
710leo 4119414079 add tree search by user 2021-01-21 20:18:16 +08:00
yubo d640d86160
add mon.plugins.redis descriptions (#529)
* add mon.plugins.redis descriptions

* bugfix: add region field for instances/heartbeat
2021-01-21 16:35:31 +08:00
qinyening 6a70bed30f
modify proc info collect (#528) 2021-01-21 00:38:18 +08:00
yubo 91503cfd25
update template document for mysql,mongo and redis (#526)
* update mysql document

* update template document for mysql,mongo and redis

* use TelegrafPlugin interface

* add mon.plugins.github as an exmpale
2021-01-20 23:07:56 +08:00
710leo 56feba9b45 Merge branch 'master' of https://github.com/didi/nightingale 2021-01-19 19:25:02 +08:00
710leo 5eec7c317c bugfix: arbitrary file reading 2021-01-19 19:24:46 +08:00
UlricQin 04c650528f Merge branch 'master' of https://github.com/didi/nightingale 2021-01-19 18:42:18 +08:00
UlricQin e8ba0fb0bb fix ssrf 2021-01-19 18:41:51 +08:00
710leo 22cb24da09 add license 2021-01-18 23:39:23 +08:00
yubo 8204641656
add logger with monapi.plugins as telegraf.Logger interface (#522) 2021-01-18 19:25:47 +08:00
UlricQin a4c8638448 code refactor 2021-01-15 19:59:26 +08:00
alick-liming 51cf58fcdf
ams agent直接挂载到节点 (#518)
* ams agent直接挂载到节点

* 代码调整

Co-authored-by: alickliming <alickliming@didi.global.com>
2021-01-15 19:54:25 +08:00
qinyening b00b7817f2
Support screen and alert template (#517) 2021-01-15 15:58:21 +08:00
燕小乙 6b1e432f6d
m3db writetagged应该并发做,不然会导致transfer rpc变慢 (#514)
* m3db writetagged应该并发做,不然会导致transfer rpc变慢

* go func指针传参问题
2021-01-15 09:16:06 +08:00
UlricQin f590194fba bugfix: same stra in nid 2021-01-14 10:06:49 +08:00
710leo 72ec59bdac Support unassigned tenant search 2021-01-13 14:04:56 +08:00
yubo a88315ee74
bugfix: call collect.Decode before get() (#507)
* add models.user.i18n

* bugfix: call collect.Decode before get()
2021-01-13 12:34:44 +08:00
UlricQin c182c70b8d bugfix: check node is nil 2021-01-13 10:10:00 +08:00
alick-liming fab8568633
新增用户添加组织字段 (#505)
Co-authored-by: alickliming <alickliming@didi.global.com>
2021-01-13 10:00:58 +08:00
yubo 74545012ed
add models.user.i18n (#504) 2021-01-12 20:27:49 +08:00
UlricQin 903a1654b6 fix sql inject 2021-01-12 18:38:12 +08:00
yubo 7161c1ac4e
adjust some file, variable name for prober module (#503)
* move pulgins_config.go to config dir

* add mongodb, redis yml
2021-01-11 22:08:27 +08:00
alick-liming a9cf307cbf
租户项目粒度某类资源top数量 (#499)
* 租户项目粒度某类资源top数量

* 租户项目粒度某类资源top数量

* resname->rescate

Co-authored-by: alickliming <alickliming@didi.global.com>
2021-01-11 12:58:32 +08:00
alick-liming f9cfcaeabe
告警hours支持 (#497)
Co-authored-by: alickliming <alickliming@didi.global.com>
2021-01-11 11:42:28 +08:00
yubo b9aacf28e5
add start,end for transfer.index.fullmatch get (#494)
* add start,end with transfer.index.fullmatch get

* bugfix: should cleanup token before destory session when auth.extra.mode.enable
2021-01-09 14:09:06 +08:00
710leo 54512491b7 fix alert history tag display 2021-01-08 20:08:47 +08:00
yubo e5f05aa724
add err log for session start (#493)
* add validate for some plugins

* restore getSessionUserWithCache method

* add validate for i18n.config

* use embed dict for i18n

* add err log for session start
2021-01-08 16:59:26 +08:00
yubo 7289636d35
use embed dict for i18n (#492)
* add validate for some plugins

* restore getSessionUserWithCache method

* add validate for i18n.config

* use embed dict for i18n
2021-01-08 15:11:41 +08:00
UlricQin 733da1ea94 converge delete 2021-01-08 15:02:31 +08:00
UlricQin a1b4344943 use beego client in sender_sms 2021-01-08 10:28:45 +08:00
yubo c0049326b6
Add mongdb as a plugin (#489)
* bugfix: whiteList list return empty

* support multi-dict for i18n && add mongodb for monapi as a plugin

* use 10day as max lifetime for extra mode auth

* bugfix: ignore i18n with default value

* Spelling mistakes
2021-01-07 20:06:48 +08:00
yubo 543d345aea
Dev (#487)
* add rdb config auth.debug for white_list

* update prober config support mode param

* feature: support access-token control with max connection, idle time, ...

* add token/session delete with auth check

* enable debug user for auth

* skip init sso db if not enable
2021-01-07 09:13:04 +08:00
UlricQin fb1354898c Merge branch 'master' of https://github.com/didi/nightingale 2021-01-06 12:17:15 +08:00
UlricQin e0263edc54 fix genNameAndNoteByResources when note is blank 2021-01-06 12:17:06 +08:00
alick-liming b3a7d7c9a8
用户组织下拉接口 (#486)
Co-authored-by: alickliming <alickliming@didi.global.com>
2021-01-06 11:14:38 +08:00
alick-liming a8008a9418
Nodename search (#484)
* node name search

* node name search

* node name search

* node name search

Co-authored-by: alickliming <alickliming@didi.global.com>
2021-01-05 14:31:18 +08:00
Ulric Qin e82f560c44 code refactor 2021-01-03 18:13:48 +08:00
Ulric Qin 3589c7de69 compatible for blank tag value 2021-01-03 17:57:11 +08:00
yubo d45ea02562
Rdb (#479)
* use collector interface

* mysql can work fine

* add basecollector

* add prober & monapi.plugins

* enable mysql plugins work

* rename collector -> manager

* add white list access check for rdb

* add cache module for authConfig & session

* rollback n9e_rdb_3.3.0.sql

* add sql ddl document

* add white_list, pwd, login access control

* add email code for login & reset password

* use sessionUsername instead of cookieUsername

* remove cookie name and data from session

* rename userName to username

* add remote_addr with session connection

* add get user by sid with cache

* enable cookie life time could be zero

* go mod tidy

* Rdb with session & monapi with telegraf (#456)

* use collector interface

* mysql can work fine

* add basecollector

* add prober & monapi.plugins

* enable mysql plugins work

* rename collector -> manager

* add white list access check for rdb

* add cache module for authConfig & session

* rollback n9e_rdb_3.3.0.sql

* add sql ddl document

* add white_list, pwd, login access control

* add email code for login & reset password

* use sessionUsername instead of cookieUsername

* remove cookie name and data from session

* rename userName to username

* add remote_addr with session connection

* add get user by sid with cache

* enable cookie life time could be zero

* go mod tidy

* add plugins config for prober

* add prober plugin expression parse

* update transfer default config for m3

* Rdb (#458)

* bugfix: session gc

* use flag for pwdMustInclude

* change user login function

* delete invite token after use

* bugfix: login response

* add sessionStart middle ware

* add auth module

* add i18n for rdb

* add i18n.zh for rdb.auth

* add mon plugins(redis, mongodb)

* update config

* add sub struct into definitions

* clean up sid cache after session destory

* bugfix: get user return nil when not found

* update i18n

* bugfix: ignore cache nologin user

* add user for callback output

* add password change api

* update default configfile & sql patch

* merge mon http middleware from rdb

* remove sso logout, sso already supporte one time auth
2021-01-01 10:41:30 +08:00
710leo bad43090ff Add user dispname under the node 2020-12-31 18:09:42 +08:00
710leo c2867d9638 Modify alert function 2020-12-31 15:11:59 +08:00
UlricQin 6dbbbac344 bugfix: insert task_meta sql inject 2020-12-31 13:01:43 +08:00
Tiny 9dd1f1f90b
钉钉告警可以at特定指定人员 (#475)
* - add dingtalk robot @ special person
should config phone number in user IM field

* send msg by each robot when there are more than one robot in stra
2020-12-29 19:43:02 +08:00
710leo 9dbfef3df8 Optimize log output 2020-12-27 15:25:50 +08:00
UlricQin 28c794b2da modify stra.timeout default = 5000 2020-12-23 20:37:31 +08:00
UlricQin ee96ce5046 test port listen on 127.0.0.1 and identity.ip and ::1 2020-12-23 15:57:11 +08:00
UlricQin 28d311e759 bugfix sql 注入 2020-12-22 11:56:20 +08:00
710leo d355393074 fix: 同比变化率告警函数 2020-12-20 13:00:45 +08:00
moses 7b220da936
变化率绝对值算法问题 (#462) 2020-12-20 12:42:01 +08:00
Paul Chu a1130b0e7c
MOD: agent 文件系统 rw 探测 (#465) 2020-12-20 12:34:21 +08:00
710leo 8bba55e441 fix node role save 2020-12-17 20:26:13 +08:00
Paul Chu d6d2e32b2e
FIX: 修复订阅大盘图表 (#461)
* FIX: 修复短信报警模板的转义问题

报警说明里的信息由于 html template 的转义,会将部分字符转义为 html 表示,但是短信内容不需要转义。
向 template 模板添加 unescaped 处理函数,并在模板文件中使用 unescaped 标识不需要转义的字段,实现避免转义

* FIX: html template func 需要在 phase 之前添加

* FIX: use the filename as template name

* FIX: template name

* FIX: 修复订阅大盘图表

Co-authored-by: zhupeiyuan <zhupeiyuan@fenbi.com>
2020-12-17 15:24:02 +08:00
Feng_Qi 37c8317410
告警信息增加设备名称(name)和设备备注(note) (#460)
* fix port check and push debug log

1:如果服务没有监听在 0.0.0.0 上,而是监听在特定地址上的话,在 127.0.0.1 上无法检测到端口。修改为如果 127.0.0.1 检测不到话,在 identity 的地址上再检测一次。
2. http push 部分缺乏 debug 日志,把 debug log 改到 push 里面以补全。

* Update cron.go

* notify add resource name and note

* Update notify.go
2020-12-16 19:51:06 +08:00
UlricQin d0ec6d8244 Merge branch 'master' of https://github.com/didi/nightingale 2020-12-16 15:22:08 +08:00
UlricQin a232e7dfcd add some logs 2020-12-16 15:21:44 +08:00
qinyening 9b0a8dbb07
Agent 默认不采集 disk.rw.error 指标 (#455)
* configurable FsRWMetrics collect
2020-12-12 17:27:57 +08:00
ysicing 2e7a2a07ac
fix: ldap登录如果配置允许coverAttributes,会导致panic (#454)
fix #453

Signed-off-by: ysicing <i@ysicing.me>
2020-12-12 03:46:13 +08:00
UlricQin ac2efd2baf bugfix 2020-12-09 20:20:21 +08:00
alick-liming 5bd9c5fefc
支持全局数据统计 1.rdb分类资源数量 2.告警数量 (#447) 2020-12-08 23:47:09 +08:00
710leo dc7c0885a7 feat: support get nodes by ids 2020-12-04 21:27:14 +08:00
UlricQin 82a42f3649 host filter support id field 2020-12-04 18:56:28 +08:00
Paul Chu 30b600fe36
BUGFIX: 修复短信报警模板的转义问题 (#440)
* FIX: 修复短信报警模板的转义问题

报警说明里的信息由于 html template 的转义,会将部分字符转义为 html 表示,但是短信内容不需要转义。
向 template 模板添加 unescaped 处理函数,并在模板文件中使用 unescaped 标识不需要转义的字段,实现避免转义

* FIX: html template func 需要在 phase 之前添加

* FIX: use the filename as template name

* FIX: template name

Co-authored-by: zhupeiyuan <zhupeiyuan@fenbi.com>
2020-12-04 16:18:05 +08:00
Ulric Qin 80c316201d code refactor 2020-12-03 21:11:39 +08:00
710leo a8f7f6a04e judge refactor 2020-12-03 11:50:45 +08:00
alick-liming 94eb306692
ams agent上报注册代码调整 (#436)
* rdb资源增加volume

* rdb用户增加创建时间

* rdb用户添加时间

* rdb新增添加用户时间代码调整

* test

* 1.agent上报扩展字段 2.rdb标签批量修改

* 代码调整

* 代码调整

* ams扩展代码调整

* test

* test

* 测试

* 错误调整

* ams agent上报注册代码调整

* map clear返回值去掉

Co-authored-by: alickliming <alickliming@didi.global.com>
2020-12-02 11:49:26 +08:00
DemoLiang 3c7c836b64
[FIX][issue#433]优化告警收敛,查询告警事件统计数据数据时使用created做between查询数据库时耗时非常久的问题,修改问使用etime 可以命中etime索引,提升查询性能,4C8G查询100W告警事件大概9s耗时,修改为etime大概700ms耗时 (#435) 2020-12-02 11:38:35 +08:00
Ulric Qin d063bc0e78 for jeff, dirty data 2020-12-01 23:39:03 +08:00
Ulric Qin c6442ed68a add agent log 2020-12-01 22:32:13 +08:00
Ulric Qin ebb95a8292 add debug log 2020-12-01 22:13:16 +08:00
alick-liming 7a185b5054
ams 扩展字段bugfix (#429)
* rdb资源增加volume

* rdb用户增加创建时间

* rdb用户添加时间

* rdb新增添加用户时间代码调整

* test

* 1.agent上报扩展字段 2.rdb标签批量修改

* 代码调整

* 代码调整

* ams扩展代码调整

* test

* test

* 测试

* 错误调整

Co-authored-by: alickliming <alickliming@didi.global.com>
2020-12-01 19:43:23 +08:00
qinyening 74e85cdadc
support i18n (#431) 2020-11-30 21:11:46 +08:00
alick-liming 82dadb31b5
1. ams扩展字段 2.rdb标签批量修改 (#428)
* rdb资源增加volume

* rdb用户增加创建时间

* rdb用户添加时间

* rdb新增添加用户时间代码调整

* test

* 1.agent上报扩展字段 2.rdb标签批量修改

* 代码调整

* 代码调整

Co-authored-by: alickliming <alickliming@didi.global.com>
2020-11-30 15:17:43 +08:00