From 7343ece3baef9ce6307624bc22179e73d3bcb021 Mon Sep 17 00:00:00 2001 From: akihi99 <101778636+akihi99@users.noreply.github.com> Date: Thu, 11 May 2023 10:19:35 +0800 Subject: [PATCH 1/3] Update 2.deploy-connect-dashboard-ent.md --- .../2.deploy-connect-dashboard-ent.md | 137 +++++++++++------- 1 file changed, 81 insertions(+), 56 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 23e6f04d8d9..d5bad53363e 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 @@ -19,7 +19,7 @@ Before deploying Dashboard Enterprise Edition, you must do a check of these: | Port | Description | | ---- | ---- | | 7005 | The port through which Dashboard Enterprise Edition provides the web service. | - | 9090 | The port of the prometheus service. | + | 9091 | The port of the prometheus service. | | 9200 | The port of the nebula-stats-exporter service. | | 9093 | The port of the Alertmanager service, used to receive Prometheus alerts and then send them to Dashboard.| | 9100 | The port of the node-exporter service. The node-exporter is aumatically deployed on the target machine after a cluster is created or imported. It is used to collect the source information of machines in the cluster, including the CPU, memory, load, disk, and network. | @@ -178,21 +178,21 @@ Before deploying Dashboard Enterprise Edition, you must do a check of these: cp -r nebula.license /usr/local/nebula-dashboard-ent ``` -4. (Optional) Run the following commands to view the status of and start all the services. +4. Run the following commands to view the status of and start all the services. ``` sudo systemctl list-dependencies nebula-dashboard.target # View the status of all the services. sudo systemctl start nebula-dashboard.target # Start all the services. ``` - You can also view, start, and stop a single service. For example: + You can also view, start, and stop a single service. ``` sudo systemctl {status|stop|start} {nbd-prometheus.service|nbd-alert-manager.service|nbd-stats-exporter.service|nbd-webserver.service} ``` -5. (Optional) To configure recipients of cluster alert notifications and to configure LDAP accounts, run `vim /usr/local/nebula-dashboard-ent/etc/config.yaml` and add the following settings. +5. To configure recipients of cluster alert notifications and to configure LDAP accounts, run `vim /usr/local/nebula-dashboard-ent/etc/config.yaml` and add the following settings. ``` # Information of the sender's Email used to invite LDAP accounts. @@ -261,20 +261,20 @@ sudo rpm -e cp -r nebula.license /usr/local/nebula-dashboard-ent ``` -4. (Optional) Run the following commands to view the status of and start all the services. +4. Run the following commands to view the status of and start all the services. ``` sudo systemctl list-dependencies nebula-dashboard.target # View the status of all the services. sudo systemctl start nebula-dashboard.target # Start all the services. ``` - You can also view, start, and stop a single service. For example: + You can also view, start, and stop a single service. ``` sudo systemctl {status|stop|start} {nbd-prometheus.service|nbd-alert-manager.service|nbd-stats-exporter.service|nbd-webserver.service} ``` -5. (Optional) To configure the sender's email address used to invite LDAP and OAuth2.0 accounts and configure the duration for storing alert messages, run `vim /usr/local/nebula-dashboard-ent/etc/config.yaml` and add the following settings. +5. To configure the sender's email address used to invite LDAP and OAuth2.0 accounts and configure the duration for storing alert messages, run `vim /usr/local/nebula-dashboard-ent/etc/config.yaml` and add the following settings. ``` # Information of the sender's Email used to invite LDAP accounts. @@ -299,68 +299,93 @@ sudo dpkg -r ## Manage services in Dashboard -You can use the `dashboard.service` script to start, restart, stop, and check the Dashboard services. +- You can use the `dashboard.service` script to start, restart, stop, and check the Dashboard services. -```bash -sudo /scripts/dashboard.service -[-v] [-h] - -``` + ```bash + sudo /scripts/dashboard.service + [-v] [-h] + + ``` -| Parameter | Description | -| :------------------------- | :------------------- | -| `dashboard_path` | Dashboard installation path. | -| `-v` | Display detailed debugging information. | -| `-h` | Display help information. | -| `start` | Start the target services. | -| `restart` | Restart the target services. | -| `stop` | Stop the target services. | -| `status` | Check the status of the target services. | -| `prometheus` | Set the prometheus Service as the target service. | -| `webserver` | Set the webserver Service as the target service. | -| `exporter` | Set the exporter Service as the target service. | -| `gateway` | Set the gateway Service as the target service. | -| `all` | Set all the Dashboard services as the target services. | + | Parameter | Description | + | :------------------------- | :------------------- | + | `dashboard_path` | Dashboard installation path. | + | `-v` | Display detailed debugging information. | + | `-h` | Display help information. | + | `start` | Start the target services. | + | `restart` | Restart the target services. | + | `stop` | Stop the target services. | + | `status` | Check the status of the target services. | + | `prometheus` | Set the prometheus Service as the target service. | + | `webserver` | Set the webserver Service as the target service. | + | `exporter` | Set the exporter Service as the target service. | + | `gateway` | Set the gateway Service as the target service. | + | `all` | Set all the Dashboard services as the target services. | -!!! note + !!! note - To view the Dashboard version, run the command `./dashboard.service -version`. + To view the Dashboard version, run the command `./dashboard.service -version`. -### Examples + For example, if Dashboard is installed in the current directory, you can manage its services using the following commands: -Dashboard is installed in the current directory, and you can use the following commands to manage services. + ```bash + sudo /dashboard/scripts/dashboard.service start all # Start Dashboard. + sudo /dashboard/scripts/dashboard.service stop all # Stop Dashboard. + sudo /dashboard/scripts/dashboard.service status all # Check Dashboard status. + sudo /dashboard/scripts/dashboard.service restart all # Restart Dashboard. + ``` -```bash -sudo /dashboard/scripts/dashboard.service start all #Start Dashboard. -sudo /dashboard/scripts/dashboard.service stop all #Stop Dashboard. -sudo /dashboard/scripts/dashboard.service status all #Check Dashboard status. -sudo /dashboard/scripts/dashboard.service restart all #Restart Dashboard. -``` +- If you installed Dashboard using RPM or DEB packages, you can manage the service using systemd. You can start, view, restart and stop the service using the `systemctl` command. + + ```bash + sudo systemctl start nebula-dashboard.target # Start all service. + sudo systemctl status nebula-dashboard.target # Check Dashboard status. + sudo systemctl restart # Restart service respectively. + sudo systemctl stop # Stop service respectively. + ``` + + For example, to stop the Prometheus service, run the following command: + + ```bash + sudo systemctl stop nbd-prometheus.service + ``` ## View logs -You can view the Dashboard Enterprise Edition logs in the `logs` path. +- Users who manage services using `dashboard.service` can view the Dashboard Enterprise Edition logs in the `logs` directory. -For example: + For example: -``` -cat logs/prometheus.log -``` + ``` + cat logs/prometheus.log + ``` + + The descriptions of the log files are as follows. + + |Log file| Description | + |:--|:--| + |`alertmanager.log`| Alertmanager service log. | + |`nebula-stats-exporter.log`| nebula-stats-exporter service log. | + |`prometheus.log`| Prometheus service log. | + |`br`| Backup and restore service log. | + |`webserver.log`| Dashboard service log.
It takes effect only when the `Log.Mode` in the Dashboard configuration is `console`. | + |`access.log`| Access log.
It takes effect only when the `Log.Mode` in the Dashboard configuration is `file`. | + |`error.log`| Error log.
It takes effect only when the `Log.Mode` in the Dashboard configuration is `file`. | + |`severe.log`| Severe log.
It takes effect only when the `Log.Mode` in the Dashboard configuration is `file`. | + |`slow.log`| Slow log.
It takes effect only when the `Log.Mode` in the Dashboard configuration is `file`. | + |`stat.log`| Statistic log.
It takes effect only when the `Log.Mode` in the Dashboard configuration is `file`. | -The descriptions of the log files are as follows. - -|Log file| Description | -|:--|:--| -|`alertmanager.log`| Alertmanager service log. | -|`nebula-stats-exporter.log`| nebula-stats-exporter service log. | -|`prometheus.log`| Prometheus service log. | -|`br`| Backup and restore service log. | -|`webserver.log`| Dashboard service log.
It takes effect only when the `Log.Mode` in the Dashboard configuration is `console`. | -|`access.log`| Access log.
It takes effect only when the `Log.Mode` in the Dashboard configuration is `file`. | -|`error.log`| Error log.
It takes effect only when the `Log.Mode` in the Dashboard configuration is `file`. | -|`severe.log`| Severe log.
It takes effect only when the `Log.Mode` in the Dashboard configuration is `file`. | -|`slow.log`| Slow log.
It takes effect only when the `Log.Mode` in the Dashboard configuration is `file`. | -|`stat.log`| Statistic log.
It takes effect only when the `Log.Mode` in the Dashboard configuration is `file`. | +- Users managing services with systemd can access the logs for each Dashboard Enterprise Edition service through `journalctl`. + + ```bash + journalctl -u {nbd-prometheus.service|nbd-alert-manager.service|nbd-stats-exporter.service|nbd-webserver.service} -b + ``` + + For example, to view the logs of the Prometheus service: + + ```bash + journalctl -u nbd-prometheus.service -b + ``` ## Next to do From 9ccfd8a138aa9883c193363ab9640f475414f6a3 Mon Sep 17 00:00:00 2001 From: akihi99 <101778636+akihi99@users.noreply.github.com> Date: Thu, 11 May 2023 11:39:57 +0800 Subject: [PATCH 2/3] Update 2.deploy-connect-dashboard-ent.md --- .../2.deploy-connect-dashboard-ent.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 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 d5bad53363e..ced51b1458c 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 @@ -299,11 +299,13 @@ sudo dpkg -r ## Manage services in Dashboard +The following section presents two methods for managing the Dashboard service. It's important to note that these methods are not interchangeable. For instance, you can't start the service using the `dashboard.service` script and then use the `systemctl` command to stop it. + - You can use the `dashboard.service` script to start, restart, stop, and check the Dashboard services. ```bash sudo /scripts/dashboard.service - [-v] [-h] + [-v] [-h] [-version] ``` @@ -312,6 +314,7 @@ sudo dpkg -r | `dashboard_path` | Dashboard installation path. | | `-v` | Display detailed debugging information. | | `-h` | Display help information. | + | `-version` | Display the Dashboard version. | | `start` | Start the target services. | | `restart` | Restart the target services. | | `stop` | Stop the target services. | @@ -322,10 +325,6 @@ sudo dpkg -r | `gateway` | Set the gateway Service as the target service. | | `all` | Set all the Dashboard services as the target services. | - !!! note - - To view the Dashboard version, run the command `./dashboard.service -version`. - For example, if Dashboard is installed in the current directory, you can manage its services using the following commands: ```bash From efa15357658ee2bd2d90ca4ecbee9a324902df26 Mon Sep 17 00:00:00 2001 From: akihi99 <101778636+akihi99@users.noreply.github.com> Date: Thu, 11 May 2023 18:31:09 +0800 Subject: [PATCH 3/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 ced51b1458c..361ca628793 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 @@ -22,7 +22,7 @@ Before deploying Dashboard Enterprise Edition, you must do a check of these: | 9091 | The port of the prometheus service. | | 9200 | The port of the nebula-stats-exporter service. | | 9093 | The port of the Alertmanager service, used to receive Prometheus alerts and then send them to Dashboard.| - | 9100 | The port of the node-exporter service. The node-exporter is aumatically deployed on the target machine after a cluster is created or imported. It is used to collect the source information of machines in the cluster, including the CPU, memory, load, disk, and network. | + | 9100 | The port of the node-exporter service. The node-exporter is automatically deployed on the target machine after a cluster is created or imported. It is used to collect the source information of machines in the cluster, including the CPU, memory, load, disk, and network. | - The [license](11.dashboard-ent-license.md) is ready.