Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

uptrends

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uptrends

  • 0.6.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Uptrends RESTful API Client

Code Climate Test Coverage Build Status

This is a ruby wrapper around the Uptrends API. Uptrends is a monitoring service that let's you monitor Web pages, Web services, Mail servers, Database servers, DNS, SSL certificates, FTP and more.

NOTE: This is a 3rd party gem and not an official product from Uptrends.

Installation

Add this line to your application's Gemfile:

gem 'uptrends'

And then execute:

$ bundle

Or install it yourself as:

$ gem install uptrends

Usage

require 'uptrends'
u = Uptrends::Client.new(username: 'my@email.com', password: 'MyP@sswo0rd')   #=> #<Uptrends::Client>

probes = u.probes                     #=> [#<Uptrends::Probe>, #<Uptrends::Probe>, ...]
p = probes.first                      #=> #<Uptrends::Probe>
p.attributes                          #=> [:guid, :name, :url, :port, :check_frequency, :probe_type, :is_active, :generate_alert, :notes, :performance_limit1, :performance_limit2, :error_on_limit1, :error_on_limit2, :min_bytes, :error_on_min_bytes, :timeout, :tcp_connect_timeout, :match_pattern, :dns_lookup_mode, :user_agent, :user_name, :password, :is_competitor, :checkpoints, :http_method, :post_data]
p.guid                                #=> "7ef43a1b255949f5a052444348971690"
p.name                                #=> "My Probe's Name"

probe_groups = u.probe_groups         #=> [#<Uptrends::ProbeGroup>, #<Uptrends::ProbeGroup>, ... ]
pg = probe_groups.first               #=> #<Uptrends::ProbeGroup>
pg.attributes                         #=> [:guid, :name, :is_all, :is_client_probe_group]
pg.guid                               #=> "c8d6a0f704494c37823850f3d4fd4273"
pg.name                               #=> "All probes"

# Let's change the name of the probe:
p.name = "My Probe's NEW name"        #=> "My Probe's NEW name"
p.update!                             #=> nil

# Let's add our probe to our probe group
pg.add_probe(p)                       #=> [#<Uptrends::ProbeGroup>, #<Uptrends::Probe>]

Contributing

  1. Fork it ( https://github.com/jasonwbarnett/uptrends-gem/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

FAQs

Package last updated on 11 Dec 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc