Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pepabo/mackerel-rb

Yet Another Mackerel Client for Ruby
https://github.com/pepabo/mackerel-rb

Last synced: about 1 month ago
JSON representation

Yet Another Mackerel Client for Ruby

Awesome Lists containing this project

README

        

# mackerel-rb
[![Gem Version](https://badge.fury.io/rb/mackerel-rb.svg)](http://badge.fury.io/rb/mackerel-rb)
[![Build Status](https://travis-ci.org/pepabo/mackerel-rb.svg)](https://travis-ci.org/pepabo/mackerel-rb)
[![Code Climate](https://codeclimate.com/github/pepabo/mackerel-rb/badges/gpa.svg)](https://codeclimate.com/github/pepabo/mackerel-rb)
[![Dependency Status](https://gemnasium.com/pepabo/mackerel-rb.svg)](https://gemnasium.com/pepabo/mackerel-rb)

## Installation

Add this line to your application's Gemfile:

gem 'mackerel-rb'

And then execute:

$ bundle

Or install it yourself as:

$ gem install mackerel-rb

## Usage

```rb
Mackerel.configure do |config|
config.api_key = "" # Default: ENV['MACKEREL_APIKEY']
config.proxy = "http://proxy.example.com:80" # Default: nil (Not use http proxy)
end

hosts = Mackerel.hosts
hosts.each do |host|
puts host
#=> #
end
```

## Feature

#### Services

- [x] List of Services - `GET/api/v0/services`
- [x] List of metric-names - `GET/api/v0/service//metrics-names`

#### Roles

- [x] List of Roles - `GET/api/v0/services//roles`

#### Hosts

- [x] Registering host information - `POST/api/v0/hosts`
- [x] Getting host information - `GET/api/v0/hosts/`
- [x] Updating host information - `PUT/api/v0/hosts/`
- [x] Updating host status - `POST/api/v0/hosts//status`
- [x] Updating host roles - `PUT/api/v0/hosts//role-fullnames`
- [x] Retiring a host - `POST/api/v0/hosts//retire`
- [x] List of hosts - `GET/api/v0/hosts.json`
- [x] Getting host metrics - `GET/api/v0/hosts//metrics`
- [x] List of metric-names - `GET/api/v0/hosts//metrics-names`

#### Metrics

- [x] Posting metrics - `POST/api/v0/tsdb`
- [x] Getting latest metrics - `GET/api/v0/tsdb/latest`
- [ ] Posting graph definitions - `POST/api/v0/graph-defs/create`
- [x] Posting service metrics - `POST/api/v0/services//tsdb`
- [x] Posting monitoring check results - `POST/api/v0/monitoring/checks/report`

#### Monitors

- [ ] Register monitor configurations - `POST/api/v0/monitors`
- [x] Get monitor configurations - `GET/api/v0/monitors`
- [x] Get monitor configurations - `GET/api/v0/monitors/`
- [ ] Update monitor configurations - `PUT/api/v0/monitors/`
- [ ] Delete monitor configurations - `DELETE/api/v0/monitors/`

#### Dashboards

- [x] Creating Dashboards - `POST/api/v0/dashboards`
- [x] Getting Dashboards - `GET/api/v0/dashboards/`
- [x] Updating Dashboards - `PUT/api/v0/dashboards/`
- [x] Deleting Dashboards - `DELETE/api/v0/dashboards/`
- [x] List of Dashboards - `GET/api/v0/dashboards`

#### Alerts

- [x] List of Alerts - `GET/api/v0/alerts`
- [x] Closing Alert - `POST/api/v0/alerts//close`

#### Organization

- [x] Getting Organization - `GET/api/v0/org`

## Contributing

1. Fork it ( https://github.com/pepabo/mackerel-rb/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