Is there any api to know the component of every server is up or down ?

I want api to get status of component is up or down separately.

i mean when i want to check the message processor , i will use api to do that.

@dchiesa1   appreciate your response

 

Solved Solved
0 3 224
3 ACCEPTED SOLUTIONS

Which Apigee are you referring to? Is this Apigee Hybrid or OPDK? There are different monitoring approaches depending on the platform.

View solution in original post

Check out the public docs on "What to Monitor" for Apigee Private Cloud.
https://docs.apigee.com/private-cloud/v4.51.00/what-monitor

For the MP, you can make API call to the server over port 8082 to check it's status -

curl http://127.0.0.1:8082/v1/servers/self/up

This will return a boolean value if the server is available.

If you need detailed response, you can remove the `/up` path on the URI, like -

curl http://127.0.0.1:8082/v1/servers/self

The response will look like the following -

{
  "buildInfo" : {
    "buildNumber" : "60176",
    "buildTimestamp" : "1666053508996",
    "rPMName" : "apigee-rpm-1.0.0.60176.769f35b0b.2210180035-045100_01",
    "releaseID" : "045100_01",
    "sCMBranch" : "origin/OPDK_5100",
    "sCMRevision" : "769f35b0b14d919aaa4bc144324cd34efb03e75a"
  },
  "externalHostName" : "aio.c.opdklab.internal",
  "externalIP" : "10.142.0.4",
  "internalHostName" : "aio.c.opdklab.internal",
  "internalIP" : "10.142.0.4",
  "isUp" : true,
  "pod" : "gateway",
  "reachable" : true,
  "region" : "dc-1",
  "tags" : {
    "property" : [ {
      "name" : "config_transport",
      "value" : "HTTP1"
    }, {
      "name" : "listen.on.two.ports",
      "value" : "false"
    }, {
      "name" : "dp.color",
      "value" : "green"
    }, {
      "name" : "cache_update_transport",
      "value" : "HTTP1"
    }, {
      "name" : "release.id",
      "value" : "045100_01"
    }, {
      "name" : "http.management.protocol",
      "value" : "HTTP2"
    }, {
      "name" : "http.port",
      "value" : "8998"
    }, {
      "name" : "default.profile.type",
      "value" : "message-processor"
    }, {
      "name" : "http.management.port",
      "value" : "8082"
    }, {
      "name" : "rpm.name",
      "value" : "apigee-rpm-1.0.0.60176.769f35b0b.2210180035-045100_01"
    }, {
      "name" : "started.at",
      "value" : "1675449877887"
    }, {
      "name" : "startup.interval",
      "value" : "13517"
    }, {
      "name" : "http.ssl.flag",
      "value" : "false"
    }, {
      "name" : "rpc.port",
      "value" : "4528"
    }, {
      "name" : "Profile",
      "value" : "MessageProcessor"
    }, {
      "name" : "startup.time",
      "value" : "13 seconds "
    }, {
      "name" : "up.time",
      "value" : "1 week 2 days 20 hours 8 minutes 1 second"
    } ]
  },
  "type" : [ "message-processor" ],
  "uUID" : "6143c618-0cb4-4bf4-ae5a-9d29d6d24c38"
}

View solution in original post

3 REPLIES 3

Which Apigee are you referring to? Is this Apigee Hybrid or OPDK? There are different monitoring approaches depending on the platform.

OPDK

Check out the public docs on "What to Monitor" for Apigee Private Cloud.
https://docs.apigee.com/private-cloud/v4.51.00/what-monitor

For the MP, you can make API call to the server over port 8082 to check it's status -

curl http://127.0.0.1:8082/v1/servers/self/up

This will return a boolean value if the server is available.

If you need detailed response, you can remove the `/up` path on the URI, like -

curl http://127.0.0.1:8082/v1/servers/self

The response will look like the following -

{
  "buildInfo" : {
    "buildNumber" : "60176",
    "buildTimestamp" : "1666053508996",
    "rPMName" : "apigee-rpm-1.0.0.60176.769f35b0b.2210180035-045100_01",
    "releaseID" : "045100_01",
    "sCMBranch" : "origin/OPDK_5100",
    "sCMRevision" : "769f35b0b14d919aaa4bc144324cd34efb03e75a"
  },
  "externalHostName" : "aio.c.opdklab.internal",
  "externalIP" : "10.142.0.4",
  "internalHostName" : "aio.c.opdklab.internal",
  "internalIP" : "10.142.0.4",
  "isUp" : true,
  "pod" : "gateway",
  "reachable" : true,
  "region" : "dc-1",
  "tags" : {
    "property" : [ {
      "name" : "config_transport",
      "value" : "HTTP1"
    }, {
      "name" : "listen.on.two.ports",
      "value" : "false"
    }, {
      "name" : "dp.color",
      "value" : "green"
    }, {
      "name" : "cache_update_transport",
      "value" : "HTTP1"
    }, {
      "name" : "release.id",
      "value" : "045100_01"
    }, {
      "name" : "http.management.protocol",
      "value" : "HTTP2"
    }, {
      "name" : "http.port",
      "value" : "8998"
    }, {
      "name" : "default.profile.type",
      "value" : "message-processor"
    }, {
      "name" : "http.management.port",
      "value" : "8082"
    }, {
      "name" : "rpm.name",
      "value" : "apigee-rpm-1.0.0.60176.769f35b0b.2210180035-045100_01"
    }, {
      "name" : "started.at",
      "value" : "1675449877887"
    }, {
      "name" : "startup.interval",
      "value" : "13517"
    }, {
      "name" : "http.ssl.flag",
      "value" : "false"
    }, {
      "name" : "rpc.port",
      "value" : "4528"
    }, {
      "name" : "Profile",
      "value" : "MessageProcessor"
    }, {
      "name" : "startup.time",
      "value" : "13 seconds "
    }, {
      "name" : "up.time",
      "value" : "1 week 2 days 20 hours 8 minutes 1 second"
    } ]
  },
  "type" : [ "message-processor" ],
  "uUID" : "6143c618-0cb4-4bf4-ae5a-9d29d6d24c38"
}