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

LM monitoring #2171

Merged
merged 1 commit into from
Jul 14, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,64 @@ For a database administrator (DBA), there may be a need to view the license info
- `<host>`: The IP address of the host where the specified LM is located.


## Monitor LM

### Monitor LM status

You can use monitoring tools to monitor the status of the LM service.

- Use Dashboard Enterprise

When LM is running normally, the **License Manager** page displays the status of LM as **Running**, otherwise, it displays **Exited**. For more information, see [License Manager](../../nebula-dashboard-ent/11.license-manager.md).

- Use Prometheus

You need to configure the Prometheus server before monitoring LM.

Add the following configuration to the Prometheus configuration file. For more information about the Prometheus configuration file, see [Prometheus Configuration](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#configuration).

```yaml
...
- job_name: license-manager
scrape_interval: 15s # The interval for pulling data.
metrics_path: /metrics # The monitoring metrics path of LM, which is `/metrics`.
scheme: http # The protocol type of LM, which is HTTP.
static_configs: # The address and port of LM (default 9119).
- targets:
- [<ip:lm_port>]
...
```

After the configuration is complete, you can monitor the status of LM through its built-in metric `up`. If the value is `1`, it means that LM is running normally; if the value is `0`, it means that LM is not running. To view the metric, enter `up` in the Prometheus query box as shown below:

```
up{instance="<ip:lm_port>", job="job_name"}
```

- `<ip:lm_port>`: The IP address and port of LM.
- `job_name`: The name of the job.

For example, up{instance="192.168.8.xxx:9119", job="license-manager"}.

!!! note

By default, LM uses port `9119`. If you need to change the port number, you can modify the value of the `Port` field in the LM configuration file above, or modify the value of `port` in the YAML file of [Deploying LM in K8s](../../nebula-operator/3.deploy-nebula-graph-cluster/3.0.deploy-lm.md).



### View LM metrics

You can view the built-in metrics of LM through the following URL:

```
http://<ip:lm_port>/metrics
```

- `<ip:lm_port>`: The IP address and port of LM.

You can also collect LM metrics data through monitoring tools. To use Prometheus, you need to configure the Prometheus server before collecting LM metrics. For more information, see the above section **Monitor LM status**.


## Configure connection to LM

### Configure LM in NebulaGraph
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ For information on how to deploy LM on a machine outside the K8s cluster, see [L
kubectl -n nebula-license-manager get pods
```

## Monitor LM

You can use monitoring tools, such as Dashboard Enterprise or Prometheus, to monitor the running status and metrics of LM. For more information, see [Monitor LM](../../9.about-license/2.license-management-suite/3.license-manager.md).

## Use LM to manage the license

- For commands related to using LM deployed outside the K8s cluster to manage License, see [License Manager](../../9.about-license/2.license-management-suite/3.license-manager.md).
Expand Down