jasonmcintosh / rabbitmq-zabbix

Zabbix RabbitMQ Configuration
Apache License 2.0
251 stars 168 forks source link

Can't discovery items on secondary cluster node #87

Closed tluszczak closed 6 years ago

tluszczak commented 6 years ago

Hi, First of all, I would like to thank you for your effort in preparing this project. Your scripts work correctly as confirmed by logs. Issue is that can't auto discover items on the second leg of the rabbitmq cluster. Everything was discovered correctly on the basic one. Do you have any suggestions?

jasonmcintosh commented 6 years ago

When you say "second leg of the rabbitmq cluster" - not sure if I understand what you mean? Normally on a cluster, you can query the API of any member and find queue definitions for the entire cluster.

jasonmcintosh commented 6 years ago

Note if you query the API by hand, you can validate the queues and make sure they all return. The script just calls rabbitserver:port/api/queues

tluszczak commented 6 years ago

"second leg of the rabbitmq cluster" - of course 'second node'. Scripts return all values and zabbix-sender send them to zabbix-server. Problem is that two identically configured rabbitmq servers and clustered, can not be item-discovered by zabbix. I thougt that to run discovery items, nodes can not be clustered?

jasonmcintosh commented 6 years ago

SO what we ended up doing was on two of the nodes, disable the queue check and auto discovery rules. Since queues are cross-cluster, pick one to be your leader. Then on others apply a template (which is a clone of main template) with those two disabled. I'd not found a better solution due to how zabbix doesn't have a concept of clustered items that are cross server. Maybe there's a better way I've missed, but I don't do much in zabbix anymore.

tluszczak commented 6 years ago

Thank You for your support. I had to add all vhosts in 'Filters' in Template for secondary node.

jasonmcintosh commented 6 years ago

K closing this issue :) Wish there was a better solution, but trying to translate "cluster" concepts into zabbix which doesn't really understand "clustered" items was a challenge.