Cacti / cacti

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

[1.2.16-1.2.20] Autom8 SNMP Race condition #4712

Closed bmfmancini closed 1 year ago

bmfmancini commented 2 years ago

Hey All,

I have come across an interesting issue today on multiple versions of cacti

Say you have an autom8 rule where you want to skip a set of devices with a specific snmp description like so

image

During the device discovery while the device is in an unknown state autom8 doesn't have the SNMP details in the database yet to compare this condition too and will generate the graphs for this rule

Now if you use a condition like snmp_community does not equal some value then it will work since that data has been written since cacti is able to talk to the device

I belive Autom8 should collect the snmp details into the DB then run the rules against it this is happening on remote and main pollers

TheWitness commented 2 years ago

Data Query Graphs right?

TheWitness commented 2 years ago

What I'm confused about is that the device needs to be in the database before any automation is run on it. So, state again what is happening? Something does not make sense.

bmfmancini commented 2 years ago

@TheWitness sorry just getting back to this

So what I am seeing is when a device is discovered there is a brief time that the device is in an unknown state during that time the device selection rules seem to be ignored, I added a rule that if a specific device type is found not to create traffic graphs yet the graphs are created

when I check which objects would be selected the newly found device in an unknown state shows up until it's in upstate then the device is fine from the list

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

TheWitness commented 1 year ago

Keeping this open. Make it a 1.3 target.

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.