#!/usr/bin/php -q 1 AND disabled=""'); } else { $pollers = db_fetch_assoc_prepared('SELECT id FROM poller WHERE id != 1 AND id = ? AND disabled=""', array($poller_id)); } if (sizeof($pollers)) { foreach ($pollers as $poller) { replicate_out($poller['id'], $class); db_execute_prepared('UPDATE poller SET last_sync = NOW(), requires_sync="" WHERE id = ?', array($poller['id'])); cacti_log('STATS: Poller ID ' . $poller['id'] . ' fully Replicated', false, 'POLLER'); } } else { print 'FATAL: The poller specified ' . $poller_id . ' is either disabled, or does not exist!' . PHP_EOL; exit(1); } /* display_version - displays version information */ function display_version() { $version = get_cacti_cli_version(); print "Cacti Poller Full Sync Utility, Version $version, " . COPYRIGHT_YEARS . "\n"; } /* display_help - displays the usage of the function */ function display_help () { display_version(); print "\nA utility to fully Synchronize Remote Data Collectors.\n\n"; print "usage: poller_output_empty.php [--poller=N] [--class=all|data|auth|settings]\n\n"; print "Optional:\n"; print " --poller=N The numeric id of the poller to replicate out. Otherwise all\n"; print " pollers. The default is all.\n"; print " --class=S The class of data to replicate. Includes all, data, auth\n"; print " settings. The default is all.\n"; }