Skip to main content

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.yaml
apiVersion: 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()

FieldDescriptionScheme
name*

Name of the check, must be unique within the canary

string

kafka

Apache Kafka queue configuration

Kafka

memory

In-memory queue configuration

Memory

nats

NATS queue configuration

NATS

pubsub

Google Cloud Pub/Sub configuration

Google Cloud Pub/Sub

rabbitmq

RabbitMQ queue configuration

RabbitMQ

sqs

Amazon SQS queue configuration

SQS

dependsOn

Checks that must complete before this check runs

[]string

description

Description for the check

string

display

Expression to change the formatting of the display

Expression

icon

Icon for overwriting default icon on the dashboard

Icon

labels

Labels for check

[map[string]string]

markFailOnEmpty

If a transformation or datasource returns empty results, the check should fail

boolean

metrics

Metrics to export from

[]Metrics

namespace

Namespace to insert the check result into when it differs from the canary namespace

string

test

Evaluate whether a check is healthy

Expression

transform

Transform data from a check into multiple individual checks

Expression

transformDeleteStrategy

Status to apply to transformed checks when the source check no longer returns them

string

SQS

FieldDescriptionScheme
queue*

Amazon SQS queue ARN

string

raw*

Enable raw message delivery without JSON wrapping

boolean

accessKey

Access Key ID

EnvVar

assumeRole

Role ARN to assume

string

connection

The connection url to use, mutually exclusive with accessKey and secretKey

Connection

endpoint

Custom AWS Endpoint to use

string

region

The AWS region

string

secretKey

Secret Access Key

EnvVar

sessionToken

Session token

EnvVar

skipTLSVerify

Skip TLS verify when connecting to AWS

boolean

waitTime

Time in seconds to long-poll for messages (default: 5, max: 20)

integer

Kafka

FieldDescriptionScheme
brokers*

List of Kafka broker addresses

[]string

group*

Kafka consumer group ID

string

topic*

Kafka topic name

string

Google Cloud Pub/Sub

FieldDescriptionScheme
project_id*

Google Cloud project ID

string

subscription*

Pub/Sub subscription name

string

connection

The connection url to use, mutually exclusive with credentials

Connection

credentials

The credentials to use for authentication

EnvVar

endpoint

Custom GCP Endpoint to use

string

project

Google Cloud project

string

skipTLSVerify

Skip TLS verification when connecting to GCP

boolean

NATS

FieldDescriptionScheme
subject*

NATS subject pattern

string

queue

NATS queue group name for load balancing

string

url

NATS server URL

string

RabbitMQ

FieldDescriptionScheme
host*

RabbitMQ server hostname

string

password*

RabbitMQ authentication password

string

port*

RabbitMQ server port

integer

queue*

RabbitMQ queue name

string

username*

RabbitMQ authentication username

string

Memory

FieldDescriptionScheme
queue*

In-memory queue name

string