Troubleshooting a slow Zabbix installation


I inherited an (older) Zabbix 3.2.11 installation that has become really slow. It almost makes it unusable. It loads the pages but it takes a really long time. The Zabbix frontend is running on one machine and the MySQL on another one (a shared MySQL instance). I don't know enough about neither Zabbix nor MySQL to find the root cause of the problem. I can see though that the MySQL process is overloaded CPU-wise and that's not a good sign of course.

My colleague is telling me that the problem is that (possibly due to a bug) the housekeeping process on the database is not executed anymore and because of that the db is growing too much. An option would be to start with a fresh one (latest version) and just export the config from the old one to the new one without dragging along the garbage that piled up in the database. But he's also telling me that (according to him) there is no way to just extract the Zabbix config (all the hosts and parameters) from the MySQL db and import it in the new instance.

So the questions are:
- Is there really no way to extract the Zabbix config (hosts, SNMP setting, metrics, alarm thresholds, etc) from the MySQL and import it on a freshly installed Zabbix?
- What tools do I use to find the root cause of the slow page loads on the Zabbix front-end? Are there build in Zabbix performance troubleshooting tools? Or does mySQL has good performance monitoring tools to see where the high (I think abnormal) CPU usage is coming from?

If anyone knows Zabbix/MySQL really well and has time to assist me let me know. I'll pay you of course and the I'll post te solution here afterwards.

J ZSysAdminAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

John TsioumprisSoftware & Systems EngineerCommented:
Well i am afraid that i don't know anything about Zabbix but with a quick search it showed at first that it has export/import and given this it would be just a lab test to prepare another machine (VM) set it up and import the configuration to see how it goes...
Furthermore i guessed it relies on agent ...i guess this is the missing piece how easy is to reconfigure them to talk to the correct server
J ZSysAdminAuthor Commented:
Hi John,

My colleague tried that. But he told me importing it gives a lot of errors. We'll try it again and see what errors come out.

J ZSysAdminAuthor Commented:
The problem seems to be when we export the db using a mysql dump the export it seems to never end even if we wait 24 hours.

A way to export only the config using the web front-end is nowhere described as far as I can find.

1. Is there a way we can find out why the Zabbix front-end is so slow in the first place? Maybe it has nothing to do with the MySQL
2. Is it possible what my colleague is claiming that the housekeeping job hasn't run for a long time and because of that the database is blowing up? How do I check whether the housekeeping job has been running (or when it was the last time)? Can I start it manually?
IT Pros Agree: AI and Machine Learning Key

We’d all like to think our company’s data is well protected, but when you ask IT professionals they admit the data probably is not as safe as it could be.

theGhost_k8Database ConsultantCommented:
I can suggest for #1:
 1. Is there a way we can find out why the Zabbix front-end is so slow in the first place? Maybe it has nothing to do with the MySQL
> Enable slow query log and review queries if they're getting logged!
J ZSysAdminAuthor Commented:
You mean enabling slow query log on the MySQL right? Or on the Zabbix?
theGhost_k8Database ConsultantCommented:
MySQL for sure.
J ZSysAdminAuthor Commented:
OK, I'll try to find the way to enable the slow queries at the MySQL level. I have to look it up.

The other question is: How can I check my colleagues claim that the housekeeping process is the reason for the database to blow up. How can I know for sure that the housekeeping process is not running properly and how can I be sure that is the reason the database is blowing up? Its over 1 TB now.
J ZSysAdminAuthor Commented:
@John: I tried the export/import. But you can only export Templates and hosts and doing the import on the new zabbix install is generating a lot of errors of items he can't find. So I'm stuck there.
John TsioumprisSoftware & Systems EngineerCommented:
Is there any chance of updating your installation ? take a full backup and try to update it...maybe it will find the errors and fix them....
Something else...from the export procedure ...i guess that it's export is XML if everything fails...load the configuration on a XML reader like XML Viewer ....bite the bullet ...install everything from scratch...consult this XML on every step to see what is configured...

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
theGhost_k8Database ConsultantCommented:
Dear Author,

Please respond to the last comment and // or provide more inputs. The question is moving to auto close splitting the points in poarticipants.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.