Monitoring Google Cloud Pub/Sub
- Setup
- Google Cloud Pub/Sub - Metrics collection
- Google Cloud Pub/Sub Topic - Metrics collection
- Google Cloud Pub/Sub Subscription - Metrics collection
Setup
The Instana Google Cloud integration uses Service Accounts to create an API connection between Google Cloud and Instana. Below are instructions for creating the service account and providing Instana the service account credentials to begin making API calls on your behalf.
- Navigate to Google Cloud credentials page for the Google Cloud project you would like to setup the Instana integration.
- Press Create credentials and then select Service account key
- In the Service account dropdown, select New service account
- Give the service account a unique name
- Choose a role or create a custom one which contains at least the following permissions:
monitoring.timeSeries.list
pubsub.subscriptions.list
pubsub.topics.list
resourcemanager.projects.get
- Select JSON as the key type, and press create
- Take note where this file is saved, as it is needed to complete the integration
- Add a field to configuration.yml
credentials_path
with path to credentials file. (Example in configuration section.)
In order to monitor project(s) the following services need to be enabled:
Configuration
You can configure the Google Cloud Pub/Sub metrics poll rate in seconds by adding the following configuration to the configuration file of the GCP Agent:
com.instana.plugin.gcp.pubsub:
enabled: true
poll_rate: 60 # How often Google's monitoring API will be polled
credentials_path: '/opt/instana/credentials/cred-gcp.json' # Path to Service Account credentials
include_tags:
topic:
subscription:
exclude_tags:
topic:
subscription:
Filtering
Multiple tags can be defined, separated by a comma. Tags should be provided as a key-value pair separated by the : character. In order to make configuration easier, it is possible to define which tags you want to include in discovery or exclude from discovery. In case of defining tag in both lists (include and exclude), exclude list has higher priority. If there is no need for services filtering, the configuration should not be defined. It’s not mandatory to define all values in order to enable filtering.
To include topics and subscriptions by tags into discovery use following configuration:
com.instana.plugin.gcp.pubsub:
include_tags:
topic: # Comma separated list of tags in key:value format (e.g. env:dev,env:test)
subscription: # Comma separated list of tags in key:value format (e.g. env:dev,env:test)
To exclude topics and subscriptions by tags from discovery use following configuration:
com.instana.plugin.gcp.pubsub:
exclude_tags:
topic: # Comma separated list of tags in key:value format (e.g. env:dev,env:test)
subscription: # Comma separated list of tags in key:value format (e.g. env:dev,env:test)
In case include tags configuration should be applied to both, topics and subscriptions, use following configuration:
com.instana.plugin.gcp.pubsub:
include_tags: # Comma separated list of tags in key:value format (e.g. env:dev,env:test)
In case exclude tags configuration should be applied to both, topics and subscriptions, use following configuration:
com.instana.plugin.gcp.pubsub:
exclude_tags: # Comma separated list of tags in key:value format (e.g. env:dev,env:test)
Google Cloud Pub/Sub - Metrics collection
Configuration data
- Project Name
- Project ID
- Project Number
- Creation Time
Performance metrics
Metric | Description | Reducer/Aligner |
---|---|---|
Messages Count | Cumulative count of messages sent by Cloud Pub/Sub to subscriber clients. | REDUCE_SUM/ALIGN_DELTA |
Messages Size | Total byte size of the unacknowledged messages in a subscription. | REDUCE_SUM/ALIGN_MEAN |
Oldest Message Age | Age (in seconds) of the oldest unacknowledged message in a subscription. | REDUCE_MAX/ALIGN_MEAN |
Granularity for all metrics is 60 seconds.
Google Cloud Pub/Sub Topic - Metrics collection
Configuration data
- Project ID
- Topic Name
Performance metrics
Metric | Description | Reducer/Aligner |
---|---|---|
Messages Size | Total byte size of the unacknowledged messages in a subscription. | REDUCE_MEAN/ALIGN_DELTA |
Oldest Message Age Acked | Age (in seconds) of the oldest acknowledged message retained in a topic, broken down by Cloud region. | REDUCE_SUM/ALIGN_MEAN |
Oldest Message Age Unacked | Age (in seconds) of the oldest unacknowledged message in a topic, broken down by Cloud region. | REDUCE_SUM/ALIGN_MEAN |
Publish Operation | Cumulative count of publish message operations, grouped by result. | REDUCE_SUM/ALIGN_DELTA |
Publish Requests | Cumulative count of publish requests, grouped by result. | REDUCE_SUM/ALIGN_DELTA |
Operations Cost | Cost of operations, measured in bytes. | REDUCE_SUM/ALIGN_DELTA |
Granularity is 60 seconds for all metrics.
Google Cloud Pub/Sub Subscription - Metrics collection
Configuration data
- Project ID
- Subscription Name
- Topic Name
Performance metrics
Metric | Description | Reducer/Aligner |
---|---|---|
Messages Size | Total byte size of the unacknowledged messages in a subscription. | REDUCE_NONE/ALIGN_MEAN |
Messages Acked | Cumulative count of messages acknowledged by Acknowledge requests. | REDUCE_SUM/ALIGN_DELTA |
Messages Unacked | Number of unacknowledged messages in a subscription. | REDUCE_NONE/ALIGN_MEAN |
Messages Dead Letter | Cumulative count of messages published to dead letter topic. | REDUCE_SUM/ALIGN_DELTA |
Messages Sent | Cumulative count of messages sent by Cloud Pub/Sub to subscriber clients. | REDUCE_SUM/ALIGN_DELTA |
Messages Outstanding | Number of messages delivered to a subscription's push endpoint, but not yet acknowledged. | REDUCE_NONE/ALIGN_MEAN |
Oldest Message Age Acked | Age (in seconds) of the oldest acknowledged message retained in a subscription. | REDUCE_NONE/ALIGN_MEAN |
Oldest Message Age Unacked | Age (in seconds) of the oldest unacknowledged message in a subscription. | REDUCE_NONE/ALIGN_MEAN |
Message Operations Pull | Cumulative count of pull message operations, grouped by result. | REDUCE_SUM/ALIGN_DELTA |
Message Operations Ack | Cumulative count of acknowledge message operations, grouped by result. | REDUCE_SUM/ALIGN_DELTA |
Requests Pull | Cumulative count of pull requests, grouped by result. | REDUCE_SUM/ALIGN_DELTA |
Requests Push | Cumulative count of push attempts, grouped by result. | REDUCE_SUM/ALIGN_DELTA |
Requests Ack | Cumulative count of acknowledge requests, grouped by result. | REDUCE_SUM/ALIGN_DELTA |
Requests Push Latency | Distribution of push request latencies (in microseconds), grouped by result. | REDUCE_MEAN/ALIGN_DELTA |
Config Updates Count | Cumulative count of configuration changes for each subscription. | REDUCE_SUM/ALIGN_DELTA |
Operations Cost | Cumulative cost of operations, measured in bytes. | REDUCE_SUM/ALIGN_DELTA |
Granularity is 60 seconds for all metrics.
Health signatures
For each sensor, there is a curated knowledge base of health signatures that are evaluated continuously against the incoming metrics and are used to raise issues or incidents depending on user impact.
Built-in events trigger issues or incidents based on failing health signatures on entities, and custom events trigger issues or incidents based on defined thresholds of any given entity's individual metrics.
For information about built-events for the Google Cloud Pub/Sub, see the Built-in events reference.