Ad blocker detected: Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker on our website.
I've upgraded successfully main cacti server from 1.1.38 to 1.2.10 and then installed new remote poller 1.2.10 from scratch.
Everything was fine before initial sync to remote poller. Right after that any query to remote poller return fatal error 500.
PHP Fatal error: Call to undefined function cacti_log_file() in /usr/share/cacti/include/global.php on line 345
When I tried to look for cacti_log_file function I found that it has gone after sync from /usr/share/cacti/lib/functions.php file.
Is it bug that cacti_log_file function was removed from remote poller or it is working as expected?
If it's expected - how to fix the issue? What I'm doing wrong?
TheWitness wrote: ↑Tue Apr 07, 2020 10:38 am
If you a upgrade to 1.2.11, then all the remote pollers will self upgrade. You don't have to do anything.
So do you want to say there is a bug in 1.2.10 and cacti_log_file() function is removed on remote pollers from /usr/share/cacti/lib/functions.php file by mistake?
TheWitness wrote: ↑Wed Apr 08, 2020 8:11 pm
It exists in lib/functions.php, which is included very early in global.php. So, it's already there. Line 245.
It exists until remote poller is fully sync'ed with main server. After full sync lib/functions.php on remote poller is rewritten and new lib/functions.php file does not contain cacti_log_file() function anymore.
Looking further into the problem I've found that remote poller (as part of initial full sync from main poller) have got lib/functions.php file from cacti version 1.1.38. But main server was upgraded to version 1.2.10. How it can be?
Can somebody explain the mechanics of updating of php-files from cache on remote pollers?
Where the content of these files come from - is it from main server's mysql database or from main server's file system?
I've found the cause of problem - poller_resource_cache table on main server contained files from the past cacti versions (1.1.38 and so on). After initial sync remote pollers got wrong versions of files from that table and went to unreachable state because of that.
Solution is to 'Rebuild Resource Cache' (Utilities -> System Utilities -> Rebuild Resource Cache) on main server before to add any new remote pollers.
It's definitely gap of upgrade script and it should be addressed in future cacti versions.
That sounds like a bug if your cache isn't updating. Basically, it should be checking files and seeing a difference so putting them into the resources table.
Yea, agree we should log a bug on this. There is a setting to disable, but it we do, we should also purge it. Also, the remote should not pluck the files if they are there.
True understanding begins only when we realize how little we truly understand...