[ZBXNEXT-3764] Extend Zabbix get to support requests towards Zabbix Java gateway Created: 2017 Mar 27  Updated: 2020 Jun 11

Status: Open
Project: ZABBIX FEATURE REQUESTS
Component/s: None
Affects Version/s: 3.0.8
Fix Version/s: None

Type: Change Request Priority: Major
Reporter: Marc Assignee: Unassigned
Resolution: Unresolved Votes: 15
Labels: debugging, javagateway, sender
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File get.sh     File get.sh     File zabbix_get_jmx_3.4.7.sh     File zabbix_get_jmx_4_2.sh    
Issue Links:
Duplicate
is duplicated by ZBX-13681 JMX bad protocol header Closed

 Description   

Zabbix get is a very helpful debugging tool by acting like a Zabbix proxy towards Zabbix agents for passive checks. It saves a lot of time as there is no need to wait for configuration synchronization to take place.

It is desirable to be able to issue Zabbix proxy like requests towards a Zabbix Java gateway too. Especially because mistakes are more likely due to the more complex nature of JMX item key definitions.

Before ZBX-11528 it was already possible to make requests towards Zabbix Java gateway via Zabbix get.

Now, as fixing ZBX-11528 is correct and should not be reverted, it would be great if Zabbix get gets extended to also support this kind of requests in a decent way.



 Comments   
Comment by richlv [ 2017 Mar 27 ]

as discussed, it might be better/easier to extend/fork sender.pl from the svn repo for this task

Comment by Glebs Ivanovskis (Inactive) [ 2017 Mar 28 ]

Try this small script. Not even Perl

P.S. Probably the most complicated bash script I've ever written (aka composed from examples in the net).

Comment by Glebs Ivanovskis (Inactive) [ 2017 Apr 05 ]

Hopefully, new version fixes problems with double quote escaping.

Comment by Glebs Ivanovskis (Inactive) [ 2017 Jun 08 ]

Updated https://zabbix.org/wiki/Docs/howto/zabbix_get_jmx with get.sh and a bit of sarcasm.

Credits to okkuv9xh for patient testing of the script!

Comment by Janne Korkkula [ 2017 Dec 12 ]

Quite a shell script... ... Doesn't support authentication, though.

Comment by Anant Saraswat [ 2018 Apr 11 ]

Zabbix has changed the JMX item protocol so the old script doesn't work with Zabbix 3.4.7 or higher version. ( https://www.zabbix.com/documentation/3.4/manual/installation/upgrade_notes_340#jmx_item_protocol_changes )

I have attached the script as per latest Zabbix version.

Comment by Eduardo Arruda Pimentel [ 2019 Sep 17 ]

I've updated zabbix_get_jmx_3.4.7.sh, to work with any type of endpoint, username and password. See zabbix_get_jmx_4_2.sh attached to this issue. Hope this will be useful to someone.

Generated at Sat Apr 05 06:04:01 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.