Skip to content

Instantly share code, notes, and snippets.

@Setheck
Created March 9, 2016 00:32
Show Gist options
  • Save Setheck/b52e8cea4b582c7b08e9 to your computer and use it in GitHub Desktop.
Save Setheck/b52e8cea4b582c7b08e9 to your computer and use it in GitHub Desktop.
var jmx = require("jmx");
var clients = [];
clients.push(
jmx.createClient({
host: "client1",
port: 12000
})
);
console.log("Running");
clients.forEach(function(client){
client.connect();
client.on("connect", function() {
console.log("Connected");
client.getAttribute("testApplication:application=MyTestApplication,name=statusASDF", "SoftwareVersionASDF", function(data) {
console.log("TESTING");
console.log("SoftwareVersion: " + data);
});
});
client.on("error", function(data){
console.log("Some error data: " + data);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment