mackerel-client: An API client library for Mackerel (https://mackerel.io)

[ library, mit, web ] [ Propose Tags ] [ Report a vulnerability ]
Versions [RSS] 0.0.0, 0.0.1, 0.0.2, 0.0.3, 0.0.4, 0.0.5, 0.1.0, 0.2.0, 0.3.0
Dependencies aeson, base (>=4.9 && <5.0), bytestring, data-default, directory, filepath, htoml, http-client, http-client-tls, http-types, parsec, split, text, unordered-containers [details]
License MIT
Author itchyny
Maintainer itchyny <https://github.com/itchyny>
Revised Revision 1 made by itchyny at 2016-11-29T23:48:32Z
Category Web
Source repo head: git clone git@github.com:itchyny/mackerel-client-hs.git
Uploaded by itchyny at 2016-11-29T14:12:51Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 5719 total (32 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2016-11-29 [all 1 reports]

Readme for mackerel-client-0.0.1

[back to package description]

mackerel-client-hs Build Status

An API client library for Mackerel.

API documents: Mackerel API Documents (v0)

The official Go client library: mackerel-client-go

Example

import Data.Default
import Web.Mackerel

main :: IO ()
main = do
  let client = def { apiKey = "<Mackerel-API-KEY>" }

  print =<< getOrganization client
  print =<< listUsers client

  print =<< listHosts client def { listHostsParamsService = Just "servicename", listHostsParamsRoles = ["role1", "role2"] }

  print =<< listMonitors client
  print =<< updateMonitor client monitor { monitorName = "Monitor name renamed" }
  print =<< deleteMonitor client (MonitorId "<Monitor-ID>")

  print =<< listAlerts client
  print =<< closeAlert client (AlertId "<Alert-ID>") "this is not an important alert"

Author

itchyny (https://github.com/itchyny)

License

This software is released under the MIT License, see LICENSE.