Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Nodejs JMX query sample
* Check confluence jmx status
'use strict';
const exec = require('child_process').exec;
module.exports = function (robot) {
function app_status (app, msg) {
var child = exec('cd ' + __dirname + '; ./' + app + '', function (error, stdout, stderr) {
if (error) {
msg.send("`oops, something went wrong!`");
robot.respond(/confluence status/i, function (msg) {
msg.send("Let me check Confluence for you, please wait...");
app_status('confluence', msg);
robot.hear(/Confluence long response time is detected/ig, function (msg) {
msg.send("Let me check how Confluence is doing, please wait...");
app_status('confluence', msg);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.