Giter Club home page Giter Club logo

skybrud.social.uptimerobot's Introduction

Skybrud.Social.UptimeRobot

Uptime Robot is a service that let's you monitor a given HTTP(s) URL, port number or similar. Skybrud.Social.UptimeRobot is an implementation of the Uptime Robot API.

Usage

Communication with the Uptime Robot API starts with the UptimeRobotService. You can initialize a new instance of this class like:

UptimeRobotService service = UptimeRobotService.CreateFromApiKey("your api key");

You can find your API key under your Uptime Robot Settings.

Get accounts details You can get the details of your account/user like shown in this Razor example:

UptimeRobotGetAccountDetailsResponse response = service.Accounts.GetAccountDetails();
    
<p>Monitor limit: @response.Body.Account.MonitorLimit</p>
<p>Monitor interval: @response.Body.Account.MonitorInterval</p>
<p>Monitors currently up: @response.Body.Account.UpMonitors</p>
<p>Monitors currently down: @response.Body.Account.DownMonitors</p>
<p>Monitors currently paused: @response.Body.Account.PausedMonitors</p>

Get a list of monitors You can also get a list of your monitors like in the example below:

UptimeRobotGetMonitorsResponse response = service.Monitors.GetMonitors();
    
foreach (var monitor in response.Body.Monitors) {
        
    <p>@monitor.FriendlyName: @monitor.Status (@String.Format("{0:0.00}", monitor.AlltimeUptimeRatio) %)</p>
        
}

The response is paginated, and will return a maximum of 50 monitors per page. You can explore the UptimeRobotGetMonitorsOptions class for further options - including pagination:

UptimeRobotGetMonitorsOptions options = new UptimeRobotGetMonitorsOptions {
    Offset = 25,
    Limit = 25,
    Logs = true
};

UptimeRobotGetMonitorsResponse response = service.Monitors.GetMonitors(options);

The Uptime Robot currently has more options than available in this implementation.

skybrud.social.uptimerobot's People

Contributors

abjerner avatar douglas-cleghorn avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.