Skip to content

Commit

Permalink
Fixing #5727: Fail and Recovery Date Issues with cmd.php
Browse files Browse the repository at this point in the history
Incorrect values status_fail_date and status_rec_date with cmd poller
  • Loading branch information
TheWitness committed Apr 14, 2024
1 parent 5362720 commit 44ba0f5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Expand Up @@ -20,6 +20,7 @@ Cacti CHANGELOG
-issue#5701: Bad URL formating in the templates_import.php preview mode
-issue#5720: mysql.time_zone_name table DB check isn't being made on Remote Poller installation
-issue#5723: Remote Poller installation is finished successfully but no "finish" button
-issue#5727: Incorrect values status_fail_date and status_rec_date with cmd poller
-feature#5692: Add a "device enabled/disabled" indicator next to the graphs
-feature#5716: Add Aruba Clearpass template

Expand Down
8 changes: 6 additions & 2 deletions lib/functions.php
Expand Up @@ -1630,11 +1630,15 @@ function update_host_status($status, $host_id, &$ping, $ping_availability, $prin

/* initialize fail and recovery dates correctly */
if ($host['status_fail_date'] == '') {
$host['status_fail_date'] = strtotime('0000-00-00 00:00:00');
$host['status_fail_date'] = 0;
} else {
$host['status_fail_date'] = strtotime($host['status_fail_date']);;
}

if ($host['status_rec_date'] == '') {
$host['status_rec_date'] = strtotime('0000-00-00 00:00:00');
$host['status_rec_date'] = 0;
} else {
$host['status_rec_date'] = strtotime($host['status_rec_date']);;
}

if ($status == HOST_DOWN) {
Expand Down

0 comments on commit 44ba0f5

Please sign in to comment.