Skip to main content

PubSub

This check connects to a PubSub Queue (SQS, GCP PubSub, RabbitMQ, Kafka, NATs) 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

nats

NATS messaging system configuration

NATS

pubsub

Google Cloud Pub/Sub configuration

GCP PubSub

rabbitmq

RabbitMQ queue configuration

RabbitMQ

sqs

Amazon SQS queue configuration

SQS

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]

metrics

Metrics to export from

[]Metrics

test

Evaluate whether a check is healthy

Expression

transform

Transform data from a check into multiple individual checks

Expression

SQS

FieldDescriptionScheme
queue*

Amazon SQS queue ARN

string

raw*

Enable raw message delivery without JSON wrapping

boolean

waitTime

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

integer

accessKey

Access Key ID

EnvVar

secretKey

Secret Access Key

EnvVar

region

The AWS region

string

endpoint

Custom AWS Endpoint to use

string

skipTLSVerify

Skip TLS verify when connecting to AWS

boolean

Kafka

FieldDescriptionScheme
brokers*

List of Kafka broker addresses

[]string

group*

Kafka consumer group ID

string

topic*

Kafka topic name

string

GCP PubSub

FieldDescriptionScheme
project_id*

Google Cloud project ID

string

subscription*

Pub/Sub subscription name

string

credentials

The credentials to use for authentication

EnvVar

endpoint

Custom GCP Endpoint to use

string

skipTLSVerify

Skip TLS verification when connecting to GCP

boolean

NATS

FieldDescriptionScheme
queue*

NATS queue group name for load balancing

string

subject*

NATS subject pattern

string

url*

NATS server URL

string

RabbitMQ

FieldDescriptionScheme
host*

RabbitMQ server hostname

string

queue*

RabbitMQ queue name

string

password

RabbitMQ authentication password

string

port

RabbitMQ server port

integer

username

RabbitMQ authentication username

string