|
1 |
| -# cheks |
| 1 | +# JAM |
2 | 2 |
|
3 |
| -[](https://github.com/exelban/cheks/releases) |
| 3 | +[](https://github.com/exelban/JAM) |
4 | 4 |
|
5 |
| -Simple monitoring for APIs and servers with dashboard and alerts. |
| 5 | +Just Another Monitoring |
6 | 6 |
|
7 |
| -## Install |
8 |
| -To run the Cheks you need to have a docker and configuration file. |
| 7 | +## Description |
| 8 | +JAM is a simple monitoring tool application. |
| 9 | +It allows you to monitor the status of your services and applications by sending HTTP requests to them and checking the response status code. |
| 10 | +The main idea is to have a simple and easy-to-use monitoring tool with minimalistic and nice design. |
9 | 11 |
|
10 |
| -Cheks provides small prebuild images for different architectures and operating systems. |
11 |
| -You could use an image from Docker Hub `exelban/cheks` or GitHub package registry `ghcr.io/exelban/cheks`. |
| 12 | +For now it is in the development stage and has a lot of features to be implemented. Such as proper alerts, more monitoring options, events history and more. |
12 | 13 |
|
13 |
| -The easiest way to run Checks is to use docker-compose: |
| 14 | +## Features |
| 15 | +- 90 days history |
| 16 | +- groups of hosts |
| 17 | +- alerts (in progress) |
| 18 | +- events history (in progress) |
| 19 | +- multiple databases support (in progress, only bolt and in-memory for now) |
14 | 20 |
|
15 |
| -```yaml |
16 |
| -version: "3" |
| 21 | +## Installation |
17 | 22 |
|
18 |
| -services: |
19 |
| - cheks: |
20 |
| - image: exelban/cheks |
21 |
| - ports: |
22 |
| - - "8080:8080" |
23 |
| - volumes: |
24 |
| - - ${PWD}/config.yaml:/srv/config.yaml |
25 |
| -``` |
| 23 | +Application is available as a Docker image. You can pull it from the Docker Hub or GitHub Registry: |
| 24 | +- [exelban/jam:latest](https://hub.docker.com/r/exelban/jam) |
| 25 | +- [ghcr.io/exelban/jam:latest](https://github.com/users/exelban/packages/container/package/jam) |
26 | 26 |
|
27 |
| -or with docker: |
| 27 | +Also you can build it from the source code or use the precompiled binaries. But docker is the easiest way to run the application. And it is recommended to use it. |
28 | 28 |
|
29 |
| -```shell |
30 |
| -docker run -p 8080:8080 -v $(pwd)/config.yaml:./srv/config.yaml exelban/cheks |
| 29 | +### Docker |
| 30 | +```bash |
| 31 | +docker run -d -v ./jam.yaml:/app/config.yaml exelban/jam:latest |
31 | 32 | ```
|
32 | 33 |
|
33 |
| -## Parameters |
34 |
| - |
35 |
| -| Command line | Environment | Default | Description | |
36 |
| -| ------------ | ----------- | ------- | ----------- | |
37 |
| -| config | CONFIG | ./config.yaml | Path to the configuration file | |
38 |
| -| auth | AUTH | false | Secure dashboard with credentials | |
39 |
| -| username | USERNAME | | Username for the dashboard (only if auth is true). Required if AUTH=true | |
40 |
| -| password | PASSWORD | | Password for the dashboard. If empty, will be generated on the first run | |
41 |
| - |
42 |
| -## Configuration file |
43 |
| -The simplest configuration file could only have a list of hosts: |
44 |
| - |
| 34 | +### Docker Compose |
45 | 35 | ```yaml
|
46 |
| -hosts: |
47 |
| - - url: https://github.com |
48 |
| - - url: https://google.com |
49 |
| - - url: https://facebook.com |
| 36 | +services: |
| 37 | + jam: |
| 38 | + image: exelban/jam:latest |
| 39 | + container_name: jam |
| 40 | + restart: unless-stopped |
| 41 | + volumes: |
| 42 | + - ./jam.yaml:/app/config.yaml |
| 43 | + logging: |
| 44 | + driver: "json-file" |
| 45 | + options: |
| 46 | + max-size: "10m" |
| 47 | + max-file: "3" |
| 48 | + healthcheck: |
| 49 | + test: "curl -f http://localhost:8822/healthz || exit 1" |
| 50 | + interval: 10s |
| 51 | + timeout: 10s |
| 52 | + retries: 3 |
| 53 | + start_period: 3s |
50 | 54 | ```
|
51 | 55 |
|
52 |
| -Optional configuration for host: |
53 |
| -- `name: string` - name |
54 |
| -- `tags: [string]` - list of tags |
| 56 | +### Precompiled binaries |
| 57 | +You can download the precompiled binaries from the [releases](https://github.com/exelban/JAM/releases) page. |
55 | 58 |
|
56 |
| -- `retry: string` - retry interval for request. Allowed golang style durations: 10s, 60s, 3m. |
57 |
| -- `timeout: string` - retry interval for request. Allowed golang style durations: 10s, 60s, 3m. |
58 |
| -- `initialDelay: string` - timeout before the request will be canceled. Allowed golang style durations: 10s, 60s, 3m. |
59 |
| -- `successThreshold: int` - number of success requests before host will be marked as live |
60 |
| -- `failureThreshold: int` - number of failed requests before host will be marked as dead |
| 59 | +### Build from source |
| 60 | +To build the application from the source code you need to have [Go](https://go.dev/doc/install) installed on your machine. |
61 | 61 |
|
62 |
| -- `success` - allows to define success request parameters as response code and response body: |
63 |
| - |
64 |
| -```yaml |
65 |
| -success: |
66 |
| - code: [200, 201, 202] |
67 |
| - body: {"ok": true} |
| 62 | +```bash |
| 63 | +git clone https://github.com/exelban/JAM.git |
| 64 | +cd JAM |
| 65 | +go build -o jam cmd/jam/main.go |
| 66 | +./jam |
68 | 67 | ```
|
69 | 68 |
|
70 |
| -- `headers: map[string]string` - you could specify the headers which will be sent with the request |
| 69 | +## Configuration |
| 70 | +The application is configured via JSON or YAML file. You can find the [example](https://github.com/exelban/JAM/blob/master/example.yaml) of the configuration file in the repository. |
| 71 | +You can set the path to the configuration file via the `--config-path` flag (`CONFIG_PATH` env) or by default it will look for the `config.yaml` file in the current directory. |
71 | 72 |
|
72 | 73 | ## License
|
73 |
| -[MIT License](https://github.com/exelban/cheks/blob/master/LICENSE) |
| 74 | +[MIT License](https://github.com/exelban/JAM/blob/master/LICENSE) |
0 commit comments