Pub/Sub
The Pub/Sub check connects to a queue, such as Amazon SQS, Google Cloud Pub/Sub, RabbitMQ, Kafka, NATS, or an in-memory queue, and pulls messages.
pubsub-gcp.yamlapiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
name: pubsub-check
spec:
schedule: "@every 30s"
pubsub:
- name: gcp-incidents
pubsub:
project_id: flanksource-sandbox
subscription: incident-alerts-sub
transform:
expr: |
results.messages.map(r, gcp.incidents.toCheckResult(r)).toJSON()
| Field | Description | Scheme |
|---|---|---|
name* | Name of the check, must be unique within the canary |
|
kafka | Apache Kafka queue configuration | |
memory | In-memory queue configuration | |
nats | NATS queue configuration | |
pubsub | Google Cloud Pub/Sub configuration | |
rabbitmq | RabbitMQ queue configuration | |
sqs | Amazon SQS queue configuration | |
dependsOn | Checks that must complete before this check runs |
|
description | Description for the check |
|
display | Expression to change the formatting of the display | |
icon | Icon for overwriting default icon on the dashboard | |
labels | Labels for check |
|
markFailOnEmpty | If a transformation or datasource returns empty results, the check should fail |
|
metrics | Metrics to export from | |
namespace | Namespace to insert the check result into when it differs from the canary namespace |
|
test | Evaluate whether a check is healthy | |
transform | Transform data from a check into multiple individual checks | |
transformDeleteStrategy | Status to apply to transformed checks when the source check no longer returns them |
|
SQS
| Field | Description | Scheme |
|---|---|---|
queue* | Amazon SQS queue ARN |
|
raw* | Enable raw message delivery without JSON wrapping |
|
accessKey | Access Key ID | |
assumeRole | Role ARN to assume |
|
connection | The connection url to use, mutually exclusive with | |
endpoint | Custom AWS Endpoint to use |
|
region | The AWS region |
|
secretKey | Secret Access Key | |
sessionToken | Session token | |
skipTLSVerify | Skip TLS verify when connecting to AWS |
|
waitTime | Time in seconds to long-poll for messages (default: 5, max: 20) |
|
Kafka
| Field | Description | Scheme |
|---|---|---|
brokers* | List of Kafka broker addresses |
|
group* | Kafka consumer group ID |
|
topic* | Kafka topic name |
|
Google Cloud Pub/Sub
| Field | Description | Scheme |
|---|---|---|
project_id* | Google Cloud project ID |
|
subscription* | Pub/Sub subscription name |
|
connection | The connection url to use, mutually exclusive with | |
credentials | The credentials to use for authentication | |
endpoint | Custom GCP Endpoint to use |
|
project | Google Cloud project |
|
skipTLSVerify | Skip TLS verification when connecting to GCP |
|
NATS
| Field | Description | Scheme |
|---|---|---|
subject* | NATS subject pattern |
|
queue | NATS queue group name for load balancing |
|
url | NATS server URL |
|
RabbitMQ
| Field | Description | Scheme |
|---|---|---|
host* | RabbitMQ server hostname |
|
password* | RabbitMQ authentication password |
|
port* | RabbitMQ server port |
|
queue* | RabbitMQ queue name |
|
username* | RabbitMQ authentication username |
|
Memory
| Field | Description | Scheme |
|---|---|---|
queue* | In-memory queue name |
|