Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dashboard ent config_file update #1426

Merged
merged 3 commits into from
Jan 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
131 changes: 77 additions & 54 deletions docs-2.0/nebula-dashboard-ent/2.deploy-connect-dashboard-ent.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
| 端口号 | 说明 |
| ------ | --------------------------------- |
| 7005 | Dashboard 提供 web 服务的端口。 |
| 9090 | prometheus 服务的端口。 |
| 9090 | Prometheus 服务的端口。 |
| 9200 | nebula-stats-exporter 服务的端口。 |
| 9093 | Alertmanager 服务的端口。接收 Prometheus 告警,发送告警通知给 Dashboard。|

- 准备 License。

Expand All @@ -33,67 +34,88 @@

2. 使用`tar -xzvf`解压 tar 包。

```bash
$ tar -xzvf nebula-dashboard-ent-<version>.linux-amd64.tar.gz
```

例如:

```bash
$ tar -xzvf nebula-dashboard-ent-1.0.0.linux-amd64.tar.gz
```

3. 使用`vim config/config.yaml`命令修改配置文件。

```bash
# 数据库信息
database:
dialect: mysql # 使用的数据库类型,目前仅支持 MySql
host: 192.168.8.157 # 连接的 MySql 数据库的 ip 地址
port: 3306 # 连接的 MySql 数据库的端口号
username: root # 登陆 MySql 的账户
password: nebula # 登陆 MySql 的密码
name: dashboard # 对应的数据库名称
autoMigrate: true # 自动创建数据库表,默认为 true
# exporter 端口信息
exporter:
nodePort: 9100 # node-exporter 服务的端口
nebulaPort: 9200 # nebula-stats-exporter 服务的端口
# 服务信息
proxy:
gateway:
target: "127.0.0.1:8090" # gateway 服务的 IP 地址和端口
prometheus:
target: "127.0.0.1:9090" # prometheus 服务的 IP 地址和端口
```
```bash
$ tar -xzvf nebula-dashboard-ent-<version>.linux-amd64.tar.gz
```

例如:

```bash
$ tar -xzvf nebula-dashboard-ent-1.0.0.linux-amd64.tar.gz
```

3. 使用`vim config/config.yaml`命令设置配置文件。

```bash
# 数据库信息
database:
dialect: mysql # 使用的数据库类型,目前仅支持 MySQL。
host: 192.168.8.157 # 连接的 MySQL 数据库的 IP 地址。
port: 3306 # 连接的 MySQL 数据库的端口号。
username: root # 登陆 MySQL 的账户。
password: nebula # 登陆 MySQL 的密码。
name: dashboard # 对应的数据库名称。
autoMigrate: true # 自动创建数据库表,默认为 true。
# exporter 端口信息
exporter:
nodePort: 9100 # node-exporter 服务的端口。
nebulaPort: 9200 # nebula-stats-exporter 服务的端口。
# 服务信息
proxy:
prometheus:
target: "127.0.0.1:9090" # prometheus 服务的 IP 地址和端口。
alertmanager:
target: "127.0.0.1:9093" # alertmanager 服务的 IP 地址和端口。
# 邀请 LDAP 账号的发件人邮箱信息
mail:
host: smtp.office365.com # SMTP 服务器地址。
port: 587 # SMTP 服务器的端口号。
username: "" # SMTP 服务器的用户名。
password: "" # SMTP 服务器的密码。
# 系统信息
system:
webAddress: http://127.0.0.1:7005 # 邮件被邀请人连接 Dashboard 的访问地址。
messageStore: 90 # 保存告警消息的天数,默认 90 天。
# LDAP 信息
ldap:
server: ldap://127.0.0.1 # LDAP 服务器地址。
bindDN: cn=admin,dc=vesoft,dc=com # LDAP 服务器登录用户名。
bindPassword: "" # LDAP 服务器登录密码。
baseDN: dc=vesoft,dc=com # 查询用户数据的路径。
userFilter: "&(objectClass=*)" # 查询条件。
emailKey: mail # LDAP 数据库存放邮箱信息的字段名。
```

4. 拷贝 License 至`nebula-dashboard-ent`目录下。

```bash
$ cp -r <license> <dashboard_path>
```
```bash
$ cp -r <license> <dashboard_path>
```

例如:
```bash
$ cp -r nebula.license /usr/local/nebula-dashboard-ent
```
例如:
```bash
$ cp -r nebula.license /usr/local/nebula-dashboard-ent
```

5. 启动 Dashboard。

可以使用以下命令一键启动 Dashboard。
```bash
$ cd scripts
$ sudo ./dashboard.service start all
```
或是执行以下命令,分别启动 prometheus、webserver、exporter 和 gateway 服务以启动 Dashboard。
```bash
$ cd scripts
$ sudo ./dashboard.service start prometheus # 启动 prometheus 服务
$ sudo ./dashboard.service start webserver #启动 webserver 服务
$ sudo ./dashboard.service start exporter #启动 exporter 服务
$ sudo ./dashboard.service start gateway #启动 gateway 服务
```
可以使用以下命令一键启动 Dashboard。
```bash
$ cd scripts
$ sudo ./dashboard.service start all
```
或是执行以下命令,分别启动 prometheus、webserver、exporter 和 gateway 服务以启动 Dashboard。
```bash
$ cd scripts
$ sudo ./dashboard.service start prometheus # 启动 Prometheus 服务
$ sudo ./dashboard.service start webserver #启动 Webserver 服务
$ sudo ./dashboard.service start exporter #启动 Exporter 服务
$ sudo ./dashboard.service start gateway #启动 Gateway 服务
```

!!! note

在启动 Dashboard 后,如再修改配置文件的话,在修改后,可在`scripts`目录下执行`dashboard.service restart all`同步修改至 Dashboard 客户端页面中。
## 管理 Dashboard 服务

Dashboard 使用脚本`dashboard.service`管理服务,包括启动、停止和查看。
Expand Down Expand Up @@ -127,6 +149,7 @@ Dashboard 的安装在当前目录下,用户可以用以下命令管理服务
$ sudo /dashboard/scripts/dashboard.service start all #启动 Dashboard 所有服务
$ sudo /dashboard/scripts/dashboard.service stop all #停止 Dashboard 所有服务
$ sudo /dashboard/scripts/dashboard.service status all #查看 Dashboard 所有服务状态
$ sudo /dashboard/scripts/dashboard.service restart all #重启 Dashboard 所有服务状态
```

## 连接 Dashboard
Expand Down
2 changes: 1 addition & 1 deletion docs-2.0/nebula-dashboard-ent/9.alerts.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
- 支持根据信息的严重级别、类型、状态,筛选告警信息。用户可单击**重置**置空所有的筛选项。
- 用户可标记告警信息的处理状态,告警信息处理状态默认为`unsolved`,用户可手动标记为`处理中`和`已解决`状态。

用户不可删除告警信息,但可在`nebula-dashboard-ent/config/config.yaml`文件中,通过修改`messageStore`参数的值来设置保存告警信息的天数。Nebula Dashboard 默认保存 90 天内的信息。
用户不可删除告警信息,但可在`nebula-dashboard-ent/config/config.yaml`文件中,通过修改`messageStore`参数的值来设置保存告警信息的天数。Nebula Dashboard 默认保存 90 天内的信息。具体操作,参见[部署 Dashboard](2.deploy-connect-dashboard-ent.md)。

## 告警规则

Expand Down