Git Product home page Git Product logo

node-jmx's Introduction

node-jmx

NPM version Code Climate Build Status Coverage Status

Node.js bridge library to communicate with Java applications through JMX.

Requirements

Installation

$ npm install jmx

Usage examples

var jmx = require("jmx");

client = jmx.createClient({
  host: "localhost", // optional
  port: 3000
});

client.connect();
client.on("connect", function() {

  client.getAttribute("java.lang:type=Memory", "HeapMemoryUsage", function(data) {
    var used = data.getSync('used');
    console.log("HeapMemoryUsage used: " + used.longValue);
    // console.log(data.toString());
  });

  client.setAttribute("java.lang:type=Memory", "Verbose", true, function() {
    console.log("Memory verbose on"); // callback is optional
  });

  client.invoke("java.lang:type=Memory", "gc", [], function(data) {
    console.log("gc() done");
  });

});
client = jmx.createClient({
  service: "service:jmx:rmi:///jndi/rmi://localhost:3000/jmxrmi"
});

You can check the node-java documentation to learn how to work with java objects in node.js.

Documentation

jmx.createClient(options)

Returns a Client object.

options

options is a hash table with the following values:

  • service - The full service URL string, with host, port, protocol and urlPath included. For example "service:jmx:rmi:///jndi/rmi://localhost:3000/jmxrmi".
  • host - Hostname to connect to (defaults to "localhost").
  • port - JMX port number to connect to.
  • protocol - Protocol to use (defaults to "rmi").
  • urlPath - JMX URL Path (defaults to "/jndi/{protocol}://{host}:{port}/jmx{protocol}").
  • username - JMX authentication username.
  • password - JMX authentication password.

Client.connect()

Connects to the JMX server. Emits connect event when done.

Client.disconnect()

Disconnects from the JMX server. Emits disconnect event when done.

Client.getAttribute(mbean, attribute, callback)

Returns an attribute from a MBean.

  • mbean - MBean query address as string. For example "java.lang:type=Memory".
  • attribute - Attribute name as string.
  • callback(attrValue)

Client.getAttributes(mbean, attributes, callback)

Returns an attribute list from a MBean.

  • mbean - MBean query address as string. For example "java.lang:type=Memory".
  • attributes - Attribute names as an array of strings.
  • callback(attrValue)

Client.getDefaultDomain(callback)

Returns the default domain as string.

  • callback(domainName)

Client.getDomains(callback)

Returns an array of domain names.

  • callback(domainsArray)

Client.getMBeanCount(callback)

Returns total the number of MBeans.

  • callback(mbeanCount)

Client.invoke(mbean, methodName, params, [signature,] [callback])

Invokes a MBean operation.

  • mbean - The MBean query address as string. For example "java.lang:type=Memory".
  • methodName - The method name as string.
  • params - The parameters to pass to the operation as array. For example [ 1, 5, "param3" ].
  • signature (optional) - An array with the signature of the params. Sometimes may be necessary to use this if class names are not correctly detected (gives a NoSuchMethodException). For example [ "int", "java.lang.Integer", "java.lang.String" ].
  • callback(returnedValue)

Client.listMBeans(callback)

Lists server MBeans. Callback returns an array of strings containing MBean names.

Client.on(event, callback)

Adds a listener for the especified event.

events

  • connect
  • disconnect
  • error - Passes the error as first parameter to the callback function.

Client.setAttribute(mbean, attribute, value, [className,] [callback])

Changes an attribute value of the MBean.

  • mbean - The MBean query address as string. For example "java.lang:type=Memory".
  • attribute - The attribute name as string.
  • value - The attribute value.
  • className (optional) - The attribute java className. Sometimes may be necessary to use this if value type is not correctly detected (gives a InvalidAttributeValueException). For example "java.lang.Long".
  • callback() (optional)

Error handling

Errors are not printed to the console by default. You can catch them with something like the following:

client.on("error", function(err) {
  // ...
});

Debugging

