Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated Networks are not being properly replicated to additional pollers #2632

Closed
mmccaugh1 opened this issue Apr 17, 2019 · 2 comments
Closed
Labels
bug Undesired behaviour resolved A fixed issue
Milestone

Comments

@mmccaugh1
Copy link

Describe the bug
In Version 1.2.x Automation Scans appear to be broken.

To Reproduce
Steps to reproduce the behavior:

  1. On Master Node Define a New Scan
  2. Execute Scan by Selecting "Discover Now"

Expected behavior
Scan should run on the selected poller and return valid results which can then be imported to cacti.

Screenshots
When the scan is run the following errors appear in Cacti.log

2019/04/15 19:00:43 - AUTOM8 [PID: 9684] Network Discover is now running for Subnet Range '31'
2019/04/15 19:00:43 - ERROR PHP NOTICE: Undefined index: dns_servers in file: /var/www/html/cacti-1.2.3/poller_automation.php on line: 362
2019/04/15 19:00:43 - CMDPHP PHP ERROR NOTICE Backtrace: (/poller_automation.php[345]:discoverDevices(), /poller_automation.php[362]:CactiErrorHandler())
2019/04/15 19:00:43 - ERROR PHP NOTICE: Undefined index: name in file: /var/www/html/cacti-1.2.3/poller_automation.php on line: 763
2019/04/15 19:00:43 - CMDPHP PHP ERROR NOTICE Backtrace: (/poller_automation.php[345]:discoverDevices(), /poller_automation.php[763]:CactiErrorHandler())
2019/04/15 19:00:43 - AUTOM8 [PID: 9686] Network Thread 1 Finished, 0 IPs Scanned, 0 IPs Responded to Ping, 0 Responded to SNMP, 0 Device Added, 0 Graphs Added to Cacti

Additional context
Digging deeper into this by enabling MySQL logging it appears the new versions are querying automation_networks on the poller (Among other tables), this was I believe originally pulled from MySQL on the master node.

Looking at these database tables on the remote pollers these tables are not being replicated out from the master node, so for instance the SQL Query :

SELECT * FROM automation_networks WHERE id = '32'

Will be run by the automation interface, but as row exists in this table on the poller the variables this query depend on are left as null which causes the above errors.

I have built a master and poller from scratch in my lab on 1.2.3 and confirmed the observed behavior presents even on a new install (This was done to confirm I had a known good db schema, and there were absolutely no chances of any corruption or other issues to cause this, these are fresh, unmodified installs)

cigamit added a commit that referenced this issue Apr 18, 2019
Automated Network Scans are Not Working
@cigamit cigamit added bug Undesired behaviour resolved A fixed issue labels Apr 18, 2019
@cigamit
Copy link
Member

cigamit commented Apr 18, 2019

Okay, update lib/poller.php from develop and perform a full sync. I'm fixing this way, but this may be temporary.

@cigamit cigamit added this to the v1.2.4 milestone Apr 18, 2019
@mmccaugh1
Copy link
Author

This did indeed correct the automation_networks db, however there appear to be ancillary tables needed (automation_snmp, and automation_snmp_items I found so far)

I can easily expand on what you have done to add tables as I find them, but it may be prudent to have some manner of gap/calibration assessment to identify tables that are not being replicated to pollers but are leveraged by functionality that has been migrated to the pollers.

For now I am going to leave this as a known bug that may be fixed in 1.2.4 but I believe the scope may extend beyond this 1 function.

@netniV netniV changed the title Automated Network Scans are Not Working Automated Networks are not being properly replicated to additional pollers Apr 28, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Undesired behaviour resolved A fixed issue
Projects
None yet
Development

No branches or pull requests

2 participants