elstat

status page and health checker

elstat

Status page and health check server.

Installing

It is recommended to use the CI builds of elstat for production deployments.

Building for Development

Requirements:

git clone https://gitlab.com/elixire/elstat
cd elstat

# edit config.ini as you wish
cp config.example.ini config.ini

shards install

shards build && ./bin/elstat

Building for Production

You can make a self-contained tarball of elstat (containing a statically linked binary compiled in release mode) like so:

make clean
make release

Note about running the elstat binary

The binary MUST have the config.ini file in the same working directory the binary is running. With that premise fulfilled, just run the binary.

Frontend

elstat is a server that provides an API only, no HTML. The frontend bits are decoupled from the backend.

Available frontends:

Refer to each frontend's README file for installation instructions.

Running tests

crystal spec

Operational

Cleaning up the database

It is important to clean up the elstat database from time to time. There is a helper script to aid this process.

The script will vacuum the database to reclaim the space. It is important to review the SQLite documentation on it.

It is recommended to make regular backups of the elstat database for future analysis of uptime data.

./scripts/wipe_data.sh ./config.ini ./elstat.db '4 months ago'

Removing a service

After removing the service from the configuration file, you should also remove the related table in the elstat.db file so it doesn't consume unecessary disk space.

sqlite3 ./elstat.db 'DROP TABLE my_old_service;'

# please check sqlite3 documentation around VACUUM
sqlite3 ./elstat.db 'VACUUM;'
Repository

elstat

Owner
Statistic
  • 5
  • 7
  • 2
  • 0
  • 7
  • 9 days ago
  • June 10, 2018
License

MIT License

Links
Synced at

Sat, 23 Nov 2024 20:25:59 GMT

Languages