An API client library for Mackerel

Latest on Hackage:0.1.0

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow to host generated Haddocks.

MIT licensed by itchyny
Maintained by itchyny

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


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"




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

comments powered byDisqus