Skip to content

About

Code that supports https://stats.librenms.org

Resources

Stars

1 star

Watchers

11 watching

Forks

Repository files navigation

LibreNMS Stats

Laravel 13 application for stats.librenms.org.

Setup

Install PHP 8.3+, Composer, and the PDO driver for your database. Then:

composer install
cp .env.example .env
php artisan key:generate
php artisan migrate
php artisan serve

The default configuration uses SQLite at database/stats.sqlite. Set DB_CONNECTION and the other DB_* values in .env to use MySQL or MariaDB. Migrations load the matching schema snapshot for a new database.

For production, set APP_ENV=production and APP_DEBUG=false, point the web root to public/, and give the web and maintenance processes write access to storage/ and bootstrap/cache/.

Sample data

To create a test dataset, configure .env to point to a separate, empty database, then run:

php artisan migrate --seed

The seeder creates daily reports for the past three months. Set STATS_SEED_INSTALLATIONS in .env to change the number of installations.

Maintenance

php artisan stats:cache-graphs --force
php artisan stats:device-info --os=ios --limit=30
php artisan stats:purge

About

Code that supports https://stats.librenms.org

Resources

Stars

1 star

Watchers

11 watching

Forks

Releases

Packages

Contributors

Languages