Usage

API for retrieving usage metrics.

Entity types

Metrics can be queried based on different entity types:

  • account
  • application
  • keyset

Coming soon:

  • customer, if you use Partner module you can query metrics for customers associated with your account

Metrics

Usage metrics include various data points such as API calls, data storage, and other resource utilizations. All of them are aggregated on daily basis. Most metrics are available also with an hourly resolution. Data hourly metrics is retained for 90 days. Data for daily metrics is retained for 12 months.

Data are usually available with 3-4 hours delay.

Note on Month-to-Date (MTD) Metrics: Metrics with the mtd_ prefix represent cumulative values for the entire month up to the queried date. These metrics accumulate from the first day of the month, so when querying MTD metrics, you typically want to use the last day of the month to get the complete monthly total. For example, mtd_txn_total and mtd_uuid show cumulative counts that grow throughout the month.

Transactions vs Messages

Some metrics are available both as transaction counts and message counts. Transactions are API calls which may involve multiple messages. Bigger messages may be split between multiple transactions. For datails about transaction types see Transaction Classification. PubNub pricing is based on transaction counts.

Transaction types

You can find the total number of transactions under the txn_total metric. To get the total number of transactions for a current month use the mtd_txn metric.

Metric NameDescription
txn_totalNumber of total transactions.
mtd_txn_totalMonth-to-date transaction count

You can group usage by transaction types using dedicated metrics.

Metric NameDescription
edgeAll API Calls that interact with a single PubNub Point of Presence
replicatedAll API calls that result in information replicating across multiple PubNub Points-of-Presence (PoP), such as publishing a message
message_actionsAll API Calls for Messages Actions that interact with a single PubNub Point of Presence
signalsAll API calls that involve sending (Publishes) or receiving (Subscribes) Signal messages.
freeNumber of transactions counted as Free

Monthly Active Users (MAU)

You can find the number of MAUs under the mtd_uuid metric and the number of unique users in a given day can under the uuid metric.

Note that uuid is not cumulative - it shows the number of unique users seen on that specific day, while mtd_uuid accumulates unique users from the start of the month up to that day.

Metric NameDescription
mtd_uuidNumber of Active users (UUIDs) at a given moment in time.

All Available Metrics

