npm.io
0.1.0 • Published 8 years ago

mozaik-ext-uptimerobot

Licence
—
Version
0.1.0
Deps
10
Size
6 kB
Vulns
5
Weekly
0

mozaik-ext-uptimerobot

Uptime Robot widget for Mozaïk v1

Setup

  • Install module from npm:

    npm install mozaik-ext-uptimerobot
  • Register client api by adding to dashboard src/server.js:

    import uptimerobot from 'mozaik-ext-uptimerobot/client';
    mozaik.bus.registerApi('uptimerobot', uptimerobot);
  • Register widgets by adding to dashboard src/App.jsx:

    import uptimerobot from 'mozaik-ext-uptimerobot';
    
    Mozaik.Registry.addExtensions({
        uptimerobot
    });
  • Add UPTIMEROBOT_API_KEY to .env

  • Build the dashboard:

    npm run build-assets

Configuring widget

example
{
    type: 'uptimerobot.monitors',
    statuses: "9", // only down monitors
    columns: 1, rows: 1,
    x: 0, y: 1
}
parameters
key required description
statuses no If not used, will return all monitors statuses (up, down, paused) in an account. Else, it is possible to define any number of monitor statuses like: statuses="2-9")