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

update dashboard deployment #1900

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
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: 59 additions & 72 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 @@ -64,7 +64,7 @@ Before deploying Dashboard Enterprise Edition, you must do a check of these:
Enable: false
Log: # Dashboard run log settings.
KeepDays: 7 # The number of days for keeping log.
Mode: console # The save mode of the log.
Mode: console # The save mode of the log. console means the service logs will be logged in webserver.log. file means the service logs will be logged in access.log, error.log, severe.log, slow.log and stat.log respectively.
cooper-lzy marked this conversation as resolved.
Show resolved Hide resolved
Database:
Dialect: sqlite # The database type used to store metadata. Only support SQLite and MySQL currently. The default value is SQLite.
AutoMigrate: true # Whether to automatically create a database table. Defaults to true.
Expand Down Expand Up @@ -141,41 +141,6 @@ Before deploying Dashboard Enterprise Edition, you must do a check of these:

If you change the configuration file after starting Dashboard, you can run `dashboard.service restart all` in the `scripts` directory to synchronize the changes to the Dashboard client page.

### Manage Dashboard Service

You can use the `dashboard.service` script to start, stop, and check the Dashboard services.

```bash
sudo <dashboard_path>/dashboard/scripts/dashboard.service
[-v] [-h]
<start|stop|status> <prometheus|webserver|exporter|gateway|all>
```

| Parameter | Description |
| :------------------------- | :------------------- |
| `dashboard_path` | Dashboard installation path. |
| `-v` | Display detailed debugging information. |
| `-h` | Display help information. |
| `start` | Start 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. |

### Examples

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.
```

## Deploy Dashboard Enterprise Edition with RPM

### Installation
Expand Down Expand Up @@ -250,28 +215,6 @@ sudo /dashboard/scripts/dashboard.service restart all #Restart Dashboard.
emailKey: mail # Set the field name used to restore email in LDAP.
```

### View logs

You can view the Dashboard Enterprise Edition operation logs in the `/var/log/messages` path.

For example:

```
sudo cat /var/log/messages
```

Run the following command to view the logs of each service in Dashboard:

```
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, run the following command:

```
journalctl -u nbd-prometheus.service -b
```

### Uninstallation

To uninstall Dashboard Enterprise Edition deployed with RPM, run the following command.
Expand Down Expand Up @@ -346,32 +289,76 @@ sudo rpm -e <package_name>
messageStore: 90 # It sets the number of days to keep alert messages, the value of which is 90 by default.
```

### View logs

You can view the Dashboard Enterprise Edition operation logs in the `/var/log/syslog` path.
### Uninstallation

For example:
To uninstall Dashboard Enterprise Edition, run the following command.

```
sudo cat /var/log/syslog
sudo dpkg -r <package_name>
```

Run the following command to view the logs of each service in Dashboard:
## Manage Dashboard Service
cooper-lzy marked this conversation as resolved.
Show resolved Hide resolved

```
journalctl -u {nbd-prometheus.service|nbd-alert-manager.service|nbd-stats-exporter.service|nbd-webserver.service} -b
You can use the `dashboard.service` script to start, stop, and check the Dashboard services.

```bash
sudo <dashboard_path>/dashboard/scripts/dashboard.service
[-v] [-h]
<start|stop|status> <prometheus|webserver|exporter|gateway|all>
```

For example, to view the logs of the Prometheus service, run the following command:
| Parameter | Description |
| :------------------------- | :------------------- |
| `dashboard_path` | Dashboard installation path. |
| `-v` | Display detailed debugging information. |
| `-h` | Display help information. |
| `start` | Start 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. |

```
journalctl -u nbd-prometheus.service -b
!!! note

- For the Dashboard installed by the RPM/DEB package, you need to add the executable permission for `dashboard.service` by running the command `sudo chmod +x dashboard.service`.

- To view the Dashboard version, run the command `./ dashboard.service -version`.

### Examples

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.
```

### Uninstallation
## View logs

To uninstall Dashboard Enterprise Edition, run the following command.
You can view the Dashboard Enterprise Edition logs in the `logs` path.

For example:

```
sudo dpkg -r <package_name>
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. </br>It takes effect only when the `Log.Mode` in the Dashboard configuration is `console`. |
|`access.log`| Access log. </br>It takes effect only when the `Log.Mode` in the Dashboard configuration is `file`. |
|`error.log`| Error log. </br>It takes effect only when the `Log.Mode` in the Dashboard configuration is `file`. |
|`severe.log`| Severe log. </br>It takes effect only when the `Log.Mode` in the Dashboard configuration is `file`. |
|`slow.log`| Slow log. </br>It takes effect only when the `Log.Mode` in the Dashboard configuration is `file`. |
|`stat.log`| Statistic log. </br>It takes effect only when the `Log.Mode` in the Dashboard configuration is `file`. |
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ On **Service** page, you can view the host, path, and status of the services, an
- Select multiple services and perform batch operations at the upper corner of the page.

- Click the ![nav](https://docs-cdn.nebula-graph.com.cn/figures/nav-dashboard.png) icon to quickly view the [service monitoring information](../2.monitor.md).

- When synchronizing data, you can view and manage related services on the **Dependency** page. For details about data synchronization, see [Synchronize between two clusters](../../../synchronization-and-migration/replication-between-clusters.md).