Skip to content

Commit

Permalink
Remediate Poller Output Not Empty Warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
TheWitness committed Oct 15, 2021
1 parent 841a256 commit 090ce94
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/poller.php
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,9 @@ function process_poller_output(&$rrdtool_pipe, $remainder = false) {

if ($remainder) {
/* check if too many rows pending */
$rows = db_fetch_cell('SELECT COUNT(*) FROM poller_output');
$rows = db_fetch_cell('SELECT COUNT(local_data_id)
FROM poller_output');

if ($rows > $max_rows && $have_deleted_rows === true) {
$limit = ' LIMIT ' . $max_rows;
} else {
Expand Down Expand Up @@ -551,7 +553,11 @@ function process_poller_output(&$rrdtool_pipe, $remainder = false) {
$rrd_update_array = NULL;

/* to much records in poller_output, process in chunks */
if ($remainder && $limit != '') {
$rows = db_fetch_cell('SELECT COUNT(local_data_id)
FROM poller_output');

/* to much records in poller_output, process in chunks */
if ($rows && $remainder) {
$rrds_processed += process_poller_output($rrdtool_pipe, $remainder);
}
}
Expand Down

0 comments on commit 090ce94

Please sign in to comment.