Hello,
I setup the device_remove hook, to be able to clean up my table when a device is removed!
It's executed, but then it got me a blank screen, nothing on cacti.log file, but this on the apache error log:
[Mon Jan 30 11:05:14.955649 2017] [:error] [pid 31020] [client 10.85.116.130:53200] PHP Warning: Cannot modify header information - headers already sent in /usr/share/cacti/host.php on line 311, referer: http://lslcact01.lausanne.ch/cacti/host.php
and this is my hook:
function linkdiscovery_device_remove( $hosts_id ){
//array(1) { [0]=> string(4) "1921" } device remove :
foreach( $hosts_id as $host_id) {
// remove host from plugin_linkdiscovery_hosts and plugin_linkdiscovery_intf
db_execute("DELETE FROM plugin_linkdiscovery_hosts where id=".$host_id );
db_execute("DELETE FROM plugin_linkdiscovery_intf where host_id_dst=".$host_id );
db_execute("DELETE FROM plugin_linkdiscovery_intf where host_id_src=".$host_id );
}
return;
}
any clue what is wrong ?
thanks
device_remove hook, working but then blank screeb
Moderators: Developers, Moderators
device_remove hook, working but then blank screeb
Test
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
Who is online
Users browsing this forum: No registered users and 1 guest