<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
drakelid / interface-alert-policy-manager example snippets
bash
cd /opt/librenms
# Record the plugin so LibreNMS updates cannot drop it.
# Merge this entry by hand if composer.plugins.json already exists.
sudo -u librenms tee composer.plugins.json >/dev/null <<'JSON'
{
"e --force
sudo -u librenms ./lnms plugin:enable interface-alert-policy-manager
sudo -u librenms php artisan optimize:clear
sudo systemctl reload "php$(php -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')-fpm"
bash
echo 'IAPM_QUEUE_CONNECTION=database' | sudo tee -a /opt/librenms/.env
cd /opt/librenms && sudo -u librenms php artisan config:clear
bash
echo 'IAPM_QUEUE_WORKERS=0' | sudo tee -a /opt/librenms/.env
# optional: keep queue load off MySQL at scale
# echo 'IAPM_QUEUE_CONNECTION=redis' | sudo tee -a /opt/librenms/.env
cd /opt/librenms && sudo -u librenms php artisan config:clear
sudo -u librenms bash -lc 'command -v php' # note the php path for the unit below
text
macros.device_up = 1 AND ports.ifAdminStatus = 'up' AND ports.ifOperStatus != 'up' AND ports.ignore = 0 AND ports.disabled = 0 AND ports.deleted = 0
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.