parent
86b31575eb
commit
8379624581
@ -1,55 +0,0 @@
|
||||
<img src="https://s3-gz01.didistatic.com/n9e-pub/image/n9e-logo-bg-white.png" width="200" alt="Nightingale"/>
|
||||
<br>
|
||||
|
||||
[中文简介](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
|
||||
|
||||
<img alt="Apache-2.0 license" src="https://s3-gz01.didistatic.com/n9e-pub/image/apache.jpeg" width="128">
|
||||
|
||||
Nightingale is available under the Apache-2.0 license. See the [LICENSE](LICENSE) file for more info.
|
||||
|
@ -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()
|
@ -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}'
|
||||
}
|
||||
]'
|
Loading…
Reference in new issue