Skip to content

RedGuys/uptimekuma-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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());

About

Wrapper for interacting with uptimekuma instance

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published