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. */ // Default Column Sortby Filter $sort = "rmm_provider_name"; $order = "ASC"; require_once "includes/inc_all_admin.php"; // The tables arrive with the 3.6.7 database update if (!rmmTablesReady()) { ?>
RMM Providers 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 $alerts_ready = rmmAlertsReady(); $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) 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"))[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; $sort_link = function ($column, $label) use ($url_query_strings_sort, $sort, $disp, $order_icon) { return '' . $label . ($sort === $column ? " $order_icon" : '') . ''; }; $add_url = 'modals/rmm/rmm_provider_add.php'; $csrf = $_SESSION['csrf_token']; ?>

RMM Providers

Maintenance > Cron - devices only come in with Sync now.
">
Alerts
Unknown kind Off
of clients linked · devices
of linked
asset
overdue
Off
Didn't work:
Starts in a minute
open, with tickets
Not yet
Didn't work,
'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' => 'Add Provider', 'modal' => $add_url]], ]; ?>