I have 2 nodes, each with their own Zabbix Server and Java Gateway (both version 2.0.6)
Each node has 2 ActiveMQ brokers (each on their own VM) that store messages in a queue. These ActiveMQ servers run in a balanced scenario meaning that either of them could have messages in their queue. Let's call this queue 'queue1'.
ActiveMQ has a set of JMX Mbeans, one of these displays the number of messages in a queue for a specific broker.
I have a JMX item in Zabbix to return the value of this Mbean (the number of messages in 'queue1'.
I have created a Calculated Item to add the last returned value from the JMX item to give me a total number of messages in 'queue1' for the node (across both ActiveMQ brokers).
Here are is the calculated item that I have configured on both nodes:
last("activemq1.hostname:jmx[\"org.apache.activemq:BrokerName=broker1,Type=Queu e,Destination=queue1\",\"QueueSize\"]")+last("activemq2.hostname:jmx[\"org.apache.activemq:BrokerName=broker2,Type=Queu e,Destination=queue1\",\"QueueSize\"]")
Node 1: JMX items work correctly. Calculated item works correctly.
Node 2: JMX items work correctly. Calculated item doesn't work and returns the following error:
Item [activemq1.hostname:jmx["org.apache.activemq:BrokerName=broker1+broker2,Ty pe=Queue,Destination=queue1","QueueSize"]] error: Cannot evaluate function [last()]: item [activemq1.hostname:jmx["org.apache.activemq:BrokerName=broker1,Type=Queue ,Destination=queue1","QueueSize"]] not found
Initially I set up the JMX and calculated items with user macros for the hostnames and it worked correctly on Node 1, however the issue occurred on Node 2 so I tested it without the macros. Same result (Node 1 working, Node 2 not working)
I can't understand why the calculated item on Node 2 isn't working. It's essentially identical to the one on Node 1 (except for arbitrary values such as hostname, broker name and queue name).
Debugging Zabbix Server gave me some logs but the most useful was the one I included above. If it would help, I can attach the logs. I haven't done this as it will take some time to remove all the confidential information.
Each node has 2 ActiveMQ brokers (each on their own VM) that store messages in a queue. These ActiveMQ servers run in a balanced scenario meaning that either of them could have messages in their queue. Let's call this queue 'queue1'.
ActiveMQ has a set of JMX Mbeans, one of these displays the number of messages in a queue for a specific broker.
I have a JMX item in Zabbix to return the value of this Mbean (the number of messages in 'queue1'.
I have created a Calculated Item to add the last returned value from the JMX item to give me a total number of messages in 'queue1' for the node (across both ActiveMQ brokers).
Here are is the calculated item that I have configured on both nodes:
last("activemq1.hostname:jmx[\"org.apache.activemq:BrokerName=broker1,Type=Queu e,Destination=queue1\",\"QueueSize\"]")+last("activemq2.hostname:jmx[\"org.apache.activemq:BrokerName=broker2,Type=Queu e,Destination=queue1\",\"QueueSize\"]")
Node 1: JMX items work correctly. Calculated item works correctly.
Node 2: JMX items work correctly. Calculated item doesn't work and returns the following error:
Item [activemq1.hostname:jmx["org.apache.activemq:BrokerName=broker1+broker2,Ty pe=Queue,Destination=queue1","QueueSize"]] error: Cannot evaluate function [last()]: item [activemq1.hostname:jmx["org.apache.activemq:BrokerName=broker1,Type=Queue ,Destination=queue1","QueueSize"]] not found
Initially I set up the JMX and calculated items with user macros for the hostnames and it worked correctly on Node 1, however the issue occurred on Node 2 so I tested it without the macros. Same result (Node 1 working, Node 2 not working)
I can't understand why the calculated item on Node 2 isn't working. It's essentially identical to the one on Node 1 (except for arbitrary values such as hostname, broker name and queue name).
Debugging Zabbix Server gave me some logs but the most useful was the one I included above. If it would help, I can attach the logs. I haven't done this as it will take some time to remove all the confidential information.