Skip to content

Commit

Permalink
docs: combine the metrics related page (#358)
Browse files Browse the repository at this point in the history
* docs: combine the metrics related page

Signed-off-by: Keming <[email protected]>

* release

Signed-off-by: Keming <[email protected]>

---------

Signed-off-by: Keming <[email protected]>
  • Loading branch information
kemingy authored May 19, 2023
1 parent cb02b69 commit 54063a9
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 92 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "mosec"
version = "0.6.6"
version = "0.6.7"
authors = ["Keming <[email protected]>", "Zichen <[email protected]>"]
edition = "2021"
license = "Apache-2.0"
Expand Down
5 changes: 4 additions & 1 deletion docs/source/examples/metric.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ For more information about the multiprocess mode for the metrics, check the [Pro

## **`python_side_metrics.py`**

```{include} ../../../examples/python_side_metrics.py
```{include} ../../../examples/monitor/python_side_metrics.py
:code: python
```

Expand All @@ -44,3 +44,6 @@ http :8080
```shell
http :8000/metrics
```

```{include} ../../../examples/monitor/README.md
```
14 changes: 7 additions & 7 deletions examples/monitor/readme.md → examples/monitor/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# How to build monitoring system for Mosec
## How to build monitoring system for Mosec
In this tutorial, we will explain how to build monitoring system for Mosec, which includes Prometheus and Grafana.

## Prerequisites
### Prerequisites
Before starting, you need to have Docker and Docker Compose installed on your machine. If you don't have them installed, you can follow the instructions [get-docker](https://docs.docker.com/get-docker/) and [compose](https://docs.docker.com/compose/install/) to install them.

# Starting the monitoring system
## Starting the monitoring system
Clone the repository containing the docker-compose.yaml file:
```bash
git clone https://github.com/mosecorg/mosec.git
Expand All @@ -22,19 +22,19 @@ docker-compose up -d
This command will start three containers: Mosec, Prometheus, and Grafana.


# Test
## Test
Run test and feed metrics to Prometheus.
```shell
http POST :8000/inference num=1
```

# Accessing Prometheus
## Accessing Prometheus
Prometheus is a monitoring and alerting system that collects metrics from Mosec. You can access the Prometheus UI by visiting http://127.0.0.1:9090 in your web browser.

# Accessing Grafana
## Accessing Grafana
Grafana is a visualization tool for monitoring and analyzing metrics. You can access the Grafana UI by visiting http://127.0.0.1:3000 in your web browser. The default username and password are both admin.

# Stopping the monitoring system
## Stopping the monitoring system
To stop the monitoring system, run the following command:

```bash
Expand Down
82 changes: 0 additions & 82 deletions examples/python_side_metrics.py

This file was deleted.

0 comments on commit 54063a9

Please sign in to comment.