A newer version of this documentation is available.

View Latest

Statistics

    +
    Eventing Statistics, for each deployed Function, can be fetched from an Eventing node using the Web Console or using the REST API.

    Via the Web Console

    Eventing Statistics, for each deployed Function, can be fetched from an Eventing node using the Web Console.

    To fetch Eventing Statistics for a deployed Function you need to leave the Eventing main UI page. First go to the Couchbase Web Console > Servers page, then click Statistics. Note that this page will only show deployed Eventing functions. You can scroll down to any section labeled Eventing Stats: deployed_function_name and expand the section to show the four key graphs for the Function, along with numeric values listed below each graph:

    • Processed - displays the number of processed Functions.

    • Failures - displays the number of failures while processing the Function handler code.

    • Backlogs - displays the number of mutations to be processed by a Function.

    • Timeouts - displays the number of Functions which have encountered a timeout condition.

      stats

    Note, you may click and expand any of the above graphs for any deployed Eventing Function.

    Via the REST API

    The Functions REST API endpoints on this page are supported, as long as the content of the handler body is not created or modified externally (as the internal format of the body is not yet standardized).

    Eventing statistics can be fetched from each eventing node using REST API bound to localhost. The resulting JSON based responses are local to the node, and suitable for further aggregation across nodes of the cluster.

    The following REST endpoint could be used to get the full set of Eventing statistics:

    curl http://user:pass@localhost:8096/api/v1/stats?type=full

    This will return the full statistics set inclusive of events processing, events remaining, execution, failure, latency, worker PIDs and sequence processed.

    Note, omitting the parameter type=full will exclude dcp_event_backlog_per_vb, doc_timer_debug_stats, latency_stats, plasma_stats and seqs_processed from the response.

    The above statistics can also be individually obtained through the following REST endpoints:

    curl http://user:pass@localhost:8096/getExecutionStats?name=function_name
    curl http://user:pass@localhost:8096/getLatencyStats?name=function_name
    curl http://user:pass@localhost:8096/getFailureStats?name=function_name