RMM Providers - the RMMs ITFlow brings devices in from (functions/rmm.php), Tactical * RMM the first kind. Each row says which RMM it is, how many of its clients are linked to * yours, how many of its devices are assets here, whether its alerts open tickets and how its * last sync went. Its clients are * linked on its Clients page (rmm_clients.php). Add and Edit are one window * (modals/rmm/rmm_provider_edit.php); the rest are admin/post/rmm.php. * * Admin > Network Platforms (network_platforms.php) is this page for the network family's * kinds - UniFi - in its words (rmmFamilyWords()): platforms and their sites. */ // Default Column Sortby Filter $sort = "rmm_provider_name"; $order = "ASC"; require_once "includes/inc_all_admin.php"; $rmm_family = ($rmm_family ?? 'rmm') === 'network' ? 'network' : 'rmm'; $words = rmmFamilyWords($rmm_family); // The tables arrive with the 3.6.7 database update - and network platforms' columns with 4.1.5 if (!rmmTablesReady() || ($rmm_family === 'network' && !rmmNetworkReady())) { ?>
arrive with a database update - run it in Maintenance > Update first.
"rmm_provider_name $order", 'rmm_provider_kind' => "rmm_provider_kind $order, rmm_provider_name ASC", 'clients_linked' => "clients_linked $order, rmm_provider_name ASC", 'devices_in' => "devices_in $order, rmm_provider_name ASC", 'rmm_provider_sync_at' => "rmm_provider_sync_at IS NULL, rmm_provider_sync_at $order, rmm_provider_name ASC", ]; if (!isset($sortable_columns[$sort])) { $sort = 'rmm_provider_name'; } // A search for "tactical" finds Tactical RMM's providers by their kind's name too $kinds_found = array_keys(array_filter($kinds, function ($kind) use ($q) { return $q !== '' && stripos($kind['name'], stripslashes($q)) !== false; })); $kind_search = $kinds_found ? " OR rmm_provider_kind IN ('" . implode("', '", array_map('escapeSql', $kinds_found)) . "')" : ''; // Alerts open tickets once the 3.6.8 database update is in - and their open ones, with tickets. A family none of whose kinds has alerts has no column for them $alerts_ready = rmmAlertsReady() && array_filter($kinds, function ($kind) { return isset($kind['alerts'], $kind['alert']); }); $alerts_sql = $alerts_ready ? ", (SELECT COUNT(*) FROM rmm_alerts WHERE rmm_alert_provider_id = rmm_provider_id AND rmm_alert_cleared_at IS NULL AND rmm_alert_ticket_id > 0) AS alerts_open" : ''; $sql = mysqli_query($mysqli, "SELECT SQL_CALC_FOUND_ROWS rmm_providers.*, (SELECT COUNT(*) FROM rmm_clients WHERE rmm_client_provider_id = rmm_provider_id AND rmm_client_removed_at IS NULL) AS clients_total, (SELECT COUNT(*) FROM rmm_clients WHERE rmm_client_provider_id = rmm_provider_id AND rmm_client_removed_at IS NULL AND rmm_client_client_id > 0) AS clients_linked, (SELECT COUNT(*) FROM rmm_devices WHERE rmm_device_provider_id = rmm_provider_id AND rmm_device_removed_at IS NULL AND rmm_device_asset_id > 0) AS devices_in, (SELECT COUNT(*) FROM rmm_devices WHERE rmm_device_provider_id = rmm_provider_id AND rmm_device_removed_at IS NULL AND rmm_device_asset_id > 0 AND rmm_device_status = 'overdue') AS devices_overdue $alerts_sql FROM rmm_providers WHERE (rmm_provider_name LIKE '%$q%' OR rmm_provider_api_url LIKE '%$q%' OR rmm_provider_kind LIKE '%$q%'$kind_search) $family_sql ORDER BY {$sortable_columns[$sort]}, rmm_provider_id ASC LIMIT $record_from, $record_to"); $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); // Syncing needs cron - say so while a provider is on and it isn't running $any_on = intval(mysqli_fetch_row(mysqli_query($mysqli, "SELECT COUNT(*) FROM rmm_providers WHERE rmm_provider_active = 1 $family_sql"))[0]) > 0; $cron_on = intval(mysqli_fetch_row(mysqli_query($mysqli, "SELECT config_enable_cron FROM settings WHERE company_id = 1"))[0] ?? 0) === 1; $job = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT cron_job_enabled FROM cron_jobs WHERE cron_job_name = 'rmm_sync' LIMIT 1")); $job_on = !$job || intval($job['cron_job_enabled']) === 1; $add_url = 'modals/rmm/rmm_provider_add.php' . ($rmm_family === 'network' ? '?family=network' : ''); $csrf = $_SESSION['csrf_token']; ?>

Maintenance > Cron - devices only come in with Sync now.
">
Alerts
Unknown kind Off
of linked · devices
of linked
asset
overdue
Off
Didn't work:
Starts in a minute
open, with tickets
Not yet
Didn't work,
'network platforms', 'icon' => 'fa-network-wired', 'text' => 'Add your UniFi controller, a UniFi console, or every console your UI account has through Site Manager, and link its sites to your clients: their gateways, switches and access points come in as assets, matched to the ones you have by MAC address, and each shows whether it is online and whether its firmware is out of date - kept up every 15 minutes.', 'actions' => [['label' => 'New Platform', 'modal' => $add_url]], ] : [ 'thing' => 'RMM providers', 'icon' => 'fa-laptop-medical', 'text' => 'Add ' . escapeHtml(implode(' or ', array_column($kinds, 'name'))) . ' and link its clients to yours: their devices come in as assets, matched to the ones you have, and each asset shows whether it is online, who is signed in and what needs attention - kept up every 15 minutes.', 'actions' => [['label' => 'New Provider', 'modal' => $add_url]], ]; ?>