Skip to content

Commit

Permalink
Add logging upon deletion using remove_device.php (#5826)
Browse files Browse the repository at this point in the history
* Update remove_device.php

Add logging to cacti log upon removal

* Update remove_device.php
  • Loading branch information
bmfmancini authored and TheWitness committed Sep 18, 2024
1 parent 7c0e090 commit 0c6f229
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cli/remove_device.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@
$ids_found[] = $host['id'];
}



print PHP_EOL;
}

Expand All @@ -197,6 +199,10 @@
exit(1);
} else {
print "Success - removed device-ids: $ids_confirm" . PHP_EOL;
foreach ($hosts as $host) {
cacti_log("CLI: Device Removed via remove_device.php - Device ID: " . $host['id'] . ", Hostname: " . $host['hostname'] . ", Description: " . $host['description']);
}

exit(0);
}
} else {
Expand Down

0 comments on commit 0c6f229

Please sign in to comment.