Hi, I have an issue making the "RabbitMQ node by Zabbix agent" template work (Zabbix 6.2.6), more specifically on lines like this:
because in my case the {HOST.NAME} (so basically the displayed name set in the agent configuration) and the rabbitmq node name (which is the system hostname) are different.
I've tried using {HOST.DNS} but this expands to an emptry string, {HOST.DNS1} which remains a string, or ip-{{HOST.IP}.regsub(\.,-}} which again just stays as it is, like a string. I've tried also with agent.hostname, no luck.
Is there any way in which I can use the system hostname on that expression, in stead of {HOST.NAME}? Or any way in which i can apply regsub to {HOST.IP} at least (all I need is to replace . with -)?
Code:
master_item:
key: 'web.page.get["{$RABBITMQ.API.SCHEME}://{$RABBITMQ.API.USER}:{$RABBITMQ.API.PASSWORD}@{$RABBITMQ.API.HOST}:{$RABBITMQ.API.PORT}/api/nodes/{$RABBITMQ.CLUSTER.NAME}@{HOST.NAME}?memory=true"]'
I've tried using {HOST.DNS} but this expands to an emptry string, {HOST.DNS1} which remains a string, or ip-{{HOST.IP}.regsub(\.,-}} which again just stays as it is, like a string. I've tried also with agent.hostname, no luck.
Is there any way in which I can use the system hostname on that expression, in stead of {HOST.NAME}? Or any way in which i can apply regsub to {HOST.IP} at least (all I need is to replace . with -)?
Comment