Merge pull request #1756 from laf/poller-debug

Clean up some poller debug + added updated version and last git commit
This commit is contained in:
Daniel Preussker
2015-08-25 09:04:18 +00:00
5 changed files with 11 additions and 5 deletions
+2 -2
View File
@@ -23,11 +23,11 @@ require 'includes/discovery/functions.inc.php';
$start = utime();
$runtime_stats = array();
// Observium Device Discovery
$options = getopt('h:m:i:n:d::a::q');
if (!isset($options['q'])) {
echo $config['project_name_version']." Discovery\n\n";
echo $config['project_name_version']." Discovery\n";
echo get_last_commit()."\n";
}
if (isset($options['h'])) {
+1 -1
View File
@@ -1633,7 +1633,7 @@ if (isset($config['enable_printers']) && $config['enable_printers']) {
//
// No changes below this line #
//
$config['version'] = '2014.master';
$config['version'] = '2015.master';
$config['project_name_version'] = $config['project_name'].' '.$config['version'];
if (isset($config['rrdgraph_def_text'])) {
+4
View File
@@ -1227,3 +1227,7 @@ function fping($host,$params) {
function function_check($function) {
return function_exists($function);
}
function get_last_commit() {
return `git log -n 1|head -n1`;
}//end get_last_commit
+2 -1
View File
@@ -278,7 +278,8 @@ function poll_device($device, $options) {
// echo("$device_end - $device_start; $device_time $device_run");
echo "Polled in $device_time seconds\n";
d_echo('Updating '.$device['hostname'].' - '.print_r($update_array)." \n");
d_echo('Updating '.$device['hostname']."\n");
d_echo($update_array);
$updated = dbUpdate($update_array, 'devices', '`device_id` = ?', array($device['device_id']));
if ($updated) {
+2 -1
View File
@@ -22,7 +22,8 @@ require 'includes/polling/functions.inc.php';
require 'includes/alerts.inc.php';
$poller_start = utime();
echo $config['project_name_version']." Poller\n\n";
echo $config['project_name_version']." Poller\n";
echo get_last_commit()."\n";
$options = getopt('h:m:i:n:r::d::a::');