From 71a32680e89de4f7092ff2f506222ca1e5087079 Mon Sep 17 00:00:00 2001 From: Abby <78209557+abby-cyber@users.noreply.github.com> Date: Tue, 25 Jan 2022 12:00:11 +0800 Subject: [PATCH 1/3] dashboard ent config_file update --- .../2.deploy-connect-dashboard-ent.md | 131 ++++++++++-------- docs-2.0/nebula-dashboard-ent/9.alerts.md | 2 +- 2 files changed, 78 insertions(+), 55 deletions(-) diff --git a/docs-2.0/nebula-dashboard-ent/2.deploy-connect-dashboard-ent.md b/docs-2.0/nebula-dashboard-ent/2.deploy-connect-dashboard-ent.md index c984f050d9d..0e2308be977 100644 --- a/docs-2.0/nebula-dashboard-ent/2.deploy-connect-dashboard-ent.md +++ b/docs-2.0/nebula-dashboard-ent/2.deploy-connect-dashboard-ent.md @@ -14,8 +14,9 @@ | 端口号 | 说明 | | ------ | --------------------------------- | | 7005 | Dashboard 提供 web 服务的端口。 | - | 9090 | prometheus 服务的端口。 | + | 9090 | Prometheus 服务的端口。 | | 9200 | nebula-stats-exporter 服务的端口。 | + | 9093 | Alertmanager 服务的端口。接收 Prometheus 告警,发送告警通知给 Dashboard。| - 准备 License。 @@ -33,67 +34,88 @@ 2. 使用`tar -xzvf`解压 tar 包。 - ```bash - $ tar -xzvf nebula-dashboard-ent-.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-.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 - ``` + ```bash + $ cp -r + ``` - 例如: - ```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`管理服务,包括启动、停止和查看。 @@ -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 diff --git a/docs-2.0/nebula-dashboard-ent/9.alerts.md b/docs-2.0/nebula-dashboard-ent/9.alerts.md index 55195bdc69a..5418d9cdeb5 100644 --- a/docs-2.0/nebula-dashboard-ent/9.alerts.md +++ b/docs-2.0/nebula-dashboard-ent/9.alerts.md @@ -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)。 ## 告警规则 From 2c77ed08d71dafa680990bf9648b026531a0588d Mon Sep 17 00:00:00 2001 From: "abby.huang" <78209557+abby-cyber@users.noreply.github.com> Date: Tue, 25 Jan 2022 14:09:04 +0800 Subject: [PATCH 2/3] Update 2.deploy-connect-dashboard-ent.md --- docs-2.0/nebula-dashboard-ent/2.deploy-connect-dashboard-ent.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs-2.0/nebula-dashboard-ent/2.deploy-connect-dashboard-ent.md b/docs-2.0/nebula-dashboard-ent/2.deploy-connect-dashboard-ent.md index 0e2308be977..de3e0d21b06 100644 --- a/docs-2.0/nebula-dashboard-ent/2.deploy-connect-dashboard-ent.md +++ b/docs-2.0/nebula-dashboard-ent/2.deploy-connect-dashboard-ent.md @@ -115,7 +115,7 @@ !!! note - 在安装 Dashboard 后,如再修改配置文件的话,在修改后,可在`scripts`目录下执行`dashboard.service restart all`同步修改至 Dashboard 客户端页面中。 + 在启动 Dashboard 后,如再修改配置文件的话,在修改后,可在`scripts`目录下执行`dashboard.service restart all`同步修改至 Dashboard 客户端页面中。 ## 管理 Dashboard 服务 Dashboard 使用脚本`dashboard.service`管理服务,包括启动、停止和查看。 From da937abd1ccb13acf7c3cfede4ab923600646091 Mon Sep 17 00:00:00 2001 From: "abby.huang" <78209557+abby-cyber@users.noreply.github.com> Date: Tue, 25 Jan 2022 14:09:12 +0800 Subject: [PATCH 3/3] Create 2.deploy-connect-dashboard-ent.md