Skip to content

Containers

Here you can define containers and assign keywords, regex patterns and optional settings to each one. The container names must match the exact container names you would get with docker ps.

Configure Keywords and Regular Expressions

yaml
containers:
  container1:
    keywords:
      - error               # simple keyword
      - regex: 'download.*failed'    # this is how to set regex patterns
      - keyword: critical   # another way to set a simple keyword

Attach Logfiles

With the attach_logfile option you can attach a logfile to the notification.

yaml
containers:
  container2:
    - keyword: error
      attach_logfile: true  # Attach a log file to the notification
      attachment_lines: 100  # Attach the last 100 lines of the log file to the notification (default is 20)

Exclude Keywords

You can also exclude certain keywords from triggering notifications. This can be done globally (in settings), per container or per keyword/regex.

yaml
containers:
  container3:
    # Exclude keywords for a whole container
    excluded_keywords:
      - timeout  # This keyword will be ignored for this container
      - regex: \btimeout\b.*  # This regex will be ignored for this container
    keywords:
      - keyword: error
        # Exclude keywords for a specific keyword or regex pattern
        excluded_keywords:
          - timeout  # Log lines with 'error' will be ignored when 'timeout' is also found

Keyword Groups

Keyword groups consist of a list of keywords that are treated as a group. A notification will be triggered when all of the keywords in the group are found in a log entry.

yaml
containers:
  container4:
    keywords:
      - keyword_group:
        - error
        - critical
        - timeout
        attach_logfile: true
        notification_title: '{container}: That's a lot of errors!'

Settings per container and keyword

Most of the settings from the settings and the notifications sections can be set per container or per keyword/regex.
A summary of all the settings and where you can set them can be found here.

INFO

When multiple keywords with the same setting (e.g., notification_title) are found in a log line, the one listed first in the YAML takes precedence.

yaml
containers:
  container5:
    apprise_url: "discord://webhook-url"  
    ntfy_tags: closed_lock_with_key   
    ntfy_priority: 3
    ntfy_topic: container3
    attachment_lines: 50
    notification_title: '{keywords} found in {container}'
    notification_cooldown: 2  
    attach_logfile: true
    action_cooldown: 60 
  
    keywords:
      - critical

      - regex: 'download.*failed' 
        ntfy_tags: partying_face   
        ntfy_priority: 5
        ntfy_topic: error
        attachment_lines: 10
        hide_regex_in_title: true

      - keyword: timeout
        apprise_url: "discord://webhook-url" 
        notification_title: '{container} restarted because these keywords were found: {keywords}'
        notification_cooldown: 10
        attach_logfile: true

Keep it simple

If global_keywords are configured and you don't need additional keywords or settings for a container you can leave it blank:

yaml
containers:
  container6:
  container7:

INFO

The only keyword settings missing here are the templates which are explained here and the actions which are explained here.