A newer version of this documentation is available.

View Latest

Prometheus Metrics

      +

      This content covers the Prometheus statistics and metrics collected and made available by Sync Gateway
      Sync Gateway’s statistics and metrics provide under-the-hood data on the performance, resource utilization and health of it nodes. This is increasingly important as deployments scale to support a large numbers of connected mobile and edge components.

      Prometheus format

      Like other Couchbase services, Sync Gateway offers Prometheus-compatible metrics in a flat JSON format.

      Use the _metrics method to request these metrics:

      Example 1. Metrics in Prometheus format
      curl -X GET "http://localhost:4986/_metrics" -H "accept: application/json"

      This endpoint’s data will be scraped at configurable interval, when the metricsInterface is activated and Sync Gateway integrated with Prometheus — see: Integrate Prometheus and our blog entry Monitoring Couchbase Sync Gateway with Prometheus and Grafana.

      The response in Prometheus format is defined as follows:

      Tip
      • The x.y.z badge shows the Sync Gateway version the metric was added in.

      • The type / unit badge shows shows the Prometheus type and unit (if present).

      • The Database and Collection badges show the scope of the metric. If not scoped to Database or Collection, the metric applies to the Sync Gateway as a whole.

      sgw_cache_abandoned_seqs     3.0.0 counter database

      The total number of skipped sequences abandoned, based on cache.channel_cache.max_wait_skipped.

      sgw_cache_chan_cache_active_revs     3.0.0 gauge database

      The total number of active revisions in the channel cache.

      sgw_cache_chan_cache_bypass_count     3.0.0 counter database

      The total number of transient bypass channel caches created to serve requests when the channel cache was at capacity.

      sgw_cache_chan_cache_channels_added     3.0.0 counter database

      The total number of channel caches added. The metric doesn't decrease when a channel is removed. That is, it is similar to chan_cache_num_channels but doesn't track removals.

      sgw_cache_chan_cache_channels_evicted_inactive     3.0.0 counter database

      The total number of channel cache channels evicted due to inactivity.

      sgw_cache_chan_cache_channels_evicted_nru     3.0.0 counter database

      The total number of active channel cache channels evicted, based on 'not recently used' criteria.

      sgw_cache_chan_cache_compact_count     3.0.0 counter database

      The total number of channel cache compaction runs.

      sgw_cache_chan_cache_compact_time     3.0.0 counter / nanoseconds database

      The total amount of time taken by channel cache compaction across all compaction runs.

      sgw_cache_chan_cache_hits     3.0.0 counter database

      The total number of channel cache requests fully served by the cache. This metric is useful in calculating the channel cache hit ratio: channel cache hit ratio = chan_cache_hits / (chan_cache_hits + chan_cache_misses)

      sgw_cache_chan_cache_max_entries     3.0.0 gauge database

      The total size of the largest channel cache. This metric helps with channel cache tuning, and provides a hint on cache size variation (when compared to average cache size).

      sgw_cache_chan_cache_misses     3.0.0 counter database

      The total number of channel cache requests not fully served by the cache. This metric is useful when calculating the channel cache hit ratio: channel cache hit ratio = chan_cache_hits / (chan_cache_hits + chan_cache_misses)

      sgw_cache_chan_cache_num_channels     3.0.0 gauge database

      The total number of channels being cached. The total number of channels being cached provides insight into potential max cache size requirements and also node usage (for example, chan_cache_num_channels * max_cache_size).

      sgw_cache_chan_cache_pending_queries     3.0.0 gauge database

      The total number of channel cache pending queries.

      sgw_cache_chan_cache_removal_revs     3.0.0 gauge database

      The total number of removal revisions in the channel cache. This metric acts as a reminder that removals must be considered when tuning the channel cache size and also helps users understand whether they should be tuning tombstone retention policy (metadata purge interval) and running compact.

      sgw_cache_chan_cache_tombstone_revs     3.0.0 gauge database

      The total number of tombstone revisions in the channel cache. This metric acts as a reminder that tombstones and removals must be considered when tuning the channel cache size and also helps users understand whether they should be tuning tombstone retention policy (metadata purge interval), and running compact.

      sgw_cache_high_seq_cached     3.0.0 counter database

      The highest sequence number cached. Note: There may be skipped sequences lower than high_seq_cached.

      sgw_cache_high_seq_stable     3.0.0 counter database

      The highest contiguous sequence number that has been cached.

      sgw_cache_non_mobile_ignored_count     3.0.0 counter database

      Number of non mobile documents that were ignored off the cache feed.

      sgw_cache_num_active_channels     3.0.0 gauge database

      The total number of active channels.

      sgw_cache_num_skipped_seqs     3.0.0 counter database

      The total number of skipped sequences.

      sgw_cache_pending_seq_len     3.0.0 gauge database

      The total number of pending sequences. These are out-of-sequence entries waiting to be cached.

      sgw_cache_rev_cache_bypass     3.0.0 gauge database

      The total number of revision cache bypass operations performed.

      sgw_cache_rev_cache_hits     3.0.0 counter database

      The total number of revision cache hits. This metric can be used to calculate the ratio of revision cache hits: Rev Cache Hit Ratio = rev_cache_hits / (rev_cache_hits + rev_cache_misses)

      sgw_cache_rev_cache_misses     3.0.0 counter database

      The total number of revision cache misses. This metric can be used to calculate the ratio of revision cache misses: Rev Cache Miss Ratio = rev_cache_misses / (rev_cache_hits + rev_cache_misses)

      sgw_cache_skipped_seq_len     3.0.0 gauge database

      The current length of the pending skipped sequence queue.

      sgw_cache_view_queries     3.0.0 counter database

      The total view_queries.

      sgw_collection_doc_reads_bytes     3.1.0 counter / bytes collection database

      The total number of bytes read from this collection as part of document writes since Sync Gateway node startup.

      sgw_collection_doc_writes_bytes     3.1.0 counter / bytes collection database

      The total number of bytes written to this collection as part of document writes since Sync Gateway node startup.

      sgw_collection_import_count     3.1.0 counter collection database

      The total number of documents imported to this collection since Sync Gateway node startup.

      sgw_collection_num_doc_reads     3.1.0 counter collection database

      The total number of documents read from this collection since Sync Gateway node startup (i.e. sending to a client)

      sgw_collection_num_doc_writes     3.1.0 counter collection database

      The total number of documents written to this collection since Sync Gateway node startup (i.e. receiving from a client)

      sgw_collection_sync_function_count     3.0.0 counter collection database

      The total number of times that the sync_function is evaluated for this collection.

      sgw_collection_sync_function_exception_count     3.1.0 counter collection database

      The total number of times the sync function encountered an exception for this collection.

      sgw_collection_sync_function_reject_access_count     3.1.0 counter collection database

      The total number of documents rejected by write access functions (requireAccess, requireRole, requireUser) for this collection.

      sgw_collection_sync_function_reject_count     3.1.0 counter collection database

      The total number of documents rejected by the sync_function for this collection.

      sgw_collection_sync_function_time     3.0.0 counter / nanoseconds collection database

      The total time spent evaluating the sync_function for this keyspace.

      sgw_config_database_config_bucket_mismatches     3.1.2 counter / bytes

      The total number of times a database config is polled from a bucket that doesn't match the bucket specified in the database config.

      sgw_database_compaction_attachment_start_time     3.0.0 gauge / unix timestamp database

      The compaction_attachment_start_time

      sgw_database_compaction_tombstone_start_time     3.0.0 gauge / unix timestamp database

      The compaction_tombstone_start_time.

      sgw_database_conflict_write_count     3.0.0 counter database

      The total number of writes that left the document in a conflicted state. Includes new conflicts, and mutations that don't resolve existing conflicts.

      sgw_database_crc32c_match_count     3.0.0 gauge database

      The total number of instances during import when the document cas had changed, but the document was not imported because the document body had not changed.

      sgw_database_dcp_caching_count     3.0.0 gauge database

      The total number of DCP mutations added to Sync Gateway's channel cache. Can be used with dcp_caching_time to monitor cache processing latency. That is, the time between seeing a change on the DCP feed and when it's available in the channel cache: DCP cache latency = dcp_caching_time / dcp_caching_count

      sgw_database_dcp_caching_time     3.0.0 gauge / nanoseconds database

      The total time between a DCP mutation arriving at Sync Gateway and being added to channel cache. This metric can be used with dcp_caching_count to monitor cache processing latency. That is, the time between seeing a change on the DCP feed and when it's available in the channel cache: dcp_cache_latency = dcp_caching_time / dcp_caching_count

      sgw_database_dcp_received_count     3.0.0 gauge database

      The total number of document mutations received by Sync Gateway over DCP.

      sgw_database_dcp_received_time     3.0.0 gauge / nanoseconds database

      The time between a document write and that document being received by Sync Gateway over DCP. If the document was written prior to Sync Gateway starting the feed, it is recorded as the time since the feed was started. This metric can be used to monitor DCP feed processing latency

      sgw_database_doc_reads_bytes_blip     3.0.0 counter / bytes database

      The total number of bytes read via Couchbase Lite 2.x replication since Sync Gateway node startup.

      sgw_database_doc_writes_bytes     3.0.0 counter / bytes database

      The total number of bytes written as part of document writes since Sync Gateway node startup.

      sgw_database_doc_writes_bytes_blip     3.0.0 counter / bytes database

      The total number of bytes written as part of Couchbase Lite document writes since Sync Gateway node startup.

      sgw_database_doc_writes_xattr_bytes     3.0.0 counter / bytes database

      The total size of xattrs written (in bytes).

      sgw_database_high_seq_feed     3.0.0 counter database

      Highest sequence number seen on the caching DCP feed.

      sgw_database_http_bytes_written     3.2.0 counter / bytes database

      Number of bytes written over public interface for REST api

      sgw_database_import_process_compute     3.2.0 counter database

      Represents the compute unit for import processes on the database.

      sgw_database_num_attachments_compacted     3.0.0 counter database

      The number of attachments compacted import_feed

      sgw_database_num_doc_reads_blip     3.0.0 counter database

      The total number of documents read via Couchbase Lite 2.x replication since Sync Gateway node startup.

      sgw_database_num_doc_reads_rest     3.0.0 counter database

      The total number of documents read via the REST API since Sync Gateway node startup. Includes Couchbase Lite 1.x replication.

      sgw_database_num_doc_writes     3.0.0 counter database

      The total number of documents written by any means (replication, rest API interaction or imports) since Sync Gateway node startup.

      sgw_database_num_public_rest_requests     3.2.0 counter database

      The total number of requests sent over the public REST api.

      sgw_database_num_replications_active     3.0.0 gauge database

      The total number of active replications. This metric only counts continuous pull replications.

      sgw_database_num_replications_rejected_limit     3.2.0 counter database

      The total number of times a replication connection is rejected due to it being over the threshold.

      sgw_database_num_replications_total     3.0.0 counter database

      The total number of replications created since Sync Gateway node startup.

      sgw_database_num_tombstones_compacted     3.0.0 counter database

      Number of tombstones compacted through tombstone compaction task on the database.

      sgw_database_public_rest_bytes_read     3.2.0 counter / bytes database

      The total amount of bytes read over the public REST api

      sgw_database_replication_bytes_received     3.2.0 counter / bytes database

      Total bytes received over replications to the database.

      sgw_database_replication_bytes_sent     3.2.0 counter / bytes database

      Total bytes sent over replications from the database.

      sgw_database_sequence_assigned_count     3.0.0 counter database

      The total number of sequence numbers assigned.

      sgw_database_sequence_get_count     3.0.0 counter database

      The total number of high sequence lookups.

      sgw_database_sequence_incr_count     3.0.0 counter database

      The total number of times the sequence counter document has been incremented.

      sgw_database_sequence_released_count     3.0.0 counter database

      The total number of unused, reserved sequences released by Sync Gateway.

      sgw_database_sequence_reserved_count     3.0.0 counter database

      The total number of sequences reserved by Sync Gateway.

      sgw_database_sync_function_count     3.1.0 counter database

      The total number of times that the sync_function is evaluated. The {sync_function_count_ stat is useful in assessing the usage of the sync_function, when used in conjunction with the sync_function_time.

      sgw_database_sync_function_exception_count     3.0.0 counter database

      The total number of times that a sync function encountered an exception (across all collections).

      sgw_database_sync_function_time     3.1.0 counter / nanoseconds database

      The total time spent evaluating the sync_function. The sync_function_time stat can be useful when: (a). Troubleshooting excessively long push times, where it can help identify potential sync_function bottlenecks (for example, those arising from complex, or inefficient, sync_function design. (b). Assessing the overall contribution of the sync_function processing to overall push replication write times.

      sgw_database_sync_process_compute     3.2.0 counter database

      The compute unit for syncing with clients measured through cpu time and memory used for sync

      sgw_database_total_sync_time     3.2.0 counter / seconds database

      The total total sync time is a proxy for websocket connections. Tracking long lived and potentially idle connections. This stat represents the continually growing number of connections per sec.

      sgw_database_warn_channel_name_size_count     3.0.0 counter database

      The total number of warnings relating to the channel name size.

      sgw_database_warn_channels_per_doc_count     3.0.0 counter database

      The total number of warnings relating to the channel count exceeding the channel count threshold.

      sgw_database_warn_grants_per_doc_count     3.0.0 counter database

      The total number of warnings relating to the grant count exceeding the grant count threshold.

      sgw_database_warn_xattr_size_count     3.0.0 counter database

      The total number of warnings relating to the xattr sync data being larger than a configured threshold.

      sgw_delta_sync_delta_cache_hit     3.0.0 counter database

      The total number of requested deltas that were available in the revision cache.

      sgw_delta_sync_delta_pull_replication_count     3.0.0 counter database

      The number of delta replications that have been run.

      sgw_delta_sync_delta_push_doc_count     3.0.0 counter database

      The total number of documents pushed as a delta from a previous revision.

      sgw_delta_sync_delta_sync_miss     3.0.0 counter database

      The total number of requested deltas that were not available in the revision cache.

      sgw_delta_sync_deltas_requested     3.0.0 counter database

      The total number of times a revision is sent as delta from a previous revision.

      sgw_delta_sync_deltas_sent     3.0.0 counter database

      The total number of revisions sent to clients as deltas.

      sgw_gsi_views__count     3.0.0 counter database

      The total number of gsi/view queries performed.

      sgw_gsi_views__error_count     3.0.0 counter database

      The total number of errors that occurred when performing the gsi/view query

      sgw_gsi_views__time     3.0.0 counter / nanoseconds database

      The total time taken to perform gsi/view queries.

      sgw_replication_expected_sequence_len     3.1.0 counter database replication

      The length of expectedSeqs list in the ISGR checkpointer.

      sgw_replication_expected_sequence_len_post_cleanup     3.1.0 counter database replication

      The length of expectedSeqs list in the ISGR checkpointer after the cleanup task has been run.

      sgw_replication_processed_sequence_len     3.1.0 counter database replication

      The length of processedSeqs list in the ISGR checkpointer.

      sgw_replication_processed_sequence_len_post_cleanup     3.1.0 counter database replication

      The length of processedSeqs list in the ISGR checkpointer after the cleanup task has been run.

      sgw_replication_pull_attachment_pull_bytes     3.0.0 counter / bytes database

      The total size of attachments pulled. This is the pre-compressed size.

      sgw_replication_pull_attachment_pull_count     3.0.0 counter database

      The total number of attachments pulled.

      sgw_replication_pull_max_pending     3.0.0 gauge database

      The high watermark for the number of documents buffered during feed processing, waiting on a missing earlier sequence.

      sgw_replication_pull_num_pull_repl_active_continuous     3.0.0 gauge database

      The total number of continuous pull replications in the active state.

      sgw_replication_pull_num_pull_repl_active_one_shot     3.0.0 gauge database

      The total number of one-shot pull replications in the active state.

      sgw_replication_pull_num_pull_repl_caught_up     3.0.0 gauge database

      The total number of replications which have caught up to the latest changes.

      sgw_replication_pull_num_pull_repl_since_zero     3.0.0 counter database

      The total number of new replications started (/_changes?since=0).

      sgw_replication_pull_num_pull_repl_total_caught_up     3.0.0 gauge database

      The total number of pull replications which have caught up to the latest changes across all replications.

      sgw_replication_pull_num_pull_repl_total_continuous     3.0.0 gauge database

      The total number of continuous pull replications.

      sgw_replication_pull_num_pull_repl_total_one_shot     3.0.0 gauge database

      The total number of one-shot pull replications.

      sgw_replication_pull_num_replications_active     3.0.0 gauge database

      The total number of active replications. This metric only counts continuous pull replications.

      sgw_replication_pull_request_changes_count     3.0.0 counter database

      The total number of changes requested. This metric can be used to calculate the latency of requested changes: changes request latency = request_changes_time / request_changes_count

      sgw_replication_pull_request_changes_time     3.0.0 counter / nanoseconds database

      Total time taken to handle changes request response. This metric can be used to calculate the latency of requested changes: changes request latency = request_changes_time / request_changes_count

      sgw_replication_pull_rev_error_count     3.2.0 counter database

      The total number of rev messages that were failed to be processed during replication.

      sgw_replication_pull_rev_processing_time     3.0.0 gauge / nanoseconds database

      The total amount of time processing rev messages (revisions) during pull revision. This metric can be used with rev_send_count to calculate the average processing time per revision: average processing time per revision = rev_processing_time / rev_send_count

      sgw_replication_pull_rev_send_count     3.0.0 counter database

      The total number of rev messages processed during replication. This metric can be used with rev_processing_time to calculate the average processing time per revision: average processing time per revision = rev_processing_time / rev_send_count

      sgw_replication_pull_rev_send_latency     3.0.0 counter / nanoseconds database

      The total amount of time between Sync Gateway receiving a request for a revision and that revision being sent. In a pull replication, Sync Gateway sends a /_changes request to the client and the client responds with the list of revisions it wants to receive. So, rev_send_latency measures the time between the client asking for those revisions and Sync Gateway sending them to the client. Note: Measuring time from the /_changes response means that this stat will vary significantly depending on the changes batch size A larger batch size will result in a spike of this stat, even if the processing time per revision is unchanged. A more useful stat might be the average processing time per revision: average processing time per revision = rev_processing_time] / rev_send_count

      sgw_replication_push_attachment_push_bytes     3.0.0 counter / bytes database

      The total number of attachment bytes pushed.

      sgw_replication_push_attachment_push_count     3.0.0 counter database

      The total number of attachments pushed.

      sgw_replication_push_doc_push_count     3.0.0 gauge database

      The total number of documents pushed.

      sgw_replication_push_doc_push_error_count     3.0.0 gauge database

      The total number of documents that failed to push.

      sgw_replication_push_propose_change_count     3.0.0 counter database

      The total number of changes and-or proposeChanges messages processed since node start-up. The propose_change_count stat can be useful when: (a). Assessing the number of redundant requested changes being pushed by the client. Do this by comparing the propose_change_count value with the number of actual writes num_doc_writes, which could indicate that clients are pushing changes already known to Sync Gateway. (b). Identifying situations where push replications are unexpectedly being restarted from zero.

      sgw_replication_push_propose_change_time     3.0.0 counter / nanoseconds database

      The total time spent processing changes and/or proposeChanges messages. The propose_change_time stat can be useful in diagnosing push replication issues arising from potential bottlenecks changes and-or proposeChanges processing. Note: The propose_change_time is not included in the write_processing_time

      sgw_replication_push_write_processing_time     3.0.0 gauge / nanoseconds database

      Total time spent processing writes. Measures complete request-to-response time for a write. The write_processing_time stat can be useful when: (a). Determining the average time per write: average time per write = write_processing_time / num_doc_writes stat value (b). Assessing the benefit of adding additional Sync Gateway nodes, as it can point to Sync Gateway being a bottleneck (c). Troubleshooting slow push replication, in which case it ought to be considered in conjunction with sync_function_time

      sgw_replication_sgr_conflict_resolved_local_count     3.0.0 counter database replication

      The total number of conflicting documents that were resolved successfully locally (by the active replicator)

      sgw_replication_sgr_conflict_resolved_merge_count     3.0.0 counter database replication

      The total number of conflicting documents that were resolved successfully by a merge action (by the active replicator)

      sgw_replication_sgr_conflict_resolved_remote_count     3.0.0 counter database replication

      The total number of conflicting documents that were resolved successfully remotely (by the active replicator)

      sgw_replication_sgr_deltas_recv     3.0.0 counter database replication

      The total number of documents that were purged since replication started.

      sgw_replication_sgr_deltas_requested     3.0.0 counter database replication

      The total number of deltas requested.

      sgw_replication_sgr_deltas_sent     3.0.0 counter database replication

      The total number of deltas sent.

      sgw_replication_sgr_docs_checked_recv     3.0.0 counter database replication

      The total number of document changes received over changes message.

      sgw_replication_sgr_docs_checked_sent     3.0.0 counter database replication

      The total number of documents checked for changes since replication started. This represents the number of potential change notifications pushed by Sync Gateway. This is not necessarily the number of documents pushed, as a given target might already have the change and this is used by Inter-Sync Gateway and SG Replicate. This metric can be useful when analyzing replication history, and to filter by active replications.

      sgw_replication_sgr_num_attachment_bytes_pulled     3.0.0 counter / bytes database replication

      The total number of bytes in all the attachments that were pulled since replication started.

      sgw_replication_sgr_num_attachment_bytes_pushed     3.0.0 counter / bytes database replication

      The total number of bytes in all the attachments that were pushed since replication started.

      sgw_replication_sgr_num_attachments_pulled     3.0.0 counter database replication

      The total number of attachments that were pulled since replication started.

      sgw_replication_sgr_num_attachments_pushed     3.0.0 counter database replication

      The total number of attachments that were pushed since replication started.

      sgw_replication_sgr_num_connect_attempts_pull     3.0.0 counter database replication

      Number of connection attempts made for pull replication connection.

      sgw_replication_sgr_num_connect_attempts_push     3.0.0 counter database replication

      Number of connection attempts made for push replication connection.

      sgw_replication_sgr_num_docs_failed_to_pull     3.0.0 counter database replication

      The total number of document pulls that failed since replication started.

      sgw_replication_sgr_num_docs_failed_to_push     3.0.0 counter database replication

      The total number of documents that failed to be pushed since replication started. Used by Inter-Sync Gateway and SG Replicate.

      sgw_replication_sgr_num_docs_pulled     3.0.0 counter database replication

      The total number of documents that were pulled since replication started.

      sgw_replication_sgr_num_docs_purged     3.0.0 counter database replication

      The total number of documents that were purged since replication started.

      sgw_replication_sgr_num_docs_pushed     3.0.0 counter database replication

      The total number of documents that were pushed since replication started. Used by Inter-Sync Gateway and SG Replicate.

      sgw_replication_sgr_num_handlers_panicked     3.1.0 counter database replication

      The number of times a handler panicked and didn't know how to recover from it.

      sgw_replication_sgr_num_reconnects_aborted_pull     3.0.0 counter database replication

      Number of times pull replication connection reconnect loops have failed.

      sgw_replication_sgr_num_reconnects_aborted_push     3.0.0 counter database replication

      Number of times push replication connection reconnect loops have failed.

      sgw_replication_sgr_push_conflict_count     3.0.0 counter database replication

      The total number of pushed documents that conflicted since replication started.

      sgw_replication_sgr_push_rejected_count     3.0.0 counter database replication

      The total number of pushed documents that were rejected since replication started.

      sgw_resource_utilization_admin_net_bytes_recv     3.0.0 counter / bytes

      The total number of bytes received (since node start-up) on the network interface to which the Sync Gateway api.admin_interface is bound. By default, that is the number of bytes received on 127.0.0.1:4985 since node start-up.

      sgw_resource_utilization_admin_net_bytes_sent     3.0.0 counter / bytes

      The total number of bytes sent (since node start-up) on the network interface to which the Sync Gateway api.admin_interface is bound.By default, that is the number of bytes sent on 127.0.0.1:4985 since node start-up.

      sgw_resource_utilization_error_count     3.0.0 counter

      The total number of errors logged.

      sgw_resource_utilization_go_memstats_heapalloc     3.0.0 gauge / bytes

      HeapAlloc is bytes of allocated heap objects. "Allocated" heap objects include all reachable objects, as well as unreachable objects that the garbage collector has not yet freed. Specifically, HeapAlloc increases as heap objects are allocated and decreases as the heap is swept and unreachable objects are freed. Sweeping occurs incrementally between GC cycles, so these two processes occur simultaneously, and as a result HeapAlloc tends to change smoothly (in contrast with the sawtooth that istypical of stop-the-world garbage collectors).

      sgw_resource_utilization_go_memstats_heapidle     3.0.0 gauge / bytes

      HeapIdle is bytes in idle (unused) spans. Idle spans have no objects in them. These spans could be (and may already have been) returned to the OS, or they can be reused for heap allocations, or they can be reused as stack memory. HeapIdle minus HeapReleased estimates the amount of memory that could be returned to the OS, but is being retained by the runtime so it can grow the heap without requesting more memory from the OS. If this difference is significantly larger than the heap size, it indicates there was a recent transient spike in live heap size.

      sgw_resource_utilization_go_memstats_heapinuse     3.0.0 gauge / bytes

      HeapInuse is bytes in in-use spans. In-use spans have at least one object in them. These spans an only be used for other objects of roughly the same size. HeapInuse minus HeapAlloc estimates the amount of memory that has been dedicated to particular size classes, but is not currently being used. This is an upper bound on fragmentation, but in general this memory can be reused efficiently.

      sgw_resource_utilization_go_memstats_heapreleased     3.0.0 gauge / bytes

      HeapReleased is bytes of physical memory returned to the OS. This counts heap memory from idle spans that was returned to the OS and has not yet been reacquired for the heap.

      sgw_resource_utilization_go_memstats_pausetotalns     3.0.0 gauge / nanoseconds

      PauseTotalNs is the cumulative nanoseconds in GC stop-the-world pauses since the program started. During a stop-the-world pause, all goroutines are paused and only the garbage collector can run.

      sgw_resource_utilization_go_memstats_stackinuse     3.0.0 gauge / bytes

      StackInuse is bytes in stack spans. In-use stack spans have at least one stack in them. These spans can only be used for other stacks of the same size. There is no StackIdle because unused stack spans are returned to the heap (and hence counted toward HeapIdle).

      sgw_resource_utilization_go_memstats_stacksys     3.0.0 gauge / bytes

      StackSys is bytes of stack memory obtained from the OS. StackSys is StackInuse, plus any memory obtained directly from the OS for OS thread stacks (which should be minimal).

      sgw_resource_utilization_go_memstats_sys     3.0.0 gauge / bytes

      Sys is the total bytes of memory obtained from the OS. Sys is the sum of the XSys fields below. Sys measures the virtual address space reserved by the Go runtime for the heap, stacks, and other internal data structures. It's likely that not all of the virtual address space is backed by physical memory at any given moment, though in general it all was at some point.

      sgw_resource_utilization_goroutines_high_watermark     3.0.0 gauge

      Peak number of go routines since process start.

      sgw_resource_utilization_num_goroutines     3.0.0 gauge

      The total number of goroutines.

      sgw_resource_utilization_process_cpu_percent_utilization     3.0.0 gauge / percent

      The CPU's utilization as percentage value. The CPU usage calculation is performed based on user and system CPU time, but it does not include components such as iowait. The derivation means that the values of process_cpu_percent_utilization and %Cpu, returned when running the top command, will differ

      sgw_resource_utilization_process_memory_resident     3.0.0 gauge / bytes

      The memory utilization (Resident Set Size) for the process, in bytes.

      sgw_resource_utilization_pub_net_bytes_recv     3.0.0 counter / bytes

      The total number of bytes received (since node start-up) on the network interface to which the Sync Gateway api.public_interface is bound. By default, that is the number of bytes received on 127.0.0.1:4984 since node start-up

      sgw_resource_utilization_pub_net_bytes_sent     3.0.0 counter / bytes

      The total number of bytes sent (since node start-up) on the network interface to which Sync Gateway api.public_interface is bound. By default, that is the number of bytes sent on 127.0.0.1:4984 since node start-up.

      sgw_resource_utilization_system_memory_total     3.0.0 gauge / bytes

      The total memory available on the system in bytes.

      sgw_resource_utilization_uptime     3.0.0 counter / nanoseconds

      The total uptime.

      sgw_resource_utilization_warn_count     3.0.0 counter

      The total number of warnings logged.

      sgw_security_auth_failed_count     3.0.0 counter database

      The total number of unsuccessful authentications. This metric is useful in monitoring the number of authentication errors.

      sgw_security_auth_success_count     3.0.0 counter database

      The total number of successful authentications. This metric is useful in monitoring the number of authenticated requests.

      sgw_security_num_access_errors     3.0.0 counter database

      The total number of documents rejected by write access functions (requireAccess, requireRole, requireUser).

      sgw_security_num_docs_rejected     3.0.0 counter database

      The total number of documents rejected by the sync_function.

      sgw_security_total_auth_time     3.0.0 gauge / nanoseconds database

      The total time spent in authenticating all requests. This metric can be compared with auth_success_count and auth_failed_count to derive an average success and-or fail rate.

      sgw_shared_bucket_import_import_cancel_cas     3.0.0 counter database

      The total number of imports cancelled due to cas failure.

      sgw_shared_bucket_import_import_count     3.0.0 counter database

      The total number of docs imported.

      sgw_shared_bucket_import_import_error_count     3.0.0 counter database

      The total number of errors arising as a result of a document import.

      sgw_shared_bucket_import_import_high_seq     3.0.0 counter database

      The highest sequence number value imported.

      sgw_shared_bucket_import_import_partitions     3.0.0 gauge database

      The total number of import partitions.

      sgw_shared_bucket_import_import_processing_time     3.0.0 gauge / nanoseconds database

      The total time taken to process a document import.