bash install.shinstall the packages below.
- pip3 -
sudo apt install python3-pip - pipenv -
pip3 install pipenv - pyenv -
curl https://pyenv.run | bash
- Install the dependencies:
pipenv install - Activate virtual environment:
pipenv shell
python3 metric.py
# settings.py
service_list = [
ServiceFactory.create("ssh", ServiceType.SYSTEMD),
ServiceFactory.create("redis", ServiceType.CONTAINER, "net_test_redis"),
ServiceFactory.create("scrap", ServiceType.PROCESS,
request_list=[
Request("GET", "http://localhost:8000/api/schema/swagger-ui/"),
],
),
]curl http://localhost:8099/metrics