This repo contains my script for fetching data about device downtime from the LibreNMS MySQL DB.
For correct work you must have an alert rule with number 1 based on the "Device up/down" template.
Moreover you must change values in the config.txt to your database parameters