Skip to content

Commit

Permalink
Update docs to reflect automatic save detection
Browse files Browse the repository at this point in the history
  • Loading branch information
bostrt committed Feb 12, 2024
1 parent 594f9eb commit 10e97db
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
![Docker Pulls](https://img.shields.io/docker/pulls/bostrt/palworld-exporter?logo=docker)
![GitHub License](https://img.shields.io/github/license/palworldlol/palworld-exporter)

Here is a screenshot of what's possible to graph using metrics from this exporter. This is for two different Palworld servers:
Here is a screenshot of what's possible to graph using metrics from this exporter. This Grafana dashboard can be [downloaded here](https://grafana.com/grafana/dashboards/20421-palworld/).

![Grafana Screenshot](grafana.png)

Expand Down Expand Up @@ -43,7 +43,7 @@ Options:
--listen-port INTEGER Port for exporter to listen on [default:
9877]
--save-directory DIRECTORY Path to directory contain all .sav files
(e.g. Pal/Saved/SaveGames/0/2FCD4.../)
(e.g. Pal/Saved/SaveGames)
--log-level [NOTSET|DEBUG|INFO|WARNING|ERROR|CRITICAL]
Set logging level [default: INFO]
--ignore-logging-in Ignore players actively logging in that
Expand All @@ -62,6 +62,7 @@ Environment Variables are also available for each option above:
- `LOG_LEVEL`
- `IGNORE_LOGGING_IN`


# Run as Container

## Just Docker
Expand All @@ -71,7 +72,7 @@ Below is the command to run straight with docker (podman works too!).
*NOTE*: You will need to make sure the exporter can reach the Palworld server you wish to monitor.

```
docker run -e RCON_HOST=palworld -e RCON_PASSWORD=topsecrt -p 9877:9877 --rm -it docker.io/bostrt/palworld-exporter
docker run -e RCON_HOST=palworld -e RCON_PASSWORD=topsecrt -e SAVE_DIRECTORY=/palworld -v ./palworld:/palworld:z,ro -p 9877:9877 --rm -it docker.io/bostrt/palworld-exporter
```

## Docker Compose
Expand All @@ -83,6 +84,7 @@ Here is an EXAMPLE docker compose file that uses a https://github.com/thijsvanlo
- Notice the `RCON_PASSWORD` and `ADMIN_PASSWORD` match.
- Notice the exporter references `palworld`, the name of the Docker compose service.
- Notice the `RCON_PORT` in both services match.
- Lastly, the `palworld` volume is used in both containers.

```yaml
services:
Expand All @@ -98,6 +100,9 @@ services:
- RCON_HOST=palworld
- RCON_PORT=25575
- RCON_PASSWORD=top-secret
- SAVE_DIRECTORY=/palworld
volumes:
- ./palworld:/palworld/:z,ro
palworld:
image: docker.io/thijsvanloef/palworld-server-docker:latest
container_name: palworld-server
Expand Down Expand Up @@ -153,7 +158,3 @@ palworld_player_save_count 4.0
# TYPE palworld_level_save_size_bytes gauge
palworld_level_save_size_bytes 7.711697e+06
```

# Visualization (Grafana)

If you already have a Promtheus + Grafana monitoring setup, you can integrate the metris for some pretty graphs. Here is a very basic Grafana dashboard you can import: https://grafana.com/grafana/dashboards/20421-palworld/.
2 changes: 1 addition & 1 deletion src/palworld_exporter/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
@click.option('--rcon-password', default='', help='RCON password', show_default='None', envvar='RCON_PASSWORD')
@click.option('--listen-address', default='0.0.0.0', help='Hostname or IP Address for exporter to listen on', envvar='LISTEN_ADDRESS', show_default=True)
@click.option('--listen-port', default=9877, help='Port for exporter to listen on', show_default=True, envvar='LISTEN_PORT', type=int)
@click.option('--save-directory', default=None, envvar='SAVE_DIRECTORY', help='Path to directory contain all .sav files (e.g. Pal/Saved/SaveGames/0/2FCD4.../)', show_default='None', type=click.Path(exists=True, dir_okay=True, file_okay=False))
@click.option('--save-directory', default=None, envvar='SAVE_DIRECTORY', help='Path to directory contain all .sav files (e.g. Pal/Saved/SaveGames)', show_default='None', type=click.Path(exists=True, dir_okay=True, file_okay=False))
@click.option('--log-level', type=LogLevel(), default='INFO', help='Set logging level', envvar='LOG_LEVEL', show_default=True)
@click.option('--ignore-logging-in', is_flag=True, default=True, envvar='IGNORE_LOGGING_IN', help='Ignore players actively logging in that temporarily have no Player UID')
def main(rcon_host: str,
Expand Down

0 comments on commit 10e97db

Please sign in to comment.