com.krrrr38.mackerel4s

MackerelClient

class MackerelClient extends MackerelClientBase with ServiceAPI with RoleAPI with HostAPI with GraphDefAPI with TsdbAPI with ServiceTsdbAPI with CheckReportAPI with MonitorAPI

This class consists Mackerel API Http Client. All Request would returned Future response.

Usage example:

import com.krrrr38.mackerel4s.MackerelClient
import com.krrrr38.mackerel4s.model.MackerelResponseError
val mackerel = new MackerelClient("api-key", "user-agent")
mackerel.listHosts.setService("service-name").run onComplete {
  case Success(res) => ...
  case Failure(ex: MackereResponseError) => s.statusCode ...
  case Failure(ex) => ...
}
See also

http://help-ja.mackerel.io/entry/spec/api/v0

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. MackerelClient
  2. MonitorAPI
  3. CheckReportAPI
  4. ServiceTsdbAPI
  5. TsdbAPI
  6. GraphDefAPI
  7. HostAPI
  8. RoleAPI
  9. ServiceAPI
  10. MackerelClientBase
  11. AnyRef
  12. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new MackerelClient(apiKey: ApiKey)

    create mackerel api client with default user agent

    create mackerel api client with default user agent

    apiKey

    See also

    MackerelClient#this(ApiKey, String)

  2. new MackerelClient(apiKey: ApiKey, userAgent: String)

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. val apiKey: ApiKey

    get from https://mackerel.io/my?tab=overview#apikey

  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. val baseRequest: Req

    Definition Classes
    MackerelClientBase
  9. val client: (Path) ⇒ Req

    Definition Classes
    MackerelClientBase
  10. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. def createConnectivityMonitor(scopes: Seq[String] = Nil, excludeScopes: Seq[String] = Nil): CreateMonitorBuilder[ConnectivityMonitor]

    create new connectivity monitor

    create new connectivity monitor

    scopes

    monitoring target’s service name or role details name

    excludeScopes

    monitoring exclusion target’s service name or role details name

    returns

    Definition Classes
    MonitorAPI
    See also

    http://help-ja.mackerel.io/entry/spec/api/v0#monitor-create

  12. def createExternalMonitor(name: String, url: String, serviceName: ServiceName): CreateMonitorBuilder[ExternalMonitor]

    create new external monitor

    create new external monitor

    returns

    Definition Classes
    MonitorAPI
    See also

    http://help-ja.mackerel.io/entry/spec/api/v0#monitor-create

  13. def createGraphDef(graphDefs: Seq[GraphDef]): PostGraphDefsBuilder

    create graph def

  14. def createHost(name: HostName, roleFullnames: Seq[RoleFullname] = Nil): CreateHostBuilder

    register a new host.

    register a new host.

    name

    host name

    roleFullnames

    set host roles which are constructed lik "<service-name>:<role-name>". (default Nil)

    returns

    Definition Classes
    HostAPI
    See also

    http://help-ja.mackerel.io/entry/spec/api/v0#host-create

  15. def createHostMonitor(name: String, duration: Int, metric: String, operator: MonitorOperator, warning: Long, critical: Long, scopes: Seq[String] = Nil, excludeScopes: Seq[String] = Nil): CreateMonitorBuilder[HostMonitor]

    create new host monitor

    create new host monitor

    name

    arbitrary name that can be seen in the list of monitors and elsewhere

    duration

    average value of the designated interval (in minutes) will be monitored. valid interval (1 to 5 min.)

    metric

    name of the host metric targeted by monitoring. by designating a specific constant string, comparative monitoring is possible

    operator

    determines the conditions that state whether the designated variable is either big or small. the observed value is on the left of ”>” or ”<” and the designated value is on the right

    warning

    the threshold that generates a warning alert

    critical

    the threshold that generates a critical alert

    scopes

    monitoring target’s service name or role details name

    excludeScopes

    monitoring exclusion target’s service name or role details name

    returns

    Definition Classes
    MonitorAPI
    See also

    http://help-ja.mackerel.io/entry/spec/api/v0#monitor-create

  16. def createServiceMonitor(name: String, serviceName: ServiceName, duration: Int, metric: String, operator: MonitorOperator, warning: Long, critical: Long): CreateMonitorBuilder[ServiceMonitor]

    create new service monitor

    create new service monitor

    name
    serviceName
    duration
    metric
    operator
    warning
    critical
    returns

    Definition Classes
    MonitorAPI
    See also

    http://help-ja.mackerel.io/entry/spec/api/v0#monitor-create

  17. def deleteMonitor(monitorId: MonitorID): DeleteMonitorBuilder

    delete monitor

    delete monitor

    monitorId
    returns

    Definition Classes
    MonitorAPI
    See also

    http://help-ja.mackerel.io/entry/spec/api/v0#monitor-delete

  18. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  19. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  20. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  21. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  22. def getHost(hostId: HostID): GetHostBuilder

    get a host info.

    get a host info.

    hostId
    returns

    Definition Classes
    HostAPI
    See also

    http://help-ja.mackerel.io/entry/spec/api/v0#host-get

  23. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  24. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  25. def latestTsdb(hostIds: Seq[HostID] = Nil, names: Seq[MetricName] = Nil): LatestTsdbBuilder

    get latest host metrics.

    get latest host metrics.

    hostIds
    names
    returns

    Definition Classes
    TsdbAPI
    See also

    http://help-ja.mackerel.io/entry/spec/api/v0#tsdb-latest

  26. def listHosts(service: String, roles: Seq[RoleName] = Nil, statuses: Seq[HostStatus] = Nil): ListHostsBuilder

    get hosts info in a service.

    get hosts info in a service.

    service

    service name

    roles

    role name (default Nil)

    statuses

    host status list (default Nil)

    returns

    Definition Classes
    HostAPI
    See also

    http://help-ja.mackerel.io/entry/spec/api/v0#hosts-list

  27. def listHosts(statuses: Seq[HostStatus]): ListHostsBuilder

    get hosts info.

    get hosts info.

    statuses

    host status list

    returns

    Definition Classes
    HostAPI
    See also

    http://help-ja.mackerel.io/entry/spec/api/v0#hosts-list

  28. def listHosts: ListHostsBuilder

    get hosts info.

    get hosts info.

    returns

    Definition Classes
    HostAPI
    See also

    http://help-ja.mackerel.io/entry/spec/api/v0#hosts-list

  29. def listMonitors: ListMonitorsBuilder

    get monitors

    get monitors

    returns

    Definition Classes
    MonitorAPI
    See also

    http://help-ja.mackerel.io/entry/spec/api/v0#monitor-get

  30. def listRoles(serviceName: ServiceName): ListRolesBuilder

    get roles

    get roles

    serviceName
    returns

    Definition Classes
    RoleAPI
    See also

    http://help-ja.mackerel.io/entry/spec/api/v0#role-list

  31. def listServices: ListServicesBuilder

    get services

    get services

    returns

    Definition Classes
    ServiceAPI
    See also

    http://help-ja.mackerel.io/entry/spec/api/v0#service-list

  32. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  33. final def notify(): Unit

    Definition Classes
    AnyRef
  34. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  35. def postCheckReports(reports: Seq[CheckReport]): PostCheckReportBuilder

    post check monitoring report

    post check monitoring report

    reports
    returns

    Definition Classes
    CheckReportAPI
    See also

    http://help-ja.mackerel.io/entry/spec/api/v0#monitoring-check-report-post

  36. def postServiceMetric(serviceName: ServiceName, metrics: Seq[ServiceMetric]): PostServiceTsdbBuilder

    post service metrics.

    post service metrics.

    serviceName
    metrics
    returns

    Definition Classes
    ServiceTsdbAPI
    See also

    http://help-ja.mackerel.io/entry/spec/api/v0#service-metric-value-post

  37. def postTsdb(metrics: Seq[HostMetric]): PostTsdbBuilder

    post host metrics.

    post host metrics.

    metrics
    returns

    Definition Classes
    TsdbAPI
    See also

    http://help-ja.mackerel.io/entry/spec/api/v0#metric-value-post

  38. def retireHost(hostId: HostID): RetireHostBuilder

    retire a host

    retire a host

    hostId
    returns

    Definition Classes
    HostAPI
    See also

    http://help-ja.mackerel.io/entry/spec/api/v0#host-retire

  39. val setting: ClientSetting

    Definition Classes
    MackerelClientMackerelClientBase
  40. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  41. def toString(): String

    Definition Classes
    AnyRef → Any
  42. def updateHost(hostId: HostID, name: HostName, meta: JObject = JObject(), interfaces: Seq[Interface] = Nil, roleFullnames: Seq[RoleFullname] = Nil): CreateHostBuilder

    update a host info.

    update a host info.

    [NOTICE] name, meta and interfaces are overwritten. but if you set roleFullnames, just add them.

    hostId

    target host id

    name

    update host name

    meta

    update meta information

    interfaces

    update interfaces

    roleFullnames

    additional role names

    returns

    Definition Classes
    HostAPI
    See also

    http://help-ja.mackerel.io/entry/spec/api/v0#host-update

  43. def updateHostStatus(hostId: HostID, status: HostStatus): UpdateHostStatusBuilder

    update a host status info.

    update a host status info.

    hostId
    status

    "standby", "working", "maintenance" or "poweroff"

    returns

    Definition Classes
    HostAPI
    See also

    http://help-ja.mackerel.io/entry/spec/api/v0#host-status-update

  44. def updateMonitor(monitor: Monitor): UpdateMonitorBuilder

    update monitor

    update monitor

    monitor
    returns

    Definition Classes
    MonitorAPI
    See also

    http://help-ja.mackerel.io/entry/spec/api/v0#monitor-update

  45. val userAgent: String

    Definition Classes
    MackerelClientMackerelClientBase
  46. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  47. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  48. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from MonitorAPI

Inherited from CheckReportAPI

Inherited from ServiceTsdbAPI

Inherited from TsdbAPI

Inherited from GraphDefAPI

Inherited from HostAPI

Inherited from RoleAPI

Inherited from ServiceAPI

Inherited from MackerelClientBase

Inherited from AnyRef

Inherited from Any

Ungrouped