Skip to main content

getSystemStatus

A Graze API GET request that returns current system status information for all processes.

Back to Graze API EndPoint Reference.

Request arguments

Endpoint getSystemStatus takes the following request argument:

Endpoint getSystemStatus takes no other arguments because this endpoint returns data on all processes.

Response

Endpoint getSystemStatus returns the following response:

Successful requests return a JSON object containing the following:

Name

Type

Description

component

String

Represents the name of a component within the process. May not be present, depending on the process.

instance

String

Instance name.

last_heartbeat

Number

Timestamp, in milliseconds, of the last process heartbeat. 0 is a special value indicating that a heartbeat has never been received.

missed_heartbeats

Number

Number of missed process heartbeats. -1 is a special value indicating that a heartbeat has never been received.

process_name

String

Process name.

processes

Array

A list of the processes, with status information.

reserved

Boolean

Indicates whether the process is reserved:

  • true = a reserved process

  • false = process that is not reserved

running

Boolean

Indicates whether the process is running:

  • true = running

  • false = not running

service_name

String

Service name.

display_name

String

Name of the service in the configuration.

type

String

Type of service, for example, lam, servlet, Moogfarmd.

passive

Boolean

Indicates whether the service is passive in a HA environment:

  • true = passive

  • false = active

stoppable

Boolean

Indicates whether the service is passive can be stopped:

  • true = stoppable

  • false = not stoppable

ha_conf

JSON Object

A JSON blob containing the HA configuration.

additional_health_info

JSON Object

Additional health information. The pools section includes health information for processes with an internal pool.

Examples

The following examples demonstrate typical use of endpoint getSystemStatus:

Request example

Example cURL request to return the system status:

curl -G -u graze:graze -k -v "https://localhost/graze/v1/getSystemStatus"

Response example

Example response returning the system status:

