Skip to content

Commit

Permalink
update readmes
Browse files Browse the repository at this point in the history
  • Loading branch information
featheredtoast committed Nov 11, 2024
1 parent b4fe6cc commit 14ba5bc
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 9 deletions.
29 changes: 26 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,9 @@ If there are more hosts than webhooks, the remaining hosts do not have webhooks.
- [frmcompanion](http://localhost:9000/metrics): A webapp that converts JSON data from FRM into Prometheus metrics at `localhost:9000/metrics`.
- [prometheus](http://localhost:9090): Ingest metrics from the remote monitoring companion. Generates alert metrics for interesting anomalies.
- [alertmanager](http://localhost:9093): Forwards critical alerts to notification components.
- alertmanager-discord: Sends critical alerts to Discord.
- frmcache: a caching server that pushes json metrics to a running postgres container
- postgres - the database server that frm cache pushes to, and acts as an additional data source for grafana.
- fakeserver: Test server for fake metrics used for testing. Maps to host port 8082 to avoid port conflicts if FRM is running on localhost.
- fakeserver: Test server for fake metrics used for testing. Maps to host port 8082 to avoid port conflicts if FRM is running on localhost. For testing, runs with `--profile debug`.
- [getFactory](http://localhost:8082/getFactory)
- [getPower](http://localhost:8082/getPower)
- [getProdStats](http://localhost:8082/getProdStats)
Expand Down Expand Up @@ -145,7 +144,7 @@ FRM_HOST=192.168.1.30
DISCORD_WEBHOOK=https://discord.com/api/webhooks/12345/abcd12345
```

You may omit the FRM_HOST if you're running the monitoring on the same computer as Satisfactory.
You may omit the FRM_HOST if you're running the monitoring on the same computer as Satisfactory on windows. For Linux, the FRM_HOST will need to be set. The default host IP on the networking stack is `172.17.0.1`.
You may omit the DISCORD_WEBHOOK if you are not using discord for alerts.
You do not need the `.env` file if you do not need either of these.

Expand All @@ -156,3 +155,27 @@ Navigate to `localhost:3000`. Log in with username: admin, password: admin. You
### Remove environment

When you're done with the data, you can run `docker compose down` which will completely delete and remove the monitoring stack.

### Update environment

Make sure you destroy your old environment and pull in the new stack to upgrade and fully restart.

If you installed via git:
```
docker compose down
git pull
docker compose pull
docker compose up -d
```

If you installed via a zip, run `docker compose down`, download and replace the folder, and then run
```
docker compose pull
docker compose up -d
```

### Development

You are able to run `docker compose build --no-cache` to build the local docker images.

There is a fake server you can run with `docker compose up -d --profile debug` that will report some fake metrics. The FRM_HOST and FRM_PORT is: fakeserver:8080.
21 changes: 15 additions & 6 deletions alertmanager-config/src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,18 @@ Configured entirely through env vars for simplicity.

## Env Vars

FRM_HOST
FRM_PORT
FRM_HOSTS
DISCORD_WEBHOOK
DISCORD_WEBHOOKS
OUTPUT_PATH
`FRM_HOST`: The host to the Ficsit Remote Monitoring server. EG: `172.17.0.1`.
`FRM_PORT`: The port of the Ficist Remote Monitoring server. EG: `8080`.
`FRM_HOSTS`: A comma separated list of Ficsit Remote Monitoring servers. If protocol is unspecified, it defaults to http. EG: `http://myserver1.frm.example:8080,myserver2.frm.example:8080,https://myserver3.frm.example:8081`
`DISCORD_WEBHOOK`: A single [discord webhook](https://discord.com/developers/docs/resources/webhook) to send for all configured FRM hosts.
`DISCORD_WEBHOOKS`: A comma-separated list of [discord webhooks](https://discord.com/developers/docs/resources/webhook) to pair up with the FRM host.
`OUTPUT_PATH`: The output path of the resulting alertmanager config.

Hosts will be paired with webhooks in order. EG for a env config like:
```
FRM_HOSTS=host1,host2,host3
DISCORD_WEBHOOKS=webhook1,webhook2,webhook3
```
host1 will fire on webhook1, host2 will fire on webhook2, and host3 will fire on webhook3.

Extra hosts will not have webhooks associated with them, and extra webhooks will not be associated with a host.
14 changes: 14 additions & 0 deletions frmcache/src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,17 @@ cross join jsonb_path_query(frm_data, '$[*]') as data
where metric = 'factory'
LIMIT 500
```

## Env vars

Configuration is done strictly through ENV vars.

`FRM_HOST`: The host to the Ficsit Remote Monitoring server. EG: `172.17.0.1`.
`FRM_PORT`: The port of the Ficist Remote Monitoring server. EG: `8080`.
`FRM_HOSTS`: A comma separated list of Ficsit Remote Monitoring servers. If protocol is unspecified, it defaults to http. EG: `http://myserver1.frm.example:8080,myserver2.frm.example:8080,https://myserver3.frm.example:8081`
`PG_HOST`: Postgres host. Defaults to `postgres`
`PG_PORT`: Postgres port. Defaults to `5432`
`PG_PASSWORD`: Postgres password. Defaults to `secretpassword`
`PG_USER`: Postgres user to connect as. Defaults to `postgres`
`PG_DB`: Postgres database to connect to. Defaults to `postgres`
`MIGRATION_DIR`: List of [tern](https://github.com/jackc/tern) migrations to execute. Defaults to `/var/lib/cache`

0 comments on commit 14ba5bc

Please sign in to comment.