* * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or (at your * option) any later version. Please see LICENSE.txt at the top level of * the source code distribution for details. */ use LibreNMS\Config; $pagetitle[] = 'Pollers'; require_once 'includes/modal/delete_poller.inc.php'; ?>

Standard Pollers

'; foreach ($rows as $poller) { $old = ($poller['now'] - $poller['then']); $step = Config::get('rrd.step', 300); if ($old >= $step) { $row_class = 'danger'; } elseif ($old >= ($step * 0.95)) { $row_class = 'warning'; } else { $row_class = 'success'; } $actions = ""; if (\Auth::user()->hasGlobalAdmin() && $old > ($step * 2)) { // missed 2 polls show delete button $actions .= ""; } echo ' '; } echo '
Poller Name Devices Polled Total Poll Time Last Ran Actions
'.$poller['poller_name'].' '.$poller['devices'].' '.$poller['time_taken'].' Seconds '.$poller['last_polled'].' '.$actions.'
'; } $query = 'SELECT *,UNIX_TIMESTAMP(NOW()) AS `now`, UNIX_TIMESTAMP(`last_report`) AS `then` FROM `poller_cluster` ORDER BY poller_name'; $rows = dbFetchRows($query); if (count($rows) !== 0) { echo '

Poller Cluster Health

'; foreach ($rows as $poller) { $old = ($poller['now'] - $poller['then']); $step = Config::get('rrd.step', 300); if ($old >= $step) { $row_class = 'danger'; } elseif ($old >= ($step * 0.95)) { $row_class = 'warning'; } else { $row_class = 'success'; } $actions = ""; if (\Auth::user()->hasGlobalAdmin() && $old > ($step * 2)) { // missed 2 polls show delete button $actions .= ""; } $stat_query = 'SELECT * FROM `poller_cluster_stats` WHERE `parent_poller`=' . $poller['id'] . ';'; $stat_row = dbFetchRows($stat_query); $stat_count = count($stat_row); $first_row = true; foreach ($stat_row as $stats) { // Emit the row container echo ''; if ($first_row) { // On the first iteration, print some rowspanned columns echo ' '; } // Emit the job stats echo ' '; if ($first_row) { // On the first iteration, print some rowspanned columns echo ''; } // End the row echo ''; $first_row = false; } } echo '
Name Node ID Version Groups Served Last Checkin Cluster Master Job Workers Devices Actioned
Last Interval
Devices Pending Worker Seconds
Consumed/Maximum
Actions
'.$poller['poller_name'].' '.$poller['node_id'].' '.$poller['poller_version'].' '.$poller['poller_groups'].' '.$poller['last_report'].' '. ($poller['master'] ? "Yes" : "No") .''.$stats['poller_type'].' '.$stats['workers'].' '.$stats['devices'].' '.$stats['depth'].' '.$stats['worker_seconds'].' / '.$stats['frequency']*$stats['workers'].''.$actions.'
Worker seconds indicates the maximum polling throughput a node can achieve in perfect conditions. If the consumed is close to the maximum, consider adding more threads, or better tuning your groups.
If there are devices pending but consumed worker seconds is low, your hardware is not sufficient for the number of devices and the poller cannot reach maximum throughput.
'; } ?>