Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Wed Dec 19, 2018 10:55 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Get the hostname odf a device, just before is deleted
PostPosted: Wed Sep 26, 2018 8:55 am 
Offline
Cacti User

Joined: Wed Dec 07, 2011 9:19 am
Posts: 301
Hello,
In my plugin I need to get back the hostname and/or the description of a device just before/or after it is deleted
the hook remove_device give me only the hos_it but it send after the host is deleted so I can't linkit to an external tools.

Any clue how I can handle that ?

thanks

_________________
CentOS
Production
Cacti 0.8.8h
Spine 0.8.8h
PIA 3.1
Aggregate 0.75
Monitor 1.3
Settings 0.71
Weathermap 0.98
Thold 0.5
rrdclean 0.41

Own plugin: LinkDiscovery 0.3, Map 0.4

Test
Cacti 1.2beta4
Spine 1.2
thold 1.0.6
monitor 2.3.5
php 7.2.11
mariadb 5.5.56
Own plugin:
ExtendDB 1.1.2
LinkDiscovery 1.2.4
Map 1.2.5


Top
 Profile  
 
 Post subject: Re: Get the hostname odf a device, just before is deleted
PostPosted: Wed Sep 26, 2018 11:02 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 1827
That is correct. And it gets worse when I looked at it. If a device is removed at the command line, you may not get a hook call at all since it's only in host.php. I've opened issue 1982 for that last part. If you wish to request a hook, we can put this into 1.2 if you want to open a feature request on GitHub.

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: Get the hostname odf a device, just before is deleted
PostPosted: Thu Sep 27, 2018 2:41 am 
Offline
Cacti User

Joined: Wed Dec 07, 2011 9:19 am
Posts: 301
Well if I look you issue, I will just add that I't can be great to receive some information when calling the hook, not just the host id.
But I don't think it's necessary to open a new one

_________________
CentOS
Production
Cacti 0.8.8h
Spine 0.8.8h
PIA 3.1
Aggregate 0.75
Monitor 1.3
Settings 0.71
Weathermap 0.98
Thold 0.5
rrdclean 0.41

Own plugin: LinkDiscovery 0.3, Map 0.4

Test
Cacti 1.2beta4
Spine 1.2
thold 1.0.6
monitor 2.3.5
php 7.2.11
mariadb 5.5.56
Own plugin:
ExtendDB 1.1.2
LinkDiscovery 1.2.4
Map 1.2.5


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group