From 837962458156022061cb55cd900b3201511d75b6 Mon Sep 17 00:00:00 2001
From: 710leo <710leo@gmail.com>
Date: Sat, 26 Sep 2020 16:37:46 +0800
Subject: [PATCH] clean code
---
README.md | 55 --------------------------------------
README_ZH.md | 52 -----------------------------------
plugin/60_plugin_status.py | 46 -------------------------------
plugin/60_uptime.sh | 16 -----------
4 files changed, 169 deletions(-)
delete mode 100644 README.md
delete mode 100644 README_ZH.md
delete mode 100755 plugin/60_plugin_status.py
delete mode 100755 plugin/60_uptime.sh
diff --git a/README.md b/README.md
deleted file mode 100644
index c14f03eb..00000000
--- a/README.md
+++ /dev/null
@@ -1,55 +0,0 @@
-
-
-
-[中文简介](README_ZH.md)
-
-Nightingale is a fork of Open-Falcon, and all the core modules have been greatly optimized. It integrates the best practices of DiDi. You can think of it as the next generation of Open-Falcon, and use directly in production environment.
-
-## Documentation
-
-Nightingale user manual: [https://n9e.didiyun.com/](https://n9e.didiyun.com/)
-
-## Compile
-
-```bash
-mkdir -p $GOPATH/src/github.com/didi
-cd $GOPATH/src/github.com/didi
-git clone https://github.com/didi/nightingale.git
-cd nightingale
-./control build
-```
-
-## Quickstart with Docker
-
-We has offered a Docker demo for the users who want to give it a try. Before you get started, make sure you have installed **Docker** & **docker-compose** and there are some details you should know.
-
-* We highly recommend users prepare a new VM environment to use it.
-* All the core components will be installed on your OS according to the `docker-compose.yaml`.
-* Nightingale will use the following ports, `80`, `5800`, `5810`, `5811`, `5820`, `5821`, `5830`, `5831`, `5840`, `5841`, `6379`, `2058`, `3306`.
-
-Okay. Run it! Once the docker finish its jobs, visits http://your-env-ip in your broswer. Default username and password is `root:root`.
-```bash
-$ docker-compose up -d
-```
-
-![dashboard](https://user-images.githubusercontent.com/19553554/78956965-8b9c6180-7b16-11ea-9747-6ed5e62b068d.png)
-
-## Upgrading
-- If upgrade `version<1.4.0` to `v1.4.0`, follow the operating instructions in [v1.4.0](https://github.com/didi/nightingale/releases/tag/v1.4.0) release
-- If upgrade from `version>1.4.0 & version<2.3.0` to `v2.3.0`, need import this [sql](https://github.com/didi/nightingale/blob/master/sql/upgrade_2.3.0.sql)
-
-
-## Team
-
-[ulricqin](https://github.com/ulricqin) [710leo](https://github.com/710leo) [jsers](https://github.com/jsers) [hujter](https://github.com/hujter) [n4mine](https://github.com/n4mine) [heli567](https://github.com/heli567)
-
-## Community
-
-Nightingale is developed in open. Here we set up an organization, [github.com/n9e](https://github.com/n9e), which is used to communicate and contribute. We sincerely hope more developers can use their creativity to make lots of related projects for the Nightingale ecosystem.
-
-## License
-
-
-
-Nightingale is available under the Apache-2.0 license. See the [LICENSE](LICENSE) file for more info.
-
diff --git a/README_ZH.md b/README_ZH.md
deleted file mode 100644
index 354f1b5e..00000000
--- a/README_ZH.md
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-
-[English Introduction](README.md)
-
-Nightingale 是一套衍生自 Open-Falcon 的互联网监控解决方案,融入了部分滴滴生产环境的最佳实践,灵活易用,稳定可靠,是一个生产环境直接可用的版本 :-)
-
-## 文档
-
-使用手册请参考:[夜莺使用手册](https://n9e.didiyun.com/)
-
-## 编译
-
-```bash
-mkdir -p $GOPATH/src/github.com/didi
-cd $GOPATH/src/github.com/didi
-git clone https://github.com/didi/nightingale.git
-cd nightingale
-./control build
-```
-
-## 快速开始
-
-使用 docker 和 docker-compose 环境可以快速部署一整套 nightingale 系统,涵盖了所有的核心组件。
-
-* 强烈建议使用一个新的虚拟环境来部署和测试这个系统。
-* 系统组件占用了以下端口,`80`, `5800`, `5810`, `5811`, `5820`, `5821`, `5830`, `5831`, `5840`, `5841`, `6379`, `2058`, `3306`,部署前请确保这些端口没有被使用。
-
-
-使用 docker-compose 一键构建部署,完成以后可以使用浏览器打开 http://your-env-ip。 默认的登录账号密码均为 `root`。
-```bash
-$ docker-compose up -d
-```
-
-![dashboard](https://user-images.githubusercontent.com/19553554/78956965-8b9c6180-7b16-11ea-9747-6ed5e62b068d.png)
-
-## 版本升级
-如果需要从 `v1.4.0` 之前的版本升级到 `v1.4.0` , 按照 [v1.4.0](https://github.com/didi/nightingale/releases/tag/v1.4.0) release 说明操作即可
-
-## 团队
-
-[ulricqin](https://github.com/ulricqin) [710leo](https://github.com/710leo) [jsers](https://github.com/jsers) [hujter](https://github.com/hujter) [n4mine](https://github.com/n4mine) [heli567](https://github.com/heli567)
-
-## 社区
-
-[github.com/n9e](https://github.com/n9e) 是为夜莺所创建的 Organization,用于收集和开发夜莺周边项目。
-
-## License
-
-
-
-Nightingale 基于 Apache-2.0 许可证进行分发和使用,更多信息参见 [LICENSE](LICENSE)。
diff --git a/plugin/60_plugin_status.py b/plugin/60_plugin_status.py
deleted file mode 100755
index 21d77da4..00000000
--- a/plugin/60_plugin_status.py
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-# author: ulric.qin@gmail.com
-
-import time
-import commands
-import json
-import sys
-import os
-
-items = []
-
-
-def collect_myself_status():
- item = {}
- item["metric"] = "plugin.myself.status"
- item["value"] = 1
- item["tags"] = ""
- items.append(item)
-
-
-def main():
- code, endpoint = commands.getstatusoutput(
- "timeout 1 /usr/sbin/ifconfig `/usr/sbin/route|grep '^default'|awk '{print $NF}'`|grep inet|awk '{print $2}'|head -n 1")
- if code != 0:
- sys.stderr.write('cannot get local ip')
- return
-
- timestamp = int("%d" % time.time())
- plugin_name = os.path.basename(sys.argv[0])
- step = int(plugin_name.split("_", 1)[0])
-
- collect_myself_status()
-
- for item in items:
- item["endpoint"] = endpoint
- item["timestamp"] = timestamp
- item["step"] = step
-
- print json.dumps(items)
-
-
-if __name__ == "__main__":
- sys.stdout.flush()
- main()
- sys.stdout.flush()
diff --git a/plugin/60_uptime.sh b/plugin/60_uptime.sh
deleted file mode 100755
index 0c806045..00000000
--- a/plugin/60_uptime.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-# author: ulric.qin@gmail.com
-
-duration=$(cat /proc/uptime | awk '{print $1}')
-localip=$(/usr/sbin/ifconfig `/usr/sbin/route|grep '^default'|awk '{print $NF}'`|grep inet|awk '{print $2}'|head -n 1)
-step=$(basename $0|awk -F'_' '{print $1}')
-echo '[
- {
- "endpoint": "'${localip}'",
- "tags": "",
- "timestamp": '$(date +%s)',
- "metric": "sys.uptime.duration",
- "value": '${duration}',
- "step": '${step}'
- }
-]'
\ No newline at end of file