Update installation instructions and config example.

This commit is contained in:
Alexis Métaireau 2023-10-18 02:31:23 +02:00
parent 85e73e0869
commit 824a0afa3e

View file

@ -31,23 +31,18 @@ Implemented checks :
## How to run ? ## How to run ?
We're using [pipenv](https://pipenv.pypa.io/) to manage the virtual environment and the dependencies. To install it, create a virtualenv and install the dependencies:
You can install it with [pipx](https://pypa.github.io/pipx/):
```bash ```bash
pipx install pipenv python3 -m venv venv
``` source venv/bin/activate
pip install -e .
And then, checkout this repository and sync its pipenv
```bash
pipenv sync
``` ```
Once all the dependencies are in place, here is how to run the server: Once all the dependencies are in place, here is how to run the server:
```bash ```bash
pipenv run argos server argos server
``` ```
The server will read a `config.yaml` file at startup, and will populate the tasks specified in it. See the configuration section below for more information on how to configure the checks you want to run. The server will read a `config.yaml` file at startup, and will populate the tasks specified in it. See the configuration section below for more information on how to configure the checks you want to run.
@ -55,7 +50,7 @@ The server will read a `config.yaml` file at startup, and will populate the task
And here is how to run the agent: And here is how to run the agent:
```bash ```bash
pipenv run argos agent --server http://localhost:8000 --auth "<auth-token>" argos agent http://localhost:8000 "<auth-token>"
``` ```
## Configuration ## Configuration
@ -64,7 +59,7 @@ Here is a simple configuration file:
```yaml ```yaml
general: general:
frequency: 4h # Run checks every 4 hours. frequency: "1m" # Run checks every minute.
alerts: alerts:
error: error:
- local - local
@ -73,28 +68,32 @@ general:
alert: alert:
- local - local
service: service:
port: 8888
# Can be generated using `openssl rand -base64 32`.
secrets: secrets:
# Secrets can be generated using `openssl rand -base64 32`.
- "O4kt8Max9/k0EmHaEJ0CGGYbBNFmK8kOZNIoUk3Kjwc" - "O4kt8Max9/k0EmHaEJ0CGGYbBNFmK8kOZNIoUk3Kjwc"
- "x1T1VZR51pxrv5pQUyzooMG4pMUvHNMhA5y/3cUsYVs=" - "x1T1VZR51pxrv5pQUyzooMG4pMUvHNMhA5y/3cUsYVs="
ssl: ssl:
thresholds: thresholds:
critical: "1d" - "1d": critical
warning: "10d" - "5d": warning
# It's also possible to define the checks in another file
# with the include syntax:
#
# websites: !include websites.yaml
#
websites: websites:
- domain: "https://blog.notmyidea.org" - domain: "https://mypads.framapad.org"
paths: paths:
- path: "/" - path: "/mypads/"
checks: checks:
- status-is: 200 - status-is: "200"
- body-contains: "Alexis" - body-contains: '<div id= "mypads"></div>'
- ssl-certificate-expiration: "on-check" - ssl-certificate-expiration: "on-check"
- path: "/foo" - path: "/admin/"
checks: checks:
- status-is: 400 - status-is: "401"
``` ```
## Development notes ## Development notes