Commit version 24.12.13800

This commit is contained in:
2025-01-06 17:35:06 -05:00
parent b7f6a79c2c
commit 55d9218816
6133 changed files with 4239740 additions and 1374287 deletions

View File

@ -3,7 +3,7 @@
*
* @package observium
* @subpackage poller
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
* @copyright (C) Adam Armstrong
*
*/
@ -12,28 +12,26 @@ global $graphs;
//$count = dbFetchCell('SELECT COUNT(*) FROM `counters` WHERE `device_id` = ? AND `counter_deleted` = ?;', array($device['device_id'], '0'));
//print_cli_data("Counters Count", $count);
if (dbExist('counters', '`device_id` = ? AND `counter_deleted` = ?', [$device['device_id'], '0']) > 0)
{
if (dbExist('counters', '`device_id` = ? AND `counter_deleted` = ?', [$device['device_id'], '0']) > 0) {
poll_cache_oids($device, 'counter', $oid_cache);
poll_cache_oids($device, 'counter', $oid_cache);
global $table_rows;
$table_rows = array();
global $table_rows;
$table_rows = [];
global $multi_update_db;
$multi_update_db = array();
global $multi_update_db;
$multi_update_db = [];
poll_counter($device, $oid_cache);
poll_counter($device, $oid_cache);
if (count($multi_update_db))
{
print_debug("MultiUpdate counter DB.");
// Multiupdate required all UNIQUE keys!
dbUpdateMulti($multi_update_db, 'counters');
}
if (count($multi_update_db)) {
print_debug("MultiUpdate counter DB.");
// Multiupdate required all UNIQUE keys!
dbUpdateMulti($multi_update_db, 'counters');
}
$headers = array('%WDescr%n', '%WClass%n', '%WMIB::Oid.Index%n', '%WValue%n', '%WRate%n', '%WStatus%n', '%WLast Changed%n', '%WOrigin%n');
print_cli_table($table_rows, $headers);
$headers = ['%WDescr%n', '%WClass%n', '%WMIB::Oid.Index%n', '%WValue%n', '%WRate%n', '%WStatus%n', '%WLast Changed%n', '%WOrigin%n'];
print_cli_table($table_rows, $headers);
}