-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.example.yaml
More file actions
166 lines (131 loc) · 4.19 KB
/
Copy pathconfig.example.yaml
File metadata and controls
166 lines (131 loc) · 4.19 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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
# PulseCheck Configuration File
# This is an example configuration file with all available options.
# Copy this to config.yaml and customize for your environment.
# Database Configuration
database:
# Path to SQLite database file (relative or absolute)
path: "./pulsecheck.db"
# Maximum number of concurrent database connections
max_connections: 10
# Enable Write-Ahead Logging (WAL) mode for better concurrency
# Recommended: true for production environments
enable_wal: true
# Server Configuration (for pulsecheck-server)
server:
# Host to bind to (0.0.0.0 for all interfaces)
host: "0.0.0.0"
# Port to listen on
port: 8080
# HTTP server timeouts
read_timeout: "30s"
write_timeout: "30s"
idle_timeout: "120s"
# TLS/SSL Configuration
tls:
# Enable HTTPS
enabled: false
# Path to TLS certificate file
cert_file: "/path/to/cert.pem"
# Path to TLS private key file
key_file: "/path/to/key.pem"
# CORS Configuration
cors:
# Enable CORS support
enabled: false
# Allowed origins (["*"] allows all)
allowed_origins:
- "*"
# Allowed HTTP methods
allowed_methods:
- "GET"
- "POST"
- "PUT"
- "DELETE"
- "OPTIONS"
# Allowed headers
allowed_headers:
- "Accept"
- "Authorization"
- "Content-Type"
# Worker Pool Configuration
worker_pool:
# Number of concurrent workers for URL checking
# Recommended: 10-50 for most use cases
num_workers: 10
# Channel buffer size (2x num_workers is a good starting point)
channel_buffer_size: 20
# How often to poll for URLs that need checking
check_interval: "10s"
# Notification Configuration
notifications:
# Slack Notifications
slack:
# Enable Slack notifications
enabled: false
# Slack webhook URL (create at https://api.slack.com/messaging/webhooks)
# Can also be set via environment variable: PULSECHECK_NOTIFICATIONS_SLACK_WEBHOOK_URL
webhook_url: ""
# Discord Notifications
discord:
# Enable Discord notifications
enabled: false
# Discord webhook URL (create in channel settings)
# Can also be set via environment variable: PULSECHECK_NOTIFICATIONS_DISCORD_WEBHOOK_URL
webhook_url: ""
# Email Notifications
email:
# Enable email notifications
enabled: false
# SMTP server hostname
smtp_server: "smtp.gmail.com"
# SMTP server port (587 for TLS, 465 for SSL, 25 for plain)
port: 587
# SMTP authentication username
# Can also be set via environment variable: PULSECHECK_NOTIFICATIONS_EMAIL_USERNAME
username: ""
# SMTP authentication password
# Can also be set via environment variable: PULSECHECK_NOTIFICATIONS_EMAIL_PASSWORD
password: ""
# From address for notification emails
from: "pulsecheck@example.com"
# List of recipient email addresses
recipients:
- "ops-team@example.com"
- "oncall@example.com"
# Use TLS encryption (recommended)
use_tls: true
# Logging Configuration
logging:
# Log level: debug, info, warn, error
level: "info"
# Log format: json, text
# Recommendation: json for production, text for development
format: "text"
# Log output: stdout, stderr, or file path
output: "stdout"
# Feature Flags
features:
# Enable SSRF (Server-Side Request Forgery) protection
# Blocks requests to private IPs, localhost, and cloud metadata endpoints
# Recommended: true for production
enable_ssrf_protection: true
# Default timeout for URL checks (seconds)
# Individual URLs can override this value
request_timeout: 30
# Maximum response body size to read (bytes)
# Prevents memory exhaustion from large responses
# Default: 10MB (10485760 bytes)
max_response_body_size: 10485760
# Environment Variable Overrides
# Any configuration value can be overridden with environment variables.
# Format: PULSECHECK_<SECTION>_<KEY>
# Examples:
# PULSECHECK_DATABASE_PATH=/data/pulsecheck.db
# PULSECHECK_SERVER_PORT=9090
# PULSECHECK_WORKER_POOL_NUM_WORKERS=20
# PULSECHECK_NOTIFICATIONS_SLACK_WEBHOOK_URL=https://hooks.slack.com/...
# PULSECHECK_LOGGING_LEVEL=debug
#
# Nested values use underscores:
# PULSECHECK_SERVER_TLS_ENABLED=true
# PULSECHECK_NOTIFICATIONS_EMAIL_PASSWORD=secret