-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
200 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
title: "安装" | ||
description: "安装夜莺监控,可以使用 docker compose 方式快速体验,或通过二进制方式安装,亦可以通过 helm 方式安装" | ||
lead: "" | ||
date: 2020-10-06T08:49:15+00:00 | ||
lastmod: 2025-01-26T10:11:40+08:00 | ||
draft: false | ||
images: [] | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
--- | ||
title: "二进制部署" | ||
description: "使用二进制方式部署夜莺监控项目" | ||
lead: "" | ||
date: 2020-11-12T13:26:54+01:00 | ||
lastmod: 2020-11-12T13:26:54+01:00 | ||
draft: false | ||
images: [] | ||
menu: | ||
docs: | ||
parent: "install" | ||
weight: 630 | ||
toc: true | ||
--- | ||
|
||
## 下载 | ||
|
||
从 [GitHub](https://github.com/ccfos/nightingale/releases) 下载最新版本,然后你会得到一个类似 `n9e-{version}-linux-amd64.tar.gz` 的压缩包。 | ||
|
||
## 安装(使用 sqlite 和 miniredis) | ||
|
||
这种方式不需要依赖 mysql 和 redis,使用 n9e 二进制直接启动即可。不过,这种方式不适合生产环境,仅用于测试。 | ||
|
||
```bash | ||
#!/bin/bash | ||
mkdir /opt/n9e && tar zxvf n9e-{version}-linux-amd64.tar.gz -C /opt/n9e | ||
|
||
cd /opt/n9e | ||
|
||
# check configurations in /opt/n9e/etc/config.toml and start n9e | ||
nohup ./n9e &> n9e.log & | ||
``` | ||
|
||
## 检查进程 | ||
|
||
```bash | ||
# check process is runing or not | ||
ss -tlnp|grep 17000 | ||
``` | ||
|
||
## 登录 | ||
|
||
打开浏览器访问 [http://localhost:17000](http://localhost:17000)。默认用户名是 `root`,默认密码是 `root.2020`。 | ||
|
||
> 请把 localhost 替换成你的服务器 IP 地址。 | ||
## 安装(使用 MySQL 和 Redis) | ||
|
||
生成环境中,我们建议使用 MySQL 和 Redis 来存储数据。修改 `/opt/n9e/etc/config.toml` 配置文件,配置 MySQL 和 Redis 的连接信息。 | ||
|
||
DB 部分: | ||
|
||
```toml | ||
[DB] | ||
DBType = "mysql" | ||
DSN="YourUsername:YourPassword@tcp(127.0.0.1:3306)/n9e_v6?charset=utf8mb4&parseTime=True&loc=Local" | ||
``` | ||
|
||
Redis 部分: | ||
|
||
```toml | ||
[Redis] | ||
Address = "127.0.0.1:6379" | ||
Password = "YourRedisPassword" | ||
RedisType = "standalone" | ||
``` | ||
|
||
启动 n9e 二进制即可,夜莺会自动创建数据库表。当然,这需要你的 DB 连接账号具备创建数据库表的权限。 | ||
|
||
```bash | ||
nohup ./n9e &> n9e.log & | ||
``` | ||
|
||
打开浏览器访问 [http://localhost:17000](http://localhost:17000)。默认用户名是 `root`,默认密码是 `root.2020`。 | ||
|
||
> 请把 localhost 替换成你的服务器 IP 地址。 | ||
生产环境,我们建议使用 `systemd` 来管理 n9e 进程,并设置 n9e 进程开机自启动。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
title: "Docker Compose" | ||
description: "使用 Docker Compose 方式部署夜莺监控项目" | ||
lead: "" | ||
date: 2020-11-12T13:26:54+01:00 | ||
lastmod: 2025-01-26T09:26:54+08:00 | ||
draft: false | ||
images: [] | ||
menu: | ||
docs: | ||
parent: "install" | ||
weight: 610 | ||
toc: true | ||
--- | ||
|
||
|
||
```bash | ||
$ git clone https://github.com/ccfos/nightingale.git | ||
$ cd nightingale/docker/compose-bridge | ||
|
||
$ docker-compose up -d | ||
Creating network "docker_nightingale" with driver "bridge" | ||
Creating mysql ... done | ||
Creating redis ... done | ||
Creating prometheus ... done | ||
Creating ibex ... done | ||
Creating agentd ... done | ||
Creating nwebapi ... done | ||
Creating nserver ... done | ||
Creating telegraf ... done | ||
|
||
$ docker-compose ps | ||
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS | ||
categraf flashcatcloud/categraf:latest "/entrypoint.sh" categraf 2 days ago Up 2 days | ||
ibex ulric2019/ibex:0.3 "sh -c '/wait && /ap…" ibex 2 days ago Up 2 days | ||
mysql mysql:5.7 "docker-entrypoint.s…" mysql 2 days ago Up 2 days | ||
n9e flashcatcloud/nightingale:latest "sh -c '/wait && /ap…" n9e 2 days ago Up 2 days | ||
prometheus prom/prometheus "/bin/prometheus --c…" prometheus 2 days ago Up 2 days | ||
redis redis:6.2 "docker-entrypoint.s…" redis 2 days ago Up 2 days | ||
``` | ||
|
||
使用浏览器访问 [http://localhost:17000](http://localhost:17000) 打开夜莺监控的页面,默认用户名是 `root`,默认密码是 `root.2020`。 | ||
|
||
> 请把 localhost 替换成你的服务器 IP 地址。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
title: "Helm" | ||
description: "使用 Helm chart 安装夜莺" | ||
lead: "" | ||
date: 2020-11-12T13:26:54+01:00 | ||
lastmod: 2025-01-26T09:29:54+08:00 | ||
draft: false | ||
images: [] | ||
menu: | ||
docs: | ||
parent: "install" | ||
weight: 620 | ||
toc: true | ||
--- | ||
|
||
你可以使用 [n9e helm chart](https://github.com/flashcatcloud/n9e-helm) 在 Kubernetes 集群中运行夜莺。 | ||
|
||
默认的夜莺用户名是 `root`,密码是 `root.2020`。 | ||
|
||
不过,我们不建议您把夜莺部署到 Kubernetes 中,因为监控系统太过重要,如果 Kubernetes 集群出现问题,可能会导致监控系统无法正常工作。而此时您可能希望通过监控数据排查 Kubernetes 的问题,导致循环依赖。尤其是,其他团队此时想使用监控系统发现用不了,可能会来怼你。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
title : "前言" | ||
description: "夜莺项目介绍" | ||
lead: "" | ||
date: 2020-10-06T08:48:45+00:00 | ||
lastmod: 2025-01-26T10:36:54+08:00 | ||
draft: false | ||
images: [] | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters