wbrefvem / python-jolokia Goto Github PK
View Code? Open in Web Editor NEWPython client for Jolokia, an HTTP-JMX bridge
License: Apache License 2.0
Python client for Jolokia, an HTTP-JMX bridge
License: Apache License 2.0
Currently, the set_attribute
method can perform a bulk write if passed a list of attributes and :
def set_attribute(self, mbean=None, attribute=None, value=None, path=None, *args, **kwargs):
"""Sets the value of an MBean's attribute"""
if not mbean or not attribute or not value:
raise IllegalArgumentException('set_attribute method has 3 required parameters: mbean, attribute, and value')
if type(attribute) is list and type(value) is dict:
return self._bulk_write(mbean, attribute, value, **kwargs)
elif (type(attribute) is list and type(value) is not dict) or (type(attribute) is not list and type(value) is dict):
raise IllegalArgumentException('Bulk writes must include an attribute list and an attribute map')
This clunky and unintuitive. set_attribute
should take an optional boolean called bulk
and a list of attribute-value tuples as a co-requirement if bulk = True
.
When passing in a list of attributes into get_attribute only the first attribute is returned. Looking in the source I see that a list of individual json payloads are generated and then sent.
I dont know if things have changed for jolokia since the birth of this project but this doesn't work as the return is only the first attribute supplied in the list. According to jolokia docs a json array of attributes is to be passed in, not a list of separate individual payloads of each attribute. I'm not sure if this is an in general thing or just because I'm dealing with AMQ and its a bit different.
In any case if you pass a comma separated string of your list as the attribute that also works and returns the bulk listing of all your attributes.
Hi,
I looked both in documentation and source but can't seem to find how to do an authenticated call to the Jolokia endpoint. Is it a missing feature or does it have an implicit syntax?
Thanks,
Marco
Documentation should be completed, built with sphinx, and hosted somewhere.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.