Cacti / cacti

Cacti ™
http://www.cacti.net
GNU General Public License v2.0
1.64k stars 405 forks source link

Replicate deleted device status instead of poller sync #3741

Closed bmfmancini closed 4 years ago

bmfmancini commented 4 years ago

Hey Guys!

Currently in a multi poller setup when you delete a device that device will hang around until full poller sync is done I have my poller sync disabled I manually do it for big changes or auth changes etc

It would be nice and helpful if when a device is deleted that the change is pushed so that the device deletes without a poller sync

Thanks!

TheWitness commented 4 years ago

This seems more to be a bug.

bmfmancini commented 4 years ago

Good to know I thought it was by design but yea maybe would make sense to be a bug I have noticed it since 1.2.7

TheWitness commented 4 years ago

This is interesting, the 1.2.15 code should be removing those entries. My guess is that a mostly blank host entry is coming back as you are likely deleting the entry while the poller is running, and it's being added back again due to an update. I won't be able to fix this today, might need a day to re-verify the code, as it's supposed to have a delay.

bmfmancini commented 4 years ago

No worries at all ! thanks !

On Mon, Oct 19, 2020 at 1:26 PM TheWitness notifications@github.com wrote:

This is interesting, the 1.2.15 code should be removing those entries. My guess is that a mostly blank host entry is coming back as you are likely deleting the entry while the poller is running, and it's being added back again due to an update. I won't be able to fix this today, might need a day to re-verify the code, as it's supposed to have a delay.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Cacti/cacti/issues/3741#issuecomment-712315169, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADGEXTBZHAHHYQ6CX4XGVJ3SLRZFFANCNFSM4PVPJXXA .

-- Thank you

Sean Mancini,(Six Sigma LBBIT®, ITIL,CEA-IT®,SCRUM SMPC®) Owner/Principal Engineer www.seanmancini.com

“Companies spend millions of dollars on firewalls, encryption, and secure access devices, and it’s money wasted because none of these measures address the weakest link in the security chain.”

– Kevin Mitnick

TheWitness commented 4 years ago

I've looked over the code, we wait 500 seconds before removing taking a second shot at removing the remote device. As far as I can tell, this is working as expected. The only case where this will break is when the Cacti attempts to perform the purge, and the remote data collector can not be reached, in which case, you only option will be a full sync, which I have recently made a little less intrusive. So, let's just stick with that.

bmfmancini commented 4 years ago

Thanks for taking a look

It's so strange I have multiple installs including my lab that don't act this way

From the main collector you delete the device its marked as deleted in the deleted column with deleted = on

I even gave the system a day to see if the device purges but it doesn't

Confirmed main poller is able to talk to remote and vice versa but the device remains until a full sync

What's more is that the device will not be present in the device list but if you have thold or monitor it will show in that plugins device list

I'll keep digging

On Sat, Oct 24, 2020, 10:05 TheWitness notifications@github.com wrote:

I've looked over the code, we wait 500 seconds before removing taking a second shot at removing the remote device. As far as I can tell, this is working as expected. The only case where this will break is when the Cacti attempts to perform the purge, and the remote data collector can not be reached, in which case, you only option will be a full sync, which I have recently made a little less intrusive. So, let's just stick with that.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Cacti/cacti/issues/3741#issuecomment-715919893, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADGEXTDZ25N4Z3EVO534OATSMLNL3ANCNFSM4PVPJXXA .

TheWitness commented 4 years ago

If you are around today, we could do a WebEx, Zoom whatever. Just ping to the ticket. I'll be online most of the day.

bmfmancini commented 4 years ago

Hey Larry

Dang I wish I could can we do sometime this week ?

On Sun, Oct 25, 2020, 09:15 TheWitness notifications@github.com wrote:

If you are around today, we could do a WebEx, Zoom whatever. Just ping to the ticket. I'll be online most of the day.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Cacti/cacti/issues/3741#issuecomment-716146504, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADGEXTCADJRBBA7NPQVBEO3SMQQG5ANCNFSM4PVPJXXA .

TheWitness commented 4 years ago

Send an email to my cacti account with your mobile. I'll buzz you on Monday. Have to do it at lunch or evenings if we do it during the week.

bmfmancini commented 4 years ago

Hey @TheWitness I will send over my contact shortly I think I have narrowed down what the issue is atleast in my mind

when you delete a device check the main pollers db the last_updated time stamp always updates even on the device that has been deleted until you sync the pollers then it stops then after a few minutes the entries are purged