diff --git a/LICENSE b/LICENSE index a8b81fc0e7..11750f1aa3 100644 --- a/LICENSE +++ b/LICENSE @@ -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 diff --git a/curve-ansible/roles/generate_config/templates/grafana.ini.j2 b/curve-ansible/roles/generate_config/templates/grafana.ini.j2 index 77c55a3af7..e526145258 100644 --- a/curve-ansible/roles/generate_config/templates/grafana.ini.j2 +++ b/curve-ansible/roles/generate_config/templates/grafana.ini.j2 @@ -1,21 +1,3 @@ -# -# 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 diff --git a/curve-ansible/roles/generate_config/templates/prometheus.yml.j2 b/curve-ansible/roles/generate_config/templates/prometheus.yml.j2 index 9b235095c7..f3375a4d08 100644 --- a/curve-ansible/roles/generate_config/templates/prometheus.yml.j2 +++ b/curve-ansible/roles/generate_config/templates/prometheus.yml.j2 @@ -1,21 +1,3 @@ -# -# 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. diff --git a/curvefs/monitor/curve-monitor.sh b/curvefs/monitor/curve-monitor.sh index e88aa73cfd..8a7aa3950f 100644 --- a/curvefs/monitor/curve-monitor.sh +++ b/curvefs/monitor/curve-monitor.sh @@ -1,23 +1,5 @@ #!/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!" diff --git a/curvefs/monitor/docker-compose.yml b/curvefs/monitor/docker-compose.yml index af1d37655d..af36fe48e9 100644 --- a/curvefs/monitor/docker-compose.yml +++ b/curvefs/monitor/docker-compose.yml @@ -1,21 +1,3 @@ -# -# 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: diff --git a/curvefs/monitor/grafana-report.py b/curvefs/monitor/grafana-report.py index 9eecd1e89a..a400263e8c 100644 --- a/curvefs/monitor/grafana-report.py +++ b/curvefs/monitor/grafana-report.py @@ -1,21 +1,3 @@ -# -# 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 diff --git a/curvefs/monitor/grafana/grafana.ini b/curvefs/monitor/grafana/grafana.ini index 98c8d95087..fc6c0b11ca 100755 --- a/curvefs/monitor/grafana/grafana.ini +++ b/curvefs/monitor/grafana/grafana.ini @@ -1,21 +1,3 @@ -# -# 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 diff --git a/curvefs/monitor/grafana/provisioning/dashboards/all.yml b/curvefs/monitor/grafana/provisioning/dashboards/all.yml index 38d27674b8..15be939757 100755 --- a/curvefs/monitor/grafana/provisioning/dashboards/all.yml +++ b/curvefs/monitor/grafana/provisioning/dashboards/all.yml @@ -1,21 +1,3 @@ -# -# 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: '' diff --git a/curvefs/monitor/grafana/provisioning/datasources/all.yml b/curvefs/monitor/grafana/provisioning/datasources/all.yml index 4569327b69..48073c8df1 100755 --- a/curvefs/monitor/grafana/provisioning/datasources/all.yml +++ b/curvefs/monitor/grafana/provisioning/datasources/all.yml @@ -1,21 +1,3 @@ -# -# 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' diff --git a/curvefs/monitor/prometheus/prometheus.yml b/curvefs/monitor/prometheus/prometheus.yml index b52cad59ce..d5076e64ae 100755 --- a/curvefs/monitor/prometheus/prometheus.yml +++ b/curvefs/monitor/prometheus/prometheus.yml @@ -1,21 +1,3 @@ -# -# 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. diff --git a/curvefs/monitor/target.ini b/curvefs/monitor/target.ini index ef7c598ca5..a4ed5b6826 100644 --- a/curvefs/monitor/target.ini +++ b/curvefs/monitor/target.ini @@ -1,20 +1,2 @@ -# -# 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 diff --git a/curvefs/monitor/target_json.py b/curvefs/monitor/target_json.py index afe3af94e4..3530ecfaa0 100644 --- a/curvefs/monitor/target_json.py +++ b/curvefs/monitor/target_json.py @@ -1,24 +1,6 @@ #!/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() diff --git a/curvefs/monitor/update_dashboard.sh b/curvefs/monitor/update_dashboard.sh index 733d9ebba1..d39f2cb30e 100644 --- a/curvefs/monitor/update_dashboard.sh +++ b/curvefs/monitor/update_dashboard.sh @@ -1,23 +1,5 @@ #!/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. # diff --git a/monitor/curve-monitor.sh b/monitor/curve-monitor.sh index 4545181d76..75894bb70a 100644 --- a/monitor/curve-monitor.sh +++ b/monitor/curve-monitor.sh @@ -1,23 +1,5 @@ #!/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!" diff --git a/monitor/docker-compose.yml b/monitor/docker-compose.yml index eadbd8a30f..c9a5a5a079 100644 --- a/monitor/docker-compose.yml +++ b/monitor/docker-compose.yml @@ -1,21 +1,3 @@ -# -# 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: diff --git a/monitor/grafana-report.py b/monitor/grafana-report.py index cb585abdf1..a400263e8c 100644 --- a/monitor/grafana-report.py +++ b/monitor/grafana-report.py @@ -1,21 +1,3 @@ -# -# 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 diff --git a/monitor/grafana/grafana.ini b/monitor/grafana/grafana.ini index 5633fb8d3c..fc6c0b11ca 100755 --- a/monitor/grafana/grafana.ini +++ b/monitor/grafana/grafana.ini @@ -1,21 +1,3 @@ -# -# 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 diff --git a/monitor/grafana/provisioning/dashboards/all.yml b/monitor/grafana/provisioning/dashboards/all.yml index c4b01efe28..15be939757 100755 --- a/monitor/grafana/provisioning/dashboards/all.yml +++ b/monitor/grafana/provisioning/dashboards/all.yml @@ -1,21 +1,3 @@ -# -# 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: '' diff --git a/monitor/grafana/provisioning/datasources/all.yml b/monitor/grafana/provisioning/datasources/all.yml index bad9b99f3c..48073c8df1 100755 --- a/monitor/grafana/provisioning/datasources/all.yml +++ b/monitor/grafana/provisioning/datasources/all.yml @@ -1,21 +1,3 @@ -# -# 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' diff --git a/monitor/prometheus/prometheus.yml b/monitor/prometheus/prometheus.yml index 89abc4f6d4..d5076e64ae 100755 --- a/monitor/prometheus/prometheus.yml +++ b/monitor/prometheus/prometheus.yml @@ -1,21 +1,3 @@ -# -# 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. diff --git a/monitor/target.ini b/monitor/target.ini index 4f99c6b69b..a4ed5b6826 100644 --- a/monitor/target.ini +++ b/monitor/target.ini @@ -1,20 +1,2 @@ -# -# 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 diff --git a/monitor/target_json.py b/monitor/target_json.py index 6e2c20e3ed..98e39aae96 100644 --- a/monitor/target_json.py +++ b/monitor/target_json.py @@ -1,24 +1,6 @@ #!/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 diff --git a/monitor/update_dashboard.sh b/monitor/update_dashboard.sh index bfa8f5ba0b..d39f2cb30e 100644 --- a/monitor/update_dashboard.sh +++ b/monitor/update_dashboard.sh @@ -1,23 +1,5 @@ #!/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. #