-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathconfig.example.yaml
More file actions
130 lines (121 loc) · 4.42 KB
/
Copy pathconfig.example.yaml
File metadata and controls
130 lines (121 loc) · 4.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# NutAlert Configuration Reference
# =================================
# This file documents all available configuration options.
# Copy sections you need to your config.yaml file.
#
# UPS devices are AUTO-DISCOVERED from your NUT server on first run.
# You don't need to manually add them - just configure nut_server below
# and start the application.
#
# NOTE: Existing users upgrading from v1 format will have their config
# automatically migrated. A backup is created before migration.
config_version: 2 # Do not modify - used for config migration
nut_server:
host: 192.168.1.100 # NUT server hostname or IP
port: 3493
check_interval: 15 # Polling interval in seconds
notifications:
enabled: true
cooldown: 60 # Minimum seconds between repeated alerts
urls: | # Apprise URLs, one per line - https://github.com/caronc/apprise
tgram://bot_token/chat_id
discord://webhook_id/webhook_token
gotify://hostname/token
# UPS Devices Configuration
# -------------------------
# After auto-discovery, each UPS appears here with default settings.
# Customize per-device thresholds as needed.
#
# To manually list available UPS names: upsc -l <nut_server_host>
ups_devices:
# Example: Primary server UPS
server-ups:
alert_mode: basic # "basic" = threshold checks, "formula" = custom logic
# Dashboard gauge visual thresholds (colors only, not alerts)
gauge_settings:
load:
warn_threshold: 80 # Yellow above this %
high_threshold: 100 # Red above this %
charge_remaining:
warn_threshold: 35 # Yellow below this %
high_threshold: 15 # Red below this %
runtime:
warn_threshold: 15 # Yellow below this (minutes)
high_threshold: 5 # Red below this (minutes)
voltage:
nominal: 120 # Expected voltage (use 230 for EU)
warn_deviation: 10 # % deviation for yellow
high_deviation: 15 # % deviation for red
# Threshold-based alerts (used when alert_mode: basic)
basic_alerts:
battery_charge:
enabled: true
min: 90
message: UPS battery charge below minimum threshold
runtime:
enabled: true
min: 15 # Minutes
message: UPS runtime below minimum threshold
load:
enabled: true
max: 50
message: UPS load exceeds maximum threshold
input_voltage:
enabled: false
min: 110.0
max: 130.0
message: UPS input voltage outside acceptable range
ups_status:
enabled: true
acceptable: [ol, online] # "ol" = on line (normal)
alert_when_status_changed: false
message: UPS status not in acceptable list
# Custom formula alert (used when alert_mode: formula)
# Available variables: ups_load, battery_charge, actual_runtime_minutes,
# battery_voltage, input_voltage, ups_status
formula_alert:
expression: (battery_charge < 90 or actual_runtime_minutes < 20) and ups_load > 20
message: 'UPS load: {ups_load}%, charge: {battery_charge}%, runtime: {actual_runtime_minutes:.1f} mins'
# Example: Network equipment UPS with relaxed thresholds
network-ups:
alert_mode: basic
gauge_settings:
load:
warn_threshold: 70
high_threshold: 90
charge_remaining:
warn_threshold: 30
high_threshold: 10
runtime:
warn_threshold: 10
high_threshold: 3
voltage:
nominal: 120
warn_deviation: 10
high_deviation: 15
basic_alerts:
battery_charge:
enabled: true
min: 50
message: Network UPS battery low
runtime:
enabled: true
min: 10
message: Network UPS runtime critical
load:
enabled: false
max: 80
message: Network UPS overloaded
input_voltage:
enabled: false
min: 110.0
max: 130.0
message: Network UPS voltage issue
ups_status:
enabled: true
acceptable: [ol, online, ob] # Include "ob" (on battery) as acceptable
alert_when_status_changed: true
message: Network UPS status changed
formula_alert:
expression: battery_charge < 30 and actual_runtime_minutes < 5
message: 'CRITICAL: Network UPS at {battery_charge}% with {actual_runtime_minutes:.0f} min remaining'