Skip to main content

getPushEventStats

This method gets the push event statistics and errors.

The configuration error occurs when the HTTP collector does not use an SSL certificate, or the setPushEventSettings method is not using an authorization header generated by the HTTP collector. You must meet these prerequisites to successfully use Event Push Service.

Warning

Events sent through the Event Push Service API that fail to deliver are saved in a buffer, which can hold up to 1000 messages.

Once the counter exceeds 1000 messages, and messages are still failing to deliver, the Event Push Service will automatically stop trying to send messages, and it will reset the status attribute to 0 (disabled).

Parameters

No input parameters are required.

Return value

This method returns an Object containing the push event statistics.

Attribute

Type

Description

result

Object

This object provides general statistics for all messages and errors sent or received by the Push Event service. Information is tracked from the time the service is activated until the time of the request.

  count

Object

This object provides general statistics for push event messages.

    errorMessages

Integer

The total number of messages sent by the Event Push service that results in errors.

    events

Integer

The total number of events sent.

    sentMessages

Integer

The total number of messages sent successfully.

    testEvents

Integer

The number of test events generated using the sendTestPushEvent method.

    sentBytes

Integer

The sum of the total size of the body of HTTP requests (when used), in bytes.

Note

The attribute does not include the size of data from HTTP request headers.

  error

Integer

The total number of errors received.

    connectionError

Integer

The total number of connection errors received.

    configurationError

Integer

The total number of configuration errors received.

    serviceError

Integer

The total number of service errors received.

    statusCode2xx

Integer

The number of times a 2xx status code was returned.

    statusCode300

Integer

The number of times a 3xx status code was returned.

    statusCode400

Integer

The number of times a 4xx status code was returned.

    statusCode500

Integer

The number of times a 5xx status code was returned.

    timeout

Integer

The number of times requests resulted in a timeout.

  lastUpdateTime

Integer

The last time the Event Push stats were updated.

  max

Object

Indicates the state of the buffer where events that are queued for sending are stored.

The buffer stores every event that failed to send and was queued for sending later.The stats can be cleared using the resetPushEventStats method.

    messageQueueBytes

Integer

The sum of the size of messages that were queued for sending since the last time the resetPushEventStats method was used.

   messageQueueLength

Integer

The sum of the messages that were queued for sending since the last time the resetPushEventStats method was used.

Note

The buffer can hold up to 1000 events.

Example

Request:

  {
       "params": {},
       "jsonrpc": "2.0",
       "method": "getPushEventStats",
       "id": "ad12cb61-52b3-4209-a87a-93a8530d91cb"
  }  

Response:

{
    "id": "ad12cb61-52b3-4209-a87a-93a8530d91cb",
    "jsonrpc": "2.0",
    "result": {
        "count": {
            "errorMessages": 12,
            "events": 2182,
            "sentMessages": 21,
            "testEvents": 0,
            "sentBytes": 954586
        },
        "error": {
            "configurationError": 0,
            "connectionError": 7,
            "serviceError": 0,
            "statusCode2xx": 0,
            "statusCode300": 0,
            "statusCode400": 5,
            "statusCode500": 0,
            "timeout": 0
        },
        "lastUpdateTime": "2024-02-08T09:29:39",
        "max": {
            "messageQueueBytes": 933694,
            "messageQueueLength": 8
        }
    }
}