Can someone tell me how I can check if Zabbix Server is really working? Something beyond 'ps -A' ? I want to be sure if it's listening on it's port, and trying to monitor hosts and doing so successfully. I want to do this from the commandline. Please help!
Ad Widget
Collapse
Probing Zabbix server? Please help!
Collapse
X
-
Tags: None
-
you could try telnetting to port 10051 (zabbix server port).
that at least will show whether it accepts incoming connections from active agents.
i'm not sure whether there's an easy way to determine whether data is coming in from cli, except maybe wget/curl/links/lynx -
This is a tough one. You could also do something like this in Mysql
select * from history where clock>(unix_timestamp()-60);
However when I run this on my system it's a very expensive query, when it really shouldn't. It's only returning the values from the last 60 seconds. I wonder if adding a index for clock would help.
The biggest problem is how do you detect if one of the threads is stuck? The best way I've found to detect this is to watch the queue.RHCE, author of zbxapi
Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM
Comment
-
Telnet
Thanks guys, here's what I have in mind.
Here's what I have in mind:
A two stage probe, which checks one after the following:
1) Checking to see if Zabbix is listening to the respective port and accepting connections from agents.
2) Check to see if Zabbix is writing to the database, by somehow finding out the timestamp of last access, comparing it with the current system timestamp, and then checking to see if the difference is normal or abnormal. We'd have to write rules for all four kinds of databases.
And yes, seems like checking if all threads are working is the main difficulty :|
Keep the ideas flowing guys, so I can finally get down to coding this thing!
Cheers!Comment
-
Thanks for your suggestion on watching the history. I added an index on the clock field from the history table. On a table size of roughly 5 million records, my query went down from ~15 second average, to less than .1 second.
Thank you,
ChipComment
-
How long did it take to add the index? I'm thinking of doing it but I think I'm going to have to wait until I move my DB to new disks. 74 Million rows might take a while.
Have you noticed any improvement in graph performance? I would not expect it as graph queries use the existing double column index.RHCE, author of zbxapi
Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM
Comment
-
Hello Nelson,How long did it take to add the index? I'm thinking of doing it but I think I'm going to have to wait until I move my DB to new disks. 74 Million rows might take a while.
Have you noticed any improvement in graph performance? I would not expect it as graph queries use the existing double column index.
Yes, you might want to wait on adding the index. it was about 45 seconds to do it, from what I remember. With 74 million rows, that would be much much longer. As far as any performance improvements in graphing, I've noticed none.
ChipComment
-
Be aware that any new index will REDUCE database performance! Don't do that.
Comment
Comment