#!/bin/bash # Example ntfy-bridge plugin — disk space checker # # A plugin receives nothing on stdin (when polled) and outputs a JSON # Event object on stdout. Exit 0 = send, exit 1 = skip/drop. # # Fields: source, name, topic, priority (1-5), message, tags[], click_url, actions[] THRESHOLD=90 USAGE=$(df -h / | tail -1 | awk '{print $5}' | sed 's/%//') if [ "$USAGE" -lt "$THRESHOLD" ]; then # No alert needed — exit non-zero to skip exit 1 fi # Output a JSON Event to stdout cat <