Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
opencurve
Curve
提交
7d2dc7d6
Curve
项目概览
opencurve
/
Curve
9 个月 前同步成功
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Curve
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
7d2dc7d6
编写于
6月 23, 2022
作者:
C
chenwei
提交者:
cw123
6月 23, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove unnecessary license headers
Signed-off-by:
N
chenwei
<
461432360@qq.com
>
上级
1623105f
变更
23
隐藏空白更改
内联
并排
Showing
23 changed file
with
3 addition
and
403 deletion
+3
-403
LICENSE
LICENSE
+0
-4
curve-ansible/roles/generate_config/templates/grafana.ini.j2
curve-ansible/roles/generate_config/templates/grafana.ini.j2
+0
-18
curve-ansible/roles/generate_config/templates/prometheus.yml.j2
...ansible/roles/generate_config/templates/prometheus.yml.j2
+0
-18
curvefs/monitor/curve-monitor.sh
curvefs/monitor/curve-monitor.sh
+0
-18
curvefs/monitor/docker-compose.yml
curvefs/monitor/docker-compose.yml
+0
-18
curvefs/monitor/grafana-report.py
curvefs/monitor/grafana-report.py
+0
-18
curvefs/monitor/grafana/grafana.ini
curvefs/monitor/grafana/grafana.ini
+0
-18
curvefs/monitor/grafana/provisioning/dashboards/all.yml
curvefs/monitor/grafana/provisioning/dashboards/all.yml
+0
-18
curvefs/monitor/grafana/provisioning/datasources/all.yml
curvefs/monitor/grafana/provisioning/datasources/all.yml
+0
-18
curvefs/monitor/prometheus/prometheus.yml
curvefs/monitor/prometheus/prometheus.yml
+0
-18
curvefs/monitor/target.ini
curvefs/monitor/target.ini
+0
-18
curvefs/monitor/target_json.py
curvefs/monitor/target_json.py
+3
-21
curvefs/monitor/update_dashboard.sh
curvefs/monitor/update_dashboard.sh
+0
-18
monitor/curve-monitor.sh
monitor/curve-monitor.sh
+0
-18
monitor/docker-compose.yml
monitor/docker-compose.yml
+0
-18
monitor/grafana-report.py
monitor/grafana-report.py
+0
-18
monitor/grafana/grafana.ini
monitor/grafana/grafana.ini
+0
-18
monitor/grafana/provisioning/dashboards/all.yml
monitor/grafana/provisioning/dashboards/all.yml
+0
-18
monitor/grafana/provisioning/datasources/all.yml
monitor/grafana/provisioning/datasources/all.yml
+0
-18
monitor/prometheus/prometheus.yml
monitor/prometheus/prometheus.yml
+0
-18
monitor/target.ini
monitor/target.ini
+0
-18
monitor/target_json.py
monitor/target_json.py
+0
-18
monitor/update_dashboard.sh
monitor/update_dashboard.sh
+0
-18
未找到文件。
LICENSE
浏览文件 @
7d2dc7d6
...
...
@@ -2,10 +2,6 @@ Files: *
Copyright: Copyright (c) 2020, NetEase Inc.
License: Apache 2.0 (see LICENSE_APACHE)
Files: monitor/*
Copyright: Copyright (c) 2020, NetEase Inc.
License: GPL 2.0 (see LICENSE_GPL)
Files: src/chunkserver/raftsnapshot/curve_file_service.cpp
src/chunkserver/raftsnapshot/curve_file_service.h
src/chunkserver/raftsnapshot/curve_snapshot.cpp
...
...
curve-ansible/roles/generate_config/templates/grafana.ini.j2
浏览文件 @
7d2dc7d6
#
# Copyright (c) 2020 NetEase Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
##################### Grafana Configuration Example #####################
#
# Everything has defaults so you only need to uncomment things you want to
...
...
curve-ansible/roles/generate_config/templates/prometheus.yml.j2
浏览文件 @
7d2dc7d6
#
# Copyright (c) 2020 NetEase Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# my global config
global:
scrape_interval: {{ prometheus_scrape_interval }} # Set the scrape interval to every 15 seconds. Default is every 1 minute.
...
...
curvefs/monitor/curve-monitor.sh
浏览文件 @
7d2dc7d6
#!/bin/sh
#
# Copyright (c) 2022 NetEase Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
#sh update_dashboard.sh
#echo "update dashboards success!"
...
...
curvefs/monitor/docker-compose.yml
浏览文件 @
7d2dc7d6
#
# Copyright (c) 2022 NetEase Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
version
:
'
2.0'
services
:
...
...
curvefs/monitor/grafana-report.py
浏览文件 @
7d2dc7d6
#
# Copyright (c) 2022 NetEase Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# coding: utf8
import
smtplib
...
...
curvefs/monitor/grafana/grafana.ini
浏览文件 @
7d2dc7d6
#
# Copyright (c) 2022 NetEase Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
##################### Grafana Configuration Example #####################
#
# Everything has defaults so you only need to uncomment things you want to
...
...
curvefs/monitor/grafana/provisioning/dashboards/all.yml
浏览文件 @
7d2dc7d6
#
# Copyright (c) 2022 NetEase Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-
name
:
'
default'
org_id
:
1
folder
:
'
'
...
...
curvefs/monitor/grafana/provisioning/datasources/all.yml
浏览文件 @
7d2dc7d6
#
# Copyright (c) 2022 NetEase Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
datasources
:
-
name
:
'
Prometheus'
type
:
'
prometheus'
...
...
curvefs/monitor/prometheus/prometheus.yml
浏览文件 @
7d2dc7d6
#
# Copyright (c) 2022 NetEase Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# my global config
global
:
scrape_interval
:
3s
# Set the scrape interval to every 15 seconds. Default is every 1 minute.
...
...
curvefs/monitor/target.ini
浏览文件 @
7d2dc7d6
#
# Copyright (c) 2022 NetEase Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
[path]
target_path
=
prometheus/target.json
curvefs/monitor/target_json.py
浏览文件 @
7d2dc7d6
#!/usr/bin/env python3
# coding=utf-8
#
# Copyright (c) 2022 NetEase Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
from
cProfile
import
label
import
os
import
time
...
...
@@ -49,7 +31,7 @@ def runCurvefsToolCommand(command):
except
subprocess
.
CalledProcessError
as
e
:
return
0
,
e
.
output
return
0
,
output
def
loadServer
():
ret
,
_
=
runCurvefsToolCommand
([
"list-topology"
,
"-jsonType=tree"
,
"-jsonPath=%s"
%
JSON_PATH
])
...
...
@@ -123,10 +105,10 @@ def refresh():
# load mds
mds
=
loadType
(
"mds"
)
targets
.
append
(
mds
)
# load client
# load client
client
=
loadClient
()
targets
.
append
(
client
)
with
open
(
targetPath
+
'.new'
,
'w'
,
0o777
)
as
fd
:
json
.
dump
(
targets
,
fd
,
indent
=
4
)
fd
.
flush
()
...
...
curvefs/monitor/update_dashboard.sh
浏览文件 @
7d2dc7d6
#!/bin/bash
#
# Copyright (c) 2022 NetEase Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Updates local dashboard configurations by retrieving
# the new version from a Grafana instance.
#
...
...
monitor/curve-monitor.sh
浏览文件 @
7d2dc7d6
#!/bin/sh
#
# Copyright (c) 2020 NetEase Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
#sh update_dashboard.sh
#echo "update dashboards success!"
...
...
monitor/docker-compose.yml
浏览文件 @
7d2dc7d6
#
# Copyright (c) 2020 NetEase Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
version
:
'
2.0'
services
:
...
...
monitor/grafana-report.py
浏览文件 @
7d2dc7d6
#
# Copyright (c) 2020 NetEase Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# coding: utf8
import
smtplib
...
...
monitor/grafana/grafana.ini
浏览文件 @
7d2dc7d6
#
# Copyright (c) 2020 NetEase Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
##################### Grafana Configuration Example #####################
#
# Everything has defaults so you only need to uncomment things you want to
...
...
monitor/grafana/provisioning/dashboards/all.yml
浏览文件 @
7d2dc7d6
#
# Copyright (c) 2020 NetEase Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-
name
:
'
default'
org_id
:
1
folder
:
'
'
...
...
monitor/grafana/provisioning/datasources/all.yml
浏览文件 @
7d2dc7d6
#
# Copyright (c) 2020 NetEase Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
datasources
:
-
name
:
'
Prometheus'
type
:
'
prometheus'
...
...
monitor/prometheus/prometheus.yml
浏览文件 @
7d2dc7d6
#
# Copyright (c) 2020 NetEase Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# my global config
global
:
scrape_interval
:
3s
# Set the scrape interval to every 15 seconds. Default is every 1 minute.
...
...
monitor/target.ini
浏览文件 @
7d2dc7d6
#
# Copyright (c) 2020 NetEase Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
[path]
target_path
=
prometheus/target.json
monitor/target_json.py
浏览文件 @
7d2dc7d6
#!/usr/bin/env python
# coding=utf-8
#
# Copyright (c) 2020 NetEase Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
import
os
import
time
import
json
...
...
monitor/update_dashboard.sh
浏览文件 @
7d2dc7d6
#!/bin/bash
#
# Copyright (c) 2020 NetEase Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Updates local dashboard configurations by retrieving
# the new version from a Grafana instance.
#
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录