PHP code example of drakelid / librenms-dashboard-widgets
1. Go to this page and download the library: Download drakelid/librenms-dashboard-widgets 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/ */
drakelid / librenms-dashboard-widgets example snippets
sql
SELECT COUNT(*) FROM sensors WHERE sensor_class='dbm' AND sensor_deleted=0; -- optical
SELECT COUNT(*) FROM bgpPeers; -- BGP
SELECT sensor_class, COUNT(*) FROM sensors WHERE sensor_deleted=0 GROUP BY 1; -- power