Metric NameDescription
mtd_uuidNumber of Active users (UUIDs) at a given moment in time.
txn_totalNumber of total transactions.
pn_uuidNumber of Active users (UUIDs) at a given moment in time.
replicatedAll API calls that result in information replicating across multiple PubNub Points-of-Presence (PoP), such as publishing a message
signalsAll API calls that involve sending (Publishes) or receiving (Subscribes) Signal messages.
edgeAll API Calls that interact with a single PubNub Point of Presence
message_actionsAll API Calls for Messages Actions that interact with a single PubNub Point of Presence
freeNumber of transactions counted as Free
accessmanager_audits_transactionsAccess Manager Audit Transactions
accessmanager_grants_v3_transactionsAccess Manager v3 Grant Transactions
accessmanager_grants_transactionsAccess Manager v2 Grant Transactions
accessmanager_replicatedAccess Manager API calls that result in information replicating across multiple PubNub Points-of-Presence (PoP)
accessmanager_edgeAccess Manager API calls with client errors that interact with a single PubNub Point-of-Presence (PoP)
misfire_client_transactionsNumber of transactions as a result of calling a function, from the developer's client application, using the Fire endpoint, and having that API call not actually trigger the target function to be executed.
kv_read_transactionsNumber of transactions as a result of using the KV Store read API within a PubNub Function. The KV Store API allows for setting and getting of key value based data.
kv_write_transactionsNumber of transactions as a result of using the KV Store write API within a PubNub Function. The KV Store API allows for setting and getting of key value based data.
misfire_eh_transactionsNumber of transactions as a result of calling a function, from the developer's function code, using the Fire endpoint, and having that API call not actually trigger the target function to be executed.
xhr_transactionsNumber of transactions of result of using the XHR API from within a PubNub Function. This API allows for interaction with external HTTP/S resources from within a developer's Functions code. This API is not called directly from PubNub Client SDKs. NOTE: an execution of a Function can result in multiple XHR transactions, especially if retry logic is employed.
functions_replicatedFunction API calls that result in information replicating across multiple PubNub Points-of-Presence (PoP), such as publishing a message
functions_edgeFunction API calls that interact with a single PubNub Point-of-Presence (PoP), such as receiving a published message via a Subscribe API call, such as function misfire or Key Value reads
executionsThe number of times a function was executed
history_messages_count_transactionsCount of messages published
history_transactionsNumber of History transactions
history_edgeHistory API calls with client errors that interact with a single PubNub Point-of-Presence (PoP)
message_actions_add_transactionsAdd Message reaction transactions
message_actions_get_transactionsRetrieving Message Reactions transactions
message_actions_remove_transactionsRemoving Message Reactions transactions
subscribe_message_actions_transactionsSubscribing to Message Reactions transactions
objects_create_space_transactionsNumber of transactions as a result of using the App Context endpoint, with the purpose of creating channels.
objects_create_user_transactionsNumber of transactions as a result of using the App Context endpoint, with the purpose of creating users.
objects_delete_space_transactionsNumber of transactions as a result of using the App Context endpoint, with the purpose of deleting channels.
objects_delete_user_transactionsNumber of transactions as a result of using the App Context endpoint, with the purpose of deleting users.
objects_get_all_spaces_transactionsNumber of transactions as a result of using the App Context endpoint, with the purpose of fetching all created channels.
objects_get_all_users_transactionsNumber of transactions as a result of using the App Context endpoint, with the purpose of fetching all created users.
objects_get_space_transactionsNumber of transactions as a result of using the App Context endpoint, with the purpose of fetching a specific channel.
objects_get_user_space_memberships_transactionsNumber of transactions as a result of using the App Context endpoint, with the purpose of fetching the user members of a specific channel.
objects_get_space_user_memberships_transactionsNumber of transactions as a result of using the App Context endpoint, with the purpose of fetching the channels of which a specific user is a member.
objects_get_user_transactionsNumber of transactions as a result of using the App Context endpoint, with the purpose of fetching a specific created user.
objects_update_space_transactionsNumber of transactions as a result of using the App Context endpoint, with the purpose of updating a specific channel.
objects_update_space_user_memberships_transactionsNumber of transactions as a result of using the App Context endpoint, with the purpose of updating a specific channel-to-user membership
objects_update_user_space_memberships_transactionsNumber of transactions as a result of using the App Context endpoint, with the purpose of updating a specific user-to-channel membership
objects_update_user_transactionsNumber of transactions as a result of using the App Context endpoint, with the purpose of updating a specific channel.
internal_publish_objects_transactionsApp Context Publish Transactions
objects_replicatedApp Context API calls that result in information replicating across multiple PubNub Points-of-Presence (PoP)
objects_edgeObject API calls that interact with a single PubNub Point-of-Presence (PoP)
objects_usersAll Object API Transactions related to Users
objects_spacesAll Object API Transactions related to channels
objects_membershipsAll Object API Transactions related to Memberships
objects_errorsObject API client error transactions and unauthorized transactions
presence_getuserstate_transactionsPresence Get State Transactions
presence_herenow_global_transactionsPresence HereNow (Global) Transactions
presence_herenow_transactionsPresence HereNow Transactions
presence_leave_transactionsPresence Leave (Unsubscribe) Transactions
presence_setuserstate_transactionsPresence Set State Transactions
presence_heartbeats_transactionsPresence Explicit Heartbeat Transactions
presence_wherenow_transactionsPresence WhereNow Transactions
presence_replicatedPresence API calls that result in information replicating across multiple PubNub Points-of-Presence (PoP)
presence_edgePresence API calls that interact with a single PubNub Point-of-Presence (PoP)
apns_sent_transactionsPush notifications sent to Apple Push Notification Service
apns_removed_transactionsNumber of transactions as a result of publishing a message with the proper data signifying removal of an Apple Push Notification Token. These transactions are not related to specific API calls but are a result of push-related publishes.
gcm_removed_transactionsNumber of transactions as a result of publishing a message with the proper data signifying removal of an FCM Push Notification Token. These transactions are not related to specific API calls but are a result of push-related publishes.
gcm_sent_transactionsPush notifications sent to Apple Push Notification Service
push_device_writes_transactionsNumber of transactions as a result of using the Push Device Registration endpoint, which allows developers to add notification channels for a device.
push_device_reads_transactionsNumber of transactions as a result of using the Push List Channels For Device endpoint, which allows developers to list all channels on which push notification has been enabled using specified pushToken.
push_notifications_replicatedMobile Push Notification API calls that result in information replicating across multiple PubNub Points-of-Presence (PoP)
push_notifications_edgeMobile Push Notifications API calls that interact with a single PubNub Point-of-Presence (PoP)
push_notifications_appleTransactions made to Apple Push Notification service
push_notifications_androidTransactions made to Firebase Cloud Messaging service
push_notifications_microsoftTransactions made to Microsoft Push Notifications service
steam_controller_edgeSream Controller API calls that interact with a single PubNub Point-of-Presence (PoP)
steam_controller_replicatedStream Controller API calls that result in information replicating across multiple PubNub Points-of-Presence (PoP)
streamcontroller_reads_transactionsNumber of transactions generated by calls to the Channel Group List Channels API, counted in 2K buckets
streamcontroller_writes_transactionsNumber of transactions generated by calls to the Channel Group Add/Remove Channels API, counted in 2K buckets
bytes_storedTotal storage usage
bytes_stored_blocksStorage usage for blocks data
bytes_stored_channel_groupsStorage usage for channel groups data
bytes_stored_filesStorage usage for files data
bytes_stored_messagesStorage usage for messages data
bytes_stored_pushStorage usage for push notification data
bytes_stored_size_authStorage usage for authorization data
bytes_stored_usersStorage usage for user data
bytes_stored_membershipsStorage usage for membership data
events_ingestedNumber of events ingested into the system
history_with_actions_transactionsNumber of transactions generated by calls to the Storage & Playback service, to fetch message actions, counted in 2K buckets
mtd_txn_totalMonth-to-date transaction count
mtd_txn_mtd_uuid_ratioRatio of month-to-date transactions to month-to-date unique users
signal_transactionsNumber of transactions as a result of using the Signal endpoint, with the purpose of inputting message data, of a small size, into PubNub and having it delivered to subscribers to the given channel.
subscribe_signal_transactionsNumber of transactions as a result of using the Subscribe endpoint, with the purpose of establishing and maintaining a subscription connection to PubNub as well as retrieving any published signal data. This number is based on a combination of API requests and payload sizes. It is not a metric to use to determine how many messages have been delivered.
subscribe_transactionsTransactions related to message subscriptions
subscribe_timeouts_transactionsTimeouts of subscriber connection
subscribe_objects_transactionsApp Context related transactions triggered by Subscribers
subscribe_heartbeats_transactionsTotal number of API requests made in order to establish connection, or 'heartbeat', to the PubNub network.
subscribe_streaming_transactionsStreaming Subscribe transactions
subscribe_clientclosedconnection_transactionsClient disconect transactions (HTTP 499)
subscribe_edgeAPI calls that interact with a single PubNub Point-of-Presence (PoP), such as receiving a published message via a Subscribe API call
publish_transactionsNumber of publish transactions API
publish_edgeNumber of client erros on Publish API that come from a single PubNub Point of Presence
publish_replicatedAPI calls that result in information replicating across multiple PubNub Points-of-Presence (PoP), such as publishing a message
files_publish_transactionsNumber of transactions generated by operation to publish file messages on a channel
files_delete_file_transactionsNumber of transactions generated by the delete file operation to delete a file
files_generate_url_transactionsNumber of transactions generated by the operation to generate pre-signed urls for file upload
files_get_file_transactionsNumber of transactions generated by the get file operation to download file data
subscribe_files_transactionsNumber of transactions generated by the get file operation to download file data
files_get_all_files_transactionsNumber of transactions generated by the list files operation to list files stored for a channel
files_replicatedFile Sharing API calls that result in information replicating across multiple PubNub Points-of-Presence (PoP), publish transactions.
files_edgeFile Sharing API Calls that interact with a single PubNub Point of Presence
publish_bytesThe total number of message bytes published, as measured by total request length, for the time period.
subscribe_bytesThe total number of message bytes received by subscribers, as measured by total request length, for the time period.
publish_msg_average_sizeThe average size of the published messages for the time period.
message_ratioThe average size of the messages received by subscribers for the time period.
files_clienterrors_transactionsNumber of File Sharing API transactions resulted in other than HTTP 200 response code. Incorrect usage is generally a result of the wrong parameters and values being used in application code and execution.
publish_clienterrors_transactionsNumber of Publish API transactions resulted in other than HTTP 200 response code. Incorrect usage is generally a result of the wrong parameters and values being used in application code and execution.
subscribe_clienterrors_transactionsNumber of Subscribe API transactions resulted in other than HTTP 200 response code. Incorrect usage is generally a result of the wrong parameters and values being used in application code and execution.
signal_clienterrors_transactionsNumber of Signal API transactions resulted in other than HTTP 200 response code. Incorrect usage is generally a result of the wrong parameters and values being used in application code and execution.
streamcontroller_clienterrors_transactionsNumber of Stream Controller API transactions resulted in other than HTTP 200 response code. Incorrect usage is generally a result of the wrong parameters and values being used in application code and execution.
push_device_clienterrors_transactionsNumber of Mobile Push Notifications API transactions resulted in other than HTTP 200 response code. Incorrect usage is generally a result of the wrong parameters and values being used in application code and execution.
presence_clienterrors_transactionsNumber of Presence API transactions resulted in other than HTTP 200 response code. Incorrect usage is generally a result of the wrong parameters and values being used in application code and execution.
objects_clienterrors_transactionsNumber of App Context API transactions resulted in other than HTTP 200 response code. Incorrect usage is generally a result of the wrong parameters and values being used in application code and execution.
message_actions_clienterrors_transactionsNumber of Message Reactions API transactions resulted in other than HTTP 200 response code. Incorrect usage is generally a result of the wrong parameters and values being used in application code and execution.
history_with_actions_clienterrors_transactionsNumber of History with Message Reactions API transactions resulted in other than HTTP 200 response code. Incorrect usage is generally a result of the wrong parameters and values being used in application code and execution.
history_clienterrors_transactionsNumber of History API transactions resulted in other than HTTP 200 response code. Incorrect usage is generally a result of the wrong parameters and values being used in application code and execution.
accessmanager_clienterrors_transactionsNumber of Access Manager API transactions resulted in other than HTTP 200 response code. Incorrect usage is generally a result of the wrong parameters and values being used in application code and execution.
history_with_actions_unauthorized_transactionsThe number of transactions generated by calls to the Storage & Playback service, to fetch Message Reactions, that resulted in a 403 Forbidden error, counted in 2K buckets.
message_actions_unauthorized_transactionsThe number of transactions generated by the Message Reactions API calls that resulted in a 403 Forbidden error, counted in 2K buckets.
objects_unauthorized_transactionsNumber of transactions as a result of attempted unauthorized usage of the App Context endpoints.
signal_unauthorized_transactionsNumber of transactions as a result of attempted unauthorized usage of the Signal endpoint.
subscribe_unauthorized_transactionsNumber of transactions as a result of attempted unauthorized usage of the Subscribe endpoint.
publish_unauthorized_transactionsNumber of transactions as a result of attempted unauthorized usage of the Publish endpoint.
files_unauthorized_transactionsNumber of transactions as a result of attempted unauthorized usage of the files endpoints
msgs_totalTotal messages sent and received through the use of all PubNub APIs
publishTotal number of messages published
subscribe_msgsTotal number of messages delivered to subscribers
history_msgsThe number of messages retrieved from storage, in total, within the time period.
pres_pubTotal number of messages published from Presence API
channelThe maximum number of unique active channels in time period. Activity is measured by any API requests involving a channel, whether subscribing or publishing to, fetching message history for, setting and getting presence associated data, among some other channel related API endpoints.
ipThe maximum number of unique active devices, based on IP address, in the time period. Activity is measured by Publish/Subscribe/History/Presence API requests within the time period.
key_ip_chThe maximum number of unique active devices, based on IP address, in any channel in time period. Activity is measured by Subscribe API requests for any and all channels and the uniqueness check is within the channel, within the time period. For example, if within a day, Channels A, B, and C have respectively maximum number of unique users/devices/uuids 100,1000,1001, the Active Unique Devices by Channel for the day would be 1001.
key_ip_uaThe maximum number of unique active devices, based on User Agent, in the time period. Activity is measured by Publish/Subscribe/History/Presence API requests within the time period.
uuidThe maximum number of UUIDs, or Users, based on uuid specified in SDK or API, observed during the time period.
fire_transactionsThe number of transactions generated by calls to the Fire API resource, counted in 2K buckets
fire_eh_transactionsNumber of transactions as a result of using the Fire endpoint, which allows the developer to send a message to PubNub Functions. This API call is made from a developer's PubNub Function code and results in the message data being passed to another PubNub Function.
fire_client_transactionsNumber of transactions as a result of using the Fire endpoint, which allows the developer to send a message to PubNub Functions. This API call is made from the developer's client application, with the message data sent to the PubNub network and subsequently passed to a PubNub Function.