Deploy a Gotify Alerter
Part of the Komodo Hub collection.
Deploys an Alerter that pushes to Gotify. Docker image built from foxxmd/komodo-utilities.
- A running Gotify instance (installation docs)
- A Gotify App token
Use either of the methods below.
Create a Resource Sync with the TOML configuration below to
- create the Stack to run deploy-gotify-Alerter
- add the Gotify App Token Variable and
- setup the Alerter + configuration
Steps:
- Open Komodo Dashboard -> Syncs -> New Resource Sync
- Choose Mode -> UI Defined
- Toggle the following to active:
- Managed
- Include Sync Resources
- Include Sync Variables
- Toggle the following to active:
Add the below configuration to Resource File field and then modify variables for your environment (GOTIFY_URL, GOTIFY_APP_TOKEN, endpoint.params.url, etc...)
[[stack]]
name = "gotify-alerter"
[stack.config]
repo = "foxxmd/deploy-gotify-alerter"
file_paths = [
"compose.yaml",
]
environment = """
## Required
# Your Gotify instance URL
GOTIFY_URL = https://gotify.CHANGEME.com
# App Token created for Komodo
GOTIFY_APP_TOKEN = [[GOTIFY_APP_TOKEN]]
## Optional
# Need to add to `compose.yaml` as well
# Set the Gotify Priority level based on Komodo alert severity
#GOTIFY_OK_PRIORITY=3
#GOTIFY_WARNING_PRIORITY=5
#GOTIFY_CRITICAL_PRIORITY=8
# Set whether to include Komodo Severity Level in notification title
#LEVEL_IN_TITLE=true
# Prefixes messages with a checkmark when the Alert is in the 'Resolved' state
#INDICATE_RESOLVED=true
# Filter if an alert is pushed based on its Resolved status
# * leave unset to push all alerts
# * otherwise, alerts will only be pushed if Alert is one of the comma-separated states set here
#ALLOW_RESOLVED_TYPE=resolved,unresolved
## Delay alerts with below types for X milliseconds
## and cancel pushing alert if it is resolved within that time
#UNRESOLVED_TIMEOUT_TYPES=ServerCpu,ServerMem
#UNRESOLVED_TIMEOUT=2000
"""
[[variable]]
name = "GOTIFY_APP_TOKEN"
value = "CHANGE_ME"
is_secret = true
[[alerter]]
name = "gotify"
[alerter.config]
enabled = true
endpoint.type = "Custom"
endpoint.params.url = "http://gotify-alerter-ip:7000"
Save the sync and then Execute Sync to create the Alerter.
Create a new Stack with the following for compose.yaml
file.
services:
komodo-gotify:
image: foxxmd/komodo-gotify-alerter:latest
environment:
- GOTIFY_URL=${GOTIFY_URL}
- GOTIFY_APP_TOKEN=${GOTIFY_APP_TOKEN}
- UNRESOLVED_TIMEOUT_TYPES=ServerCpu,ServerMem
- UNRESOLVED_TIMEOUT=20000
ports:
- "7000:7000"
Add the following to the Stack -> Config -> Environment section:
## Required
# Your Gotify instance URL
GOTIFY_URL = https://gotify.CHANGEME.com
# App Token created for Komodo
GOTIFY_APP_TOKEN = [[GOTIFY_APP_TOKEN]]
## Optional
# Set the Gotify Priority level based on Komodo alert severity
#GOTIFY_OK_PRIORITY=3
#GOTIFY_WARNING_PRIORITY=5
#GOTIFY_CRITICAL_PRIORITY=8
# Set whether to include Komodo Severity Level in notification title
#LEVEL_IN_TITLE=true
# Prefixes messages with a checkmark when the Alert is in the 'Resolved' state
#INDICATE_RESOLVED=true
# Filter if an alert is pushed based on its Resolved status
# * leave unset to push all alerts
# * otherwise, alerts will only be pushed if Alert is one of the comma-separated states set here
#ALLOW_RESOLVED_TYPE=resolved,unresolved
## Delay alerts with below types for X milliseconds
## and cancel pushing alert if it is resolved within that time
#UNRESOLVED_TIMEOUT_TYPES=ServerCpu,ServerMem
#UNRESOLVED_TIMEOUT=2000
Make sure to replace placeholder values. [[GOTIFY_APP_TOKEN]]
is a Komodo Variable.
After deploying the Stack create a new Alerter
- Endpoint:
Custom
- In the Endpoint field set the IP:PORT of the
komodo-gotify-alerter
stack you created IEhttp://192.168.YOUR.IP:7000
- In the Endpoint field set the IP:PORT of the
- Optionally, set any Alert Types you may need
Save the Alerter and then Test Alerter to make sure everything is ready to use.