Skip to main content
Skip table of contents

Notifier / Notification Service

What is the Notifier?

Notifier is a cluster-level central service that provides an in-tenant notification service. Currently, we use it internally to send out Triggered Alerts notifications. In the future, we have a plan to make it more robust and use it for all of our notification needs.

Installation/deployment

Pre-requisites

  1. Jetstream enabled NATS:
    The notifier depends on Jetstream enabled NATS (HA-NATS preferred). So, a Jetstream installed NATS installation is expected. Refer the NATS Documentation or the Artifact Hub NATS Server Package page for installing Jetstream enabled NATS.

Config file:

Prepare the notifier Config file notifier.yaml with your intended options and customizations

YAML
log:
  level: debug
  formatter: stackdriver
rest:
  port: 8000
nats:
  nats_url: nats://nats:4222 # change it to your NATS instance
  is_cluster_wide: true
  replicas: 3
stream:
  prefix: notifier
tenant_credentials:
  dev:
    token: ZWxlbWVudG5lY2Vzc2FyeXN1
    api_key: ScqOCOUpkJFEx-ZBNTExhq3jVBCaL5KJDvVFZx52JQQ=
    comment: tenant credentials for dev
  qa:
    token: Y2lyY3VzZW5vdWdocmlzZXNv
    api_key: APIKeyFromQATenant
    comment: tenant credentials for qa
  demo:
    token: bW9tZW50Y29taW5naGVhcmRl
    api_key: DZON7VMNl2H7HrwSWMGtCT8zNoJYceQ5_LJ5I4C77Go=
    comment: tenant credentials for demo

Configurations:

  • log : Set the log level and formatter for logging messages of Notifier Service.

  • rest : Set the port for notifier service to expose its APIs to.

  • stream:

    • prefix: Prefix to be appended to the stream name while creating the stream. This is to isolate multiple notifier instances. Default value is th

  • nats: Configuration for connection to Jetstream enabled NATS

  • tenant_credentials: Credentials to register thingshub tenant to notifier.

    • xyz: Subdomain of the tenant to register.

      • token: Randomly generated string that thingshub tenant uses as push token while requesting notifier to send notifier.

      • api_key: API key generated in thingshub tenant that notifier uses to get user data for processing the notifier.

      • comment: Additional information for the tenant operator

Deployment

With these dependencies resolved, now the Notifier can be installed by following the below steps

  1. Add notifier chart repo:

    CODE
    helm repo add smartmakers http://helm.smartmakers.de
  2. Update helm local repo

    CODE
    helm repo update
  3. Run the following command to install a new Notifier deployment with a given version tag

CODE
helm install {name} smartmakers/thub-notifier --namespace {name} --create-namespace --version {version} -f notifier.yaml

Tips & Tricks

TBA

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.