Skip to content

Commit

Permalink
Merge pull request #3049 from laf/updown
Browse files Browse the repository at this point in the history
Added reason why device goes up/down to eventlog
  • Loading branch information
f0o committed Feb 22, 2016
2 parents e7b994c + 4f3acee commit 4248617
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/polling/functions.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ function poll_device($device, $options) {

dbUpdate(array('status' => $status, 'status_reason' => $response['status_reason']), 'devices', 'device_id=?', array($device['device_id']));

log_event('Device status changed to '.($status == '1' ? 'Up' : 'Down'), $device, ($status == '1' ? 'up' : 'down'));
log_event('Device status changed to '.($status == '1' ? 'Up' : 'Down'). ' from ' . $response['status_reason'] . ' check.', $device, ($status == '1' ? 'up' : 'down'));
}

if ($status == '1') {
Expand Down

0 comments on commit 4248617

Please sign in to comment.