uptimekuma-api
v1.1.0
Published
Supports UptimeKuma versions from 1.13.1 to 1.23.13
Downloads
20
Readme
UptimeKuma-api
Supports UptimeKuma versions from 1.13.1 to 1.23.13
Installation
npm install uptimekuma-api
Pushing usage
Start pushing
let kuma = new UptimeKuma("https://kuma.url/");
kuma.startPushing("push code",60);
Stop pushing
kuma.cancelPushing("push code");
or to stop all pushes
kuma.cancelPushing();
Push custom data
kuma.on("prePush", (url, params) => {
params.msg = "test";
params.status = "down";
});
Status pages usage
Get statuses
for (let x of (await kuma.status())) {
for (let monitor of x.monitors) {
console.log(monitor.name + " " + monitor.heartbeats[1].status+ " - " + (monitor.uptime*100) + "%");
}
}
Dashboard usage
Login to dashboard
await kuma.login("username", "password");
Get database size
console.log(await kuma.getDatabaseSize());