npm.io
2.6.1 • Published 1 month ago

jolokia.js

Licence
Apache-2.0
Version
2.6.1
Deps
0
Size
147 kB
Vulns
0
Weekly
0
Stars
850

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)

Keywords