{
    "processes": [{
        "running": true,
        "sub_components": {
        "moogpoller": {
            "run_on_startup": true,
            "instance": "",
            "service_name": "apache-tomcat",
            "display_name": "servlets",
            "type": "servlets",
            "last_heartbeat": 1491385834300,
            "passive": false,
            "running": true,
            "component": "moogpoller",
            "reserved": true,
            "stoppable": true,
            "missed_heartbeats": 0,
            "ha_conf": {
                "cluster": "MOO",
                "instance": "",
                "default_leader": true,
                "start_as_passive": false,
                "only_leader_active": false,
                "group": "servlets"
             }
          },
       "moogsvr": {
           "run_on_startup": true,
           "instance": "",
           "service_name": "apache-tomcat",
           "display_name": "servlets",
           "type": "servlets",
           "last_heartbeat": 1491385825246,
           "passive": false,
           "running": true,
           "component": "moogsvr",
           "reserved": true,
           "stoppable": true,
           "missed_heartbeats": 0,
           "ha_conf": {
               "cluster": "MOO",
               "instance": "",
               "default_leader": true,
               "start_as_passive": false,
               "only_leader_active": false,
               "group": "servlets"
            }
         }
      },
    "instance": "",
        "reserved": true,
        "service_name": "apache-tomcat",
        "stoppable": true,
        "missed_heartbeats": 0,
        "display_name": "servlets",
        "type": "servlets",
        "last_heartbeat": 1491385834300,
        "ha_conf": {
            "cluster": "MOO",
            "instance": "",
            "default_leader": true,
            "start_as_passive": false,
            "only_leader_active": false,
            "group": "servlets"
            },
        "passive": false
            }, {
                "running": false,
                "instance": "",
                "last_missed_heartbeat": 1491385820601,
                "reserved": false,
                "stoppable": false,
                "missed_heartbeats": 10,
                "display_name": "test_lam",
                "type": "lam",
                "last_heartbeat": 1491382820601,
                "additional_health_info": {
                        "thread_pool_queue_size": 0,
                        "published_events": {
                                "last_5_minutes": 130,
                                "last_10_minutes": 130,
                                "last_minute": 130
                        }
                },
                "ha_conf": {
                        "cluster": "MOO",
                        "instance": "",
                        "default_leader": true,
                        "start_as_passive": false,
                        "only_leader_active": true,
                        "group": "test_lam"
                },
                "passive": false
        "sub_components": {
            "SituationMgr": {
            "run_on_startup": true,
            "instance": "",
            "last_missed_heartbeat": 1491385821669,
            "service_name": "moogfarmd",
            "display_name": "moog_farmd",
            "type": "moog_farmd",
            "last_heartbeat": 1491382821669,
            "passive": false,
            "running": false,
            "component": "SituationMgr",
            "reserved": true,
            "stoppable": true,
            "missed_heartbeats": 10,
            "ha_conf": {
                "cluster": "MOO",
                "instance": "",
                "default_leader": true,
                "start_as_passive": false,
                "only_leader_active": true,
                "group": "moog_farmd"
             }
          },
    "AlertBuilder": {
        "run_on_startup": true,
        "instance": "",
        "last_missed_heartbeat": 1491385821669,
        "service_name": "moogfarmd",
        "display_name": "moog_farmd",
        "type": "moog_farmd",
        "last_heartbeat": 1491382821669,
        "passive": false,
        "running": false,
        "component": "AlertBuilder",
        "reserved": true,
        "stoppable": true,
        "missed_heartbeats": 10,
        "ha_conf": {
            "cluster": "MOO",
            "instance": "",
            "default_leader": true,
            "start_as_passive": false,
            "only_leader_active": true,
            "group": "moog_farmd"
         }
       },
    "TeamsMgr": {
        "run_on_startup": true,
        "instance": "",
        "last_missed_heartbeat": 1491385821669,
        "service_name": "moogfarmd",
        "display_name": "moog_farmd",
        "type": "moog_farmd",
        "last_heartbeat": 1491382821669,
        "passive": false,
        "running": false,
        "component": "TeamsMgr",
        "reserved": true,
        "stoppable": true,
        "missed_heartbeats": 10,
        "ha_conf": {
            "cluster": "MOO",
            "instance": "",
            "default_leader": true,
            "start_as_passive": false,
            "only_leader_active": true,
            "group": "moog_farmd"
         }
      }
    },
    "instance": "",
    "last_missed_heartbeat": 1491385821669,
    "service_name": "moogfarmd",
    "display_name": "moog_farmd",
    "type": "moog_farmd",
    "last_heartbeat": 1491382821669,
    "additional_health_info": {
        "event_processing_metric": 0.65
    },
"passive": false,
"running": false,
"reserved": true,
"stoppable": true,
"missed_heartbeats": 10,
"ha_conf": {
    "cluster": "MOO",
    "instance": "",
    "default_leader": true,
    "start_as_passive": false,
    "only_leader_active": true,
    "group": "moog_farmd"
    }
 }, 
{
    "running": false,
    "instance": "",
    "reserved": false,
    "service_name": "restclientlamd",
    "stoppable": true,
    "display_name": "rest_client_lam",
    "type": "lam",
    "ha_conf": {
        "cluster": "MOO",
        "instance": "",
        "group": "rest_client_lam"
     }
     "additional_health_info": {
         "pools": {
             "MoogPoller": [{
             "removed": 0,
             "ration": 0.0,
             "busy": 0,
             "resource_type": "com.mysql.jdbc.JDBC4Connection",
             "checkout_per_second": 0.0,
             "free": 10,
             "avg_checkedout_seconds": 0.0,
             "capacity": 10
          }],
          "Message sender pool": [{
              "removed": 0,
              "ration": 0.0,
              "busy": 0,
              "resource_type": "com.moogsoft.mooms.CMoomsMessageSender",
              "checkout_per_second": 0.09997000899730081,
              "free": 10,
              "avg_checkedout_seconds": 0.002,
              "capacity": 10
            }]
        }
    }]
}