feat(check): PostgreSQL, MySQL/MariaDB, SQL Server, MongoDB and Redis checks
Each connects to host:port with the configured credentials and TLS mode, signs in and runs a query (a ping for MongoDB and Redis), optionally comparing the first value. Connections go through the network guard, and errors never repeat the password. Tested against real servers. Refs #93 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
This commit is contained in:
1 parent
b01eefdbce
commit
a62ffb43de
5 files changed
+522
-2
No files matched your search
@@ -34,7 +34,7 @@ const (
|
||||
)
|
||||
|
||||
// Types lists every check type.
|
||||
var Types = []Type{HTTP, TCP, ICMP, DNS, TLS, JSON, Prometheus, Heartbeat, Alertmanager}
|
||||
var Types = []Type{HTTP, TCP, ICMP, DNS, TLS, JSON, Prometheus, Postgres, MySQL, MSSQL, MongoDB, Redis, Heartbeat, Alertmanager}
|
||||
|
||||
// Passive reports whether t is reported to us rather than run by checkers.
|
||||
func Passive(t Type) bool { return t == Heartbeat || t == Alertmanager }
|
||||
@@ -97,6 +97,11 @@ var impls = map[Type]impl{
|
||||
|
||||
JSON: jsonCheck{},
|
||||
Prometheus: prometheusCheck{},
|
||||
Postgres: dbCheck{Postgres},
|
||||
MySQL: dbCheck{MySQL},
|
||||
MSSQL: dbCheck{MSSQL},
|
||||
MongoDB: dbCheck{MongoDB},
|
||||
Redis: dbCheck{Redis},
|
||||
Heartbeat: heartbeatCheck{},
|
||||
Alertmanager: alertmanagerCheck{},
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user