PHP code example of palerm0 / librenms-config-compliance
1. Go to this page and download the library: Download palerm0/librenms-config-compliance library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
palerm0 / librenms-config-compliance example snippets
bash
cd /opt/librenms
sudo -u librenms php artisan cache:clear
sudo -u librenms php artisan view:clear
sudo -u librenms php artisan route:clear
librenms-config-compliance/
├── composer.json
├── routes/web.php
├── resources/views/
│ ├── menu.blade.php Menu item
│ └── page.blade.php The plugin page
└── src/
├── ConfigComplianceProvider.php Bootstrap file (registers everything)
├── ComplianceEngine.php Core logic: rules, scan, storage
├── Console/ScanCommand.php The 'lnms config-compliance:scan' command
├── Controllers/CompliancePageController.php
└── Hooks/MenuEntry.php Menu hook