管理サービス

logo cloud disabled logo hybrid active logo server active logo pcf disabled

このドキュメントでは、Runtime Manager エージェント管理サービス API の操作を実行する方法について説明します。

コンポーネントの設定

操作: コンポーネントのリスト

この操作では、サービス、外部メッセージハンドラ、内部メッセージハンドラなどのコンポーネントをリストします。

要求:

GET <Runtime Manager Agent URL>/components HTTP/1.1

例:

GET http://localhost:9999/mule/agent/components HTTP/1.1

応答:

[
  {
    componentId: "external.handlers.switch.rest.request.handler", enabled: true
  }
]

コンポーネント設定

操作: コンポーネント設定の取得

要求:

GET <Runtime Manager Agent URL>/<component> HTTP/1.1 Content-Type: application/json

例:

GET http://localhost:9999/mule/agent/myservice/ HTTP/1.1
Content-Type: application/json

応答:

{
   "serviceHandlerTypes": [
       "java.util.List<com.mulesoft.agent.domain.monitoring.Metric>"
   ],
   "injectedHandlers": [
       {
           "name": "com.mulesoft.agent.monitoring.publisher.CloudwatchMonitorPublisher",
           "path": "/mule/agent/cloudwatch.agent.monitor.publisher/configuration",
           "type": "java.util.List<com.mulesoft.agent.domain.monitoring.Metric>"
       },
       {
           "name": "com.mulesoft.agent.monitoring.publisher.GraphiteMonitorPublisher",
           "path": "/mule/agent/mule.agent.graphite.jmx.internal.handler/configuration",
           "type": "java.util.List<com.mulesoft.agent.domain.monitoring.Metric>"
       },
       {
           "name": "com.mulesoft.agent.monitoring.publisher.NagiosMonitorPublisher",
           "path": "/mule/agent/mule.agent.nagios.jmx.internal.handler/configuration",
           "type": "java.util.List<com.mulesoft.agent.domain.monitoring.Metric>"
       },
       {
           "name": "com.mulesoft.agent.monitoring.publisher.ZabbixMonitorPublisher",
           "path": "/mule/agent/mule.agent.zabbix.jmx.internal.handler/configuration",
           "type": "java.util.List<com.mulesoft.agent.domain.monitoring.Metric>"
       }
   ],
   "frequencyTimeUnit": "MINUTES",
   "frequency": "150"
}

操作: コンポーネント設定の変更

この操作では、ディスクリプタで提供される設定を JSON 要求に含まれるプロパティで上書きしてコンポーネントの設定を変更します。

要求:

PATCH <Runtime Manager Agent URL>/<component> HTTP/1.1

例:

PATCH <Runtime Manager Agent URL>/myservice HTTP/1.1

要求で送信される JSON:

{
  "frequencyTimeUnit": "<unit>",
  "frequency": "<value>",
}

例:

PATCH http://localhost:9999/mule/agent/myservice HTTP/1.1

{
  "frequencyTimeUnit": "SECONDS",
  "frequency": "150"
}

設定が正常に変更された場合の応答:

{
   "serviceHandlerTypes": [
       "java.util.List<com.mulesoft.agent.domain.monitoring.Metric>"
   ],
   "injectedHandlers": [
       {
           "name": "com.mulesoft.agent.monitoring.publisher.CloudwatchMonitorPublisher",
           "path": "/mule/agent/cloudwatch.agent.monitor.publisher/configuration",
           "type": "java.util.List<com.mulesoft.agent.domain.monitoring.Metric>"
       },
       {
           "name": "com.mulesoft.agent.monitoring.publisher.GraphiteMonitorPublisher",
           "path": "/mule/agent/mule.agent.graphite.jmx.internal.handler/configuration",
           "type": "java.util.List<com.mulesoft.agent.domain.monitoring.Metric>"
       },
       {
           "name": "com.mulesoft.agent.monitoring.publisher.NagiosMonitorPublisher",
           "path": "/mule/agent/mule.agent.nagios.jmx.internal.handler/configuration",
           "type": "java.util.List<com.mulesoft.agent.domain.monitoring.Metric>"
       },
       {
           "name": "com.mulesoft.agent.monitoring.publisher.ZabbixMonitorPublisher",
           "path": "/mule/agent/mule.agent.zabbix.jmx.internal.handler/configuration",
           "type": "java.util.List<com.mulesoft.agent.domain.monitoring.Metric>"
       }
   ],
   "frequencyTimeUnit": "SECONDS",
   "frequency": "150"
}

操作: コンポーネント設定の置き換え

この操作では、コンポーネントの設定を JSON 要求に含まれるプロパティで置き換えます。

要求:

PUT <Runtime Manager Agent URL>/<component> HTTP/1.1
{
  "frequency": "30"
}

応答:

{
   "serviceHandlerTypes": [
       "java.util.List<com.mulesoft.agent.domain.monitoring.Metric>"
   ],
   "injectedHandlers": [
       {
           "name": "com.mulesoft.agent.monitoring.publisher.CloudwatchMonitorPublisher",
           "path": "/mule/agent/cloudwatch.agent.monitor.publisher/configuration",
           "type": "java.util.List<com.mulesoft.agent.domain.monitoring.Metric>"
       },
       {
           "name": "com.mulesoft.agent.monitoring.publisher.GraphiteMonitorPublisher",
           "path": "/mule/agent/mule.agent.graphite.jmx.internal.handler/configuration",
           "type": "java.util.List<com.mulesoft.agent.domain.monitoring.Metric>"
       },
       {
           "name": "com.mulesoft.agent.monitoring.publisher.NagiosMonitorPublisher",
           "path": "/mule/agent/mule.agent.nagios.jmx.internal.handler/configuration",
           "type": "java.util.List<com.mulesoft.agent.domain.monitoring.Metric>"
       },
       {
           "name": "com.mulesoft.agent.monitoring.publisher.ZabbixMonitorPublisher",
           "path": "/mule/agent/mule.agent.zabbix.jmx.internal.handler/configuration",
           "type": "java.util.List<com.mulesoft.agent.domain.monitoring.Metric>"
       }
   ],
   "frequencyTimeUnit": null,
   "frequency": "30"
}

操作: コンポーネントの有効化

要求:

PUT <Runtime Manager Agent URL>/<component>/enable HTTP/1.1

例:

PUT http://localhost:9999/mule/agent/myservice/enable

応答 (サービスが正常に有効化された場合):

HTTP 200
操作: コンポーネントの無効化

要求:

PUT <Runtime Manager Agent URL>/<service>/disable HTTP/1.1

例:

PUT http://localhost:9999/mule/agent/myservice/disable

応答 (正常に無効化された場合):

HTTP 200

Was this article helpful?

💙 Thanks for your feedback!

Edit on GitHub