You can enable debugging and error printing to console using NODE_DEBUG environment variable:

$ NODE_DEBUG="jmx" node [...]

Testing

See TESTING.md.

Contributing

Please do not hesitate to open an issue with any questions or problems.

See CONTRIBUTING.md.

TODO

See TODO.md.

History

See CHANGELOG.md.

License and Author

Author: Xabier de Zuazo ([email protected])
Contributor: Eric
Contributor: DarkSorrow
Copyright: Copyright (c) 2015, Xabier de Zuazo
Copyright: Copyright (c) 2013-2015 Onddo Labs, SL.
License: Apache License, Version 2.0
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

node-jmx's People

Contributors

darksorrow avatar zuazo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

node-jmx's Issues

support for activemq?

I managed to made several calls in activemq.

  1. getAttribute
  2. invoke ("browse")
  3. invoke("getMessage")

getAttribute works find but browse and getMessage does not work (partial work)
partial because it browse() returns an array of object but the object is empty {}. Ditto for getMessage().

I think the conversion is not done correctly. I put a trace to getMessage and saw it returns this object type "nodeJava_javax_management_openmbean_CompositeDataSupport". how do I get this to work.

install problem because of java dependency

I am having problem with "npm install jmx".

...
...
In file included from ../../nan/nan.h:51:0,
                 from ../src/utils.h:12,
                 from ../src/utils.cpp:1:
