Jolokia JavaScript Client library (ES Module)
The Jolokia JavaScript library provides a JavaScript API to the to the Jolokia agent. Refer to Reference Manual for more details on how to use the library.
Installation
NPM:
npm i jolokia.js
Yarn:
yarn add jolokia.js
Usage
import Jolokia from "jolokia.js";
const jolokia = new Jolokia("/jolokia")
const response = await jolokia.request({
type: "read",
mbean: "java.lang:type=Memory",
attribute: "HeapMemoryUsage",
path: "used"
})
console.log("Heap Memory used:", response.value)
