Skip to content

Commit

Permalink
update dashboard deployment (#1900)
Browse files Browse the repository at this point in the history
* update dashboard deployment

* Update docs-2.0/nebula-dashboard-ent/2.deploy-connect-dashboard-ent.md

Co-authored-by: abby.huang <[email protected]>

* Update docs-2.0/nebula-dashboard-ent/2.deploy-connect-dashboard-ent.md

Co-authored-by: abby.huang <[email protected]>

* Update 2.deploy-connect-dashboard-ent.md

* Update 2.deploy-connect-dashboard-ent.md

* Update 2.deploy-connect-dashboard-ent.md

---------

Co-authored-by: abby.huang <[email protected]>
  • Loading branch information
cooper-lzy and abby-cyber authored Feb 3, 2023
1 parent 6cf6bfa commit 0cb7341
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 73 deletions.
132 changes: 59 additions & 73 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 logs, including console and file. console means the service logs are logged in webserver.log. file means the service logs are logged in access.log, error.log, severe.log, slow.log, and stat.log respectively.
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,36 +289,79 @@ 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 services in Dashboard

```
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, restart, stop, and check the Dashboard services.

```bash
sudo <dashboard_path>/scripts/dashboard.service
[-v] [-h]
<start|restart|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. |
| `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. |

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

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

## Next to do

[Connect to Dashboard](3.connect-dashboard.md)
[Connect to Dashboard](3.connect-dashboard.md)
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).

0 comments on commit 0cb7341

Please sign in to comment.