Skip to content

Latest commit

 

History

History
62 lines (43 loc) · 1.24 KB

README.md

File metadata and controls

62 lines (43 loc) · 1.24 KB

API monitor

Tiny, simple, self-hosted api monitoring tool

Screenshot from 2024-07-03 11-00-55

Requirements

  • PHP: ^8.2
  • Mysql/Mariadb
  • Crontab
  • curl

Setup

Warning

Restrict login in Auth0 to only specific user. Don't allow free access/registration.

composer install

Provide then ext env vars:

# Env prod/dev
ENV=prod

# Database credentials, driver
DB_HOST=
DB_USER=
DB_PASSWORD=
DB_NAME=
DB_DRIVER=pdo_mysql

# Auth0 used for registration/login.
AUTH0_DOMAIN=
AUTH0_CLIENT_ID=
AUTH0_CLIENT_SECRET=
AUTH0_COOKIE_SECRET=

Create database schema:

./vendor/bin/doctrine orm:schema-tool:create

Then open in browser, login and add project and jobs. And finally add crontab.

*/5 * * * * /path/to/api-monitor/vendor/bin/laminas monitor:all
0 0 * * * /path/to/api-monitor/vendor/bin/laminas monitor:clear

Demo

Screencast.from.2024-07-03.11-52-34.mp4

TODO

  • Add registration without SSO, account creation restriction.
  • Allow set http headers and other request params, like timeout.
  • Add easy setup script.
  • Add tests, security coverage.