/pc-path/.node-gyp/10.13.0/include/node/node.h:176:50: note: declared here
                 NODE_EXTERN v8::Local<v8::Value> MakeCallback(
                                                  ^
/pc-path/.node-gyp/10.13.0/include/node/node.h:91:42: note: in definition of macro 'NODE_DEPRECATED'
     __attribute__((deprecated(message))) declarator
                                          ^~~~~~~~~~
../src/utils.cpp: In function '_jobject* v8ToJava(JNIEnv*, v8::Local<v8::Value>)':
../src/utils.cpp:342:41: warning: 'v8::Local<v8::String> v8::Value::ToString() const' is deprecated: Use maybe version [-Wdeprecated-declarations]
     v8::String::Value val(arg->ToString());
                                         ^
In file included from ../src/utils.h:6:0,
                 from ../src/utils.cpp:1:
/pc-path/.node-gyp/10.13.0/include/node/v8.h:10040:15: note: declared here
 Local<String> Value::ToString() const {
               ^~~~~
../src/utils.cpp:342:42: warning: 'v8::String::Value::Value(v8::Local<v8::Value>)' is deprecated: Use Isolate version [-Wdeprecated-declarations]
     v8::String::Value val(arg->ToString());
                                          ^
In file included from /pc-path/.node-gyp/10.13.0/include/node/v8.h:26:0,
                 from ../src/utils.h:6,
                 from ../src/utils.cpp:1:
/pc-path/.node-gyp/10.13.0/include/node/v8.h:2916:51: note: declared here
     V8_DEPRECATED("Use Isolate version", explicit Value(Local<v8::Value> obj));
                                                   ^
/pc-path/.node-gyp/10.13.0/include/node/v8config.h:324:3: note: in definition of macro 'V8_DEPRECATED'
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
  SOLINK_MODULE(target) Release/obj.target/nodejavabridge_bindings.node
/usr/bin/ld: cannot find -ljvm
collect2: error: ld returned 1 exit status
nodejavabridge_bindings.target.mk:143: recipe for target 'Release/obj.target/nodejavabridge_bindings.node' failed
make: *** [Release/obj.target/nodejavabridge_bindings.node] Error 1
make: Leaving directory '/pc-path/to-my-project/node_modules/java/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/pc-path/.nvm/versions/node/v10.13.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Linux 4.15.0-46-generic
gyp ERR! command "/pc-path/.nvm/versions/node/v10.13.0/bin/node" "/pc-path/.nvm/versions/node/v10.13.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /pc-path/to-my-project/node_modules/java
gyp ERR! node -v v10.13.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /pc-path/.npm/_logs/2019-03-22T07_50_11_414Z-debug.log

I tried installing latest java ( which is 0.11.0) and didn't get error, but i get same error if i try to install [email protected]

Can you update the java dependency to its latest version ?
Thanks

Use a long[] parameter?

Code:

"use strict";
var jmx = require("jmx");

var client = jmx.createClient({
  host: "localhost",
  port: 9011
});

client.connect();
client.on("connect", function () {

  client.getAttribute("java.lang:type=Memory", "HeapMemoryUsage", function (data) {
    var used = data.getSync('used').longValue;
    var max = data.getSync('max').longValue;
    var percent = used / max;
    console.log("Threads used: " + used + " / " + max + " = " + percent.toFixed(2) + "%");
  });

  client.getAttribute("java.lang:type=Threading", "AllThreadIds", function (data) {
    console.log('data: ' + JSON.stringify(data));

    var ids = [data[0].longValueSync(), data[1].longValueSync()];
    console.log(Object.prototype.toString.call(ids) === "[object Array]"); // true
    console.log('ids[0].longValue: ', JSON.stringify(ids[0].longValue));
    console.log('ids: ', JSON.stringify(ids));

    client.invoke("java.lang:type=Threading", "getThreadInfo", [ids], ['long[]'], function (data) { // ????????????????
      console.log("Threading.getThreadInfo", JSON.stringify(data));
    });
  });

  client.setAttribute("java.lang:type=Memory", "Verbose", true, function () {
    console.log("Memory verbose on"); // callback is optional 
  });
});

Output:

PS C:\tmp\watch-jmx> node index.js
Threads used: 923329448 / 1048576000 = 0.88%
data: [{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},
{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{
},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{}
,{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},
{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{}]
true
ids.longValue:  "30285"
ids:  [30285,30284]
C:\tmp\watch-jmx\node_modules\jmx\lib\javaJmx.js:116
          value = java.newInstanceSync(className, value);
                       ^

Error: Could not create class long[]
java.lang.NoClassDefFoundError: long[]
Caused by: java.lang.ClassNotFoundException: long[]
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

    at Error (native)
    at C:\tmp\watch-jmx\node_modules\jmx\lib\javaJmx.js:116:24
    at Array.forEach (native)
    at JavaJmx.jsParams2JavaParams (C:\tmp\watch-jmx\node_modules\jmx\lib\javaJmx.js:111:15)
    at JavaJmx.invoke (C:\tmp\watch-jmx\node_modules\jmx\lib\javaJmx.js:133:40)
    at Client.invoke (C:\tmp\watch-jmx\node_modules\jmx\lib\client.js:61:16)
    at C:\tmp\watch-jmx\index.js:31:12
    at C:\tmp\watch-jmx\node_modules\jmx\lib\adapters\javaReflection.js:49:7
    at C:\tmp\watch-jmx\node_modules\jmx\lib\adapters\javaReflection.js:43:7

getAttribute doesn't fire callback if attribute isn't found.

I'm finding that if i try to retrieve an attribute that doesn't exist, nothing happens. My callback just doesn't fire. Is this by design? It seems like it would make more sense to follow the nodejs callback paradigm where all callbacks fire with error and data parameters instead.

E: I should also mention that the error event doesn't fire in this case either.

Thanks,

Question: multi call in schedule getAttribute

Hi,
I need to retrieve and attribute value in schedule mode, but I notice that my callback is call many times as many trigger event is done.
A possibile WA is can be done creating a new client for every event but I'd like to know if there is a better way ?
example
Thanks

Error handling api design doesn't allow determining whetger `getAttribute` operation failed

Let's say we have code like this:

client.getAttribute(mbean, attrib, data => {
      ...do something with the data..
});

The way the api is designed there seems to be no way to change this code so that it can properly handle errors arising from that operation.

Yes, we can do something like this:

client.on('error', (error) => ...handle error..);

But... the error handler can not know what operation caused the error. Even if we use client.on in combination with client.of to only attach error handlers for the duration of an operation, we will still have issues to accurately determine which operation caused the error when more than one operation is executed in parallel.

So, to make story short, the api should really allow for something like this:

client.getAttribute(mbean, attrib, (data, err) => {
    if (error) {
      ..handle error...
   } else {
     ..do something with the data..
   }
});

Note: if the api was designed like this from the start, I would probably put the 'err' parameter before the 'data' parameter as that seems to be the prevailing convention for asynchronous callbacks in nodejs libraries.

But seeing as the api was not designed to work like this initially, putting the 'err' parameter second means that it will not break existing code that assumes the first parameter is the data.

[Feature Request] getMBeanInfo(beanName)

The counterpart for MBeanServerConnection.getMBeanInfo(name) doesn't seem to be currently available. Could you provide the method as it is useful in getting the attributes, operations etc of a bean?

Error when using multilple jmx connections

When using multiple JMX connections to different servers there is an error thrown

self.mbeanServerConnection.queryMBeans(objName, queryObject, function(err,
^
TypeError: Cannot call method 'queryMBeans' of null

Segmentation fault in jni_GetStaticMethodIDwhen creating client

Hello!

I'm seeing a repeatable segmentation fault when attempting to run the following script:

#!/usr/bin/env node

var jmx = require('jmx');
var host = { host: 'localhost', port: 7511 }
var client = jmx.createClient(host)

The node process segfaults on the call to createClient. The crash creates a log file that can be seen in this gist.

Relevant version information:

  • Ubuntu 14.04 on amd64
  • Java:
$ java -version
java version "1.6.0_35"
OpenJDK Runtime Environment (IcedTea6 1.13.7) (6b35-1.13.7-1ubuntu0.14.04.1)
OpenJDK 64-Bit Server VM (build 23.25-b01, mixed mode)
  • java npm module: 0.5.4
  • jmx npm module: 0.4.1

Here's the top of the stack extracted from the crash log:

Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x53b09a]  get_method_id(JNIEnv_*, _jclass*, char const*, char const*, bool, Thread*) [clone .isra.108]+0x7a
V  [libjvm.so+0x53ee4d]  jni_GetStaticMethodID+0x7d
C  [nodejavabridge_bindings.node+0x1e551]  javaGetArgsForMethod(JNIEnv_*, _jobject*, _jarray*)+0x41
C  [nodejavabridge_bindings.node+0x1bd16]  InstanceMethodCallBaton::ExecuteInternal(JNIEnv_*)+0x36
C  [nodejavabridge_bindings.node+0x1bf6e]  MethodCallBaton::runSync()+0x1e
C  [nodejavabridge_bindings.node+0x17ae8]  JavaObject::methodCallSync(v8::Arguments const&)+0x178

Any ideas for how to debug this further?

Can't install jmx

Failed when installing from npm into my project. Tried again into an empty directory (to eliminate any other packages as the issue). Version of node and npm:

jbrown001:junk jbrown$ node --version
v6.3.1
jbrown001:junk jbrown$ npm --version
3.10.3

The results of the install attempt below:

jbrown001:src jbrown$ mkdir junk
jbrown001:src jbrown$ cd junk
jbrown001:junk jbrown$ npm init
This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sensible defaults.

See `npm help json` for definitive documentation on these fields
and exactly what they do.

Use `npm install <pkg> --save` afterwards to install a package and
save it as a dependency in the package.json file.

Press ^C at any time to quit.
name: (junk)
version: (1.0.0)
description:
entry point: (index.js)
test command:
git repository:
keywords:
author:
license: (ISC)
About to write to /Users/jbrown/src/junk/package.json:

{
  "name": "junk",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC"
}


Is this ok? (yes)
jbrown001:junk jbrown$ ls
package.json
jbrown001:junk jbrown$ npm install --save jmx
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue

> [email protected] install /Users/jbrown/src/junk/node_modules/java
> node-gyp rebuild

  CXX(target) Release/obj.target/nodejavabridge_bindings/src/java.o
In file included from ../src/java.cpp:1:
In file included from ../src/java.h:9:
../../nan/nan.h:590:20: error: no type named 'GCEpilogueCallback' in 'v8::Isolate'
      v8::Isolate::GCEpilogueCallback callback
      ~~~~~~~~~~~~~^
../../nan/nan.h:596:20: error: no type named 'GCEpilogueCallback' in 'v8::Isolate'
      v8::Isolate::GCEpilogueCallback callback) {
      ~~~~~~~~~~~~~^
../../nan/nan.h:601:20: error: no type named 'GCPrologueCallback' in 'v8::Isolate'
      v8::Isolate::GCPrologueCallback callback
      ~~~~~~~~~~~~~^
../../nan/nan.h:607:20: error: no type named 'GCPrologueCallback' in 'v8::Isolate'
      v8::Isolate::GCPrologueCallback callback) {
      ~~~~~~~~~~~~~^
4 errors generated.
make: *** [Release/obj.target/nodejavabridge_bindings/src/java.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Darwin 16.0.0
gyp ERR! command "/usr/local/Cellar/node/6.3.1/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/jbrown/src/junk/node_modules/java
gyp ERR! node -v v6.3.1
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
[email protected] /Users/jbrown/src/junk
└── [email protected]  extraneous

npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm ERR! Darwin 16.0.0
npm ERR! argv "/usr/local/Cellar/node/6.3.1/bin/node" "/usr/local/bin/npm" "install" "--save" "jmx"
npm ERR! node v6.3.1
npm ERR! npm  v3.10.3
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the java package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs java
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls java
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/jbrown/src/junk/npm-debug.log

npm install jmx failed

node version is 10.33
npm version is 1.4.28
got the following errors when npm install jmx

mouse@trap18:~/test> npm install jmx
npm WARN package.json [email protected] No description
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No README data
/

[email protected] install /home/mouse/test/node_modules/jmx/node_modules/java
node-gyp rebuild

make: Entering directory /home/mouse/test/node_modules/jmx/node_modules/java/build' make: *** No rule to make target/home/mouse/ibm-java-x86_64-60/jre/lib/amd64/server/libjvm.so', needed by build/depsVerified'. Stop. make: Leaving directory/home/mouse/testnode_modules/jmx/node_modules/java/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/mouse/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:268:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Linux 3.0.101-0.40-default
gyp ERR! command "node" "/home/mouse/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/mouse/test/node_modules/jmx/node_modules/java
gyp ERR! node -v v0.10.33
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok

npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the java package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls java
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.0.101-0.40-default
npm ERR! command "/home/mouse/bin/node" "/home/mouse/bin/npm" "install" "jmx"
npm ERR! cwd /home/mouse/test
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0

Also the way how you want JAVA_HOME to be set is different from what npm install java is asking.
They want JAVA_HOME to be pointing to JDK and not JRE.
This is some inconsistency.

Thank you in advance for your time and effort on creating this node-modules

Cannot pass null as param to Client.invoke

We are not able to pass null as param to invoke. A small fix is needed in javaJmx.js:

  function jsParams2JavaParams(params, signature) {
    var javaParams = [];
    signature.forEach(function(className) {
      var value = params.shift();
      if (value!= null && typeof value.getClass !== "function") { // Fix

[Feature Request] JMX Server Support

I don't know if it's outside of the planned scope for this project, but it would be really cool to be able to expose a Node server via a JMX interface so it could hook into standard monitoring systems that already know how to talk to JMX.

[Feature Request] Adding support for getting multiple attributes ("client.getAttributes") in a single request

In situations where I wanted to monitor multiple attributes from a mbean, currently I need to issue "client.getAttribute" multiple times (once for each attribute). While this is feasible, it requires multiple network calls. Instead, I would like to issue a single request, "client.getAttributes", to retrieve multiple attributes. This capability is already supported in JMX (java calls) and would enhance node-jmx capabilities.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.