Chris Beck
def80bfe64
rearrange code in route.rs for readability
2025-12-05 22:46:15 -07:00
Chris Beck
107bd2a2de
improve prefix used with log alerts (summary is only the offending log message)
2025-12-05 22:24:17 -07:00
Chris Beck
04ad4035f9
alternative summary specification
2025-12-05 22:16:31 -07:00
Chris Beck
7a163f3962
rename verified signal message to admin message, reformat
2025-12-05 22:07:22 -07:00
Chris Beck
010a5a9336
rename AdminMessage to SignalAlert message which is less confusing
2025-12-05 22:05:58 -07:00
Chris Beck
f3b66541ed
simplify log_format code
2025-12-05 21:56:47 -07:00
Chris Beck
3b5e191d75
avoid allocations when formatting log messages, factor out humantime crate
2025-12-05 21:43:26 -07:00
Chris Beck
aaeb5b3b28
pre-allocate strings when formatting logs
2025-12-05 20:51:04 -07:00
Chris Beck
f969c20e71
move log-message formatting code to its own module
2025-12-05 20:42:22 -07:00
Chris Beck
166aaaf167
respect destination override for outbound messages
2025-12-05 20:35:16 -07:00
Chris Beck
74baa63f50
simplify code that locks log buffer for reading
2025-12-05 20:27:55 -07:00
Chris Beck
3c88ba80a5
rename read_all -> with_read_lock
2025-12-05 20:07:43 -07:00
Chris Beck
2085064d89
rename module jsonrpc to signal_jsonrpc
2025-12-05 19:46:22 -07:00
Chris Beck
1b0a2717e8
move circular_buffer module to root level
2025-12-05 19:43:46 -07:00
Chris Beck
35b274bbd3
clippy
2025-12-05 19:42:30 -07:00
Chris Beck
f899d391b9
introduce log_buffer type to cleanup concurrency & correctness
...
also cargo fmt
2025-12-05 19:40:33 -07:00
Chris Beck
a214b8e474
introduce and use new route framework
...
in this change:
* new "concurrent map" API using RwLock<HashMap> optimized for
frequent reads.
* we no longer have a concurrent map of log handlers, we instead
have a log handler containing a concurrent map from origins to
circular buffers
* we have a general concept of a "Limit" now which replaces AlertRule
* A route consists of a filter, plus any number of limits, which
can be per-origin limits or global limits
* The set of routes is disjunctive, while the filters and limits are conjunctive
* Limits can also apply per source location
* Different types of rate limiters are unified under the "Limiter"
abstraction
* The log handler also has a set of overall limiters that can be applied
at the end
* This means we can relatively easily express disjunctions of conjunctions
I think the route structure will also be relatively easy to express in toml
2025-12-05 19:10:37 -07:00
Chris Beck
ffa1246e51
listen on udp and tcp for json logs as well
2025-12-05 15:12:20 -07:00
Chris Beck
a42aad48f4
also allow json logs to be sent over a TCP stream, with multiple messages using json_lines ofrmat for framing
2025-12-05 14:49:21 -07:00
Chris Beck
0a5023ce6b
fixup to syslog parsing around EOF handling, add tests
2025-12-05 14:31:02 -07:00
Chris Beck
e5a18b0630
fix to eof handling on non-transparent message
2025-12-05 14:13:49 -07:00
Chris Beck
914a9910c2
support syslog over TCP as well
2025-12-05 12:45:41 -07:00
Chris Beck
5b98e74f92
add deny missing docs
2025-12-05 11:51:15 -07:00
Chris Beck
b3a0894221
add sender id to VerifiedSignalMessage
2025-12-05 11:38:42 -07:00
Chris Beck
a7cd3bdcde
move Logfilter to the Logmessage module, change MessageHandler to a proper trait
2025-12-05 11:20:58 -07:00
Chris Beck
82ed77a098
add support for udp over json logging
2025-12-05 10:18:39 -07:00
Chris Beck
8bd2e6ab68
add admin_http post forwarding
2025-12-05 09:59:04 -07:00
Chris Beck
2376bfed13
change identifier in the help messages
2025-12-05 09:41:33 -07:00
Chris Beck
1a070011e3
clippy
2025-12-05 09:37:40 -07:00
Chris Beck
8640fc7a15
add support for trusting safety numbers of admin, revoking trust
2025-12-05 05:18:51 -07:00
Chris Beck
1ff2586a27
group-aware messaging
...
* reply in group if admin command from group
* allow alerts to be sent to a group instead of individual admins
2025-12-05 04:19:51 -07:00
Chris Beck
665caf1138
bring back support for unix domain sockets
2025-12-05 04:11:34 -07:00
Chris Beck
79dd9de3d4
simplify message handler types
2025-12-05 03:54:06 -07:00
Chris Beck
e29435907c
remove unnecessary feature
2025-12-05 03:47:38 -07:00
Chris Beck
ef1b5ed4ca
move all "admin_netcat" stuff to a new admin_netcat module in the gateway-bin, not in the gateway lib
2025-12-05 03:45:50 -07:00
Chris Beck
eee48100c1
move syslog stuff to a submoudle of signal-gateway-bin and make it optional
2025-12-05 03:13:42 -07:00
Chris Beck
ee436b69db
break syslog-rfc5424 dependency in signal-gateway, now it's only in the bin
2025-12-05 02:59:01 -07:00
Chris Beck
57a561331e
remove dead code, cargo fmt
2025-12-05 01:45:47 -07:00
Chris Beck
f97c6331ba
cargo fmt
2025-12-05 01:45:10 -07:00
Chris Beck
da502583ad
tweaks to http handling in gateway
2025-12-05 01:40:29 -07:00
Chris Beck
2b88257682
rename to alertmanager module for alertmanager schema
2025-12-05 01:12:11 -07:00
Chris Beck
69c7c604c3
minor refactor, code duplication
2025-12-05 01:09:47 -07:00
Chris Beck
3d748572d4
move signal-gateway binary to its own crate, simplify deps
2025-12-05 01:01:39 -07:00
Chris Beck
ae26faa045
separate signal-gateway binary from the library, and its deps
2025-12-05 00:46:09 -07:00
Chris Beck
028af2b7fb
make rustls and optional feature in both places, organize deps
2025-12-04 23:59:57 -07:00
Chris Beck
d4bf12e4ec
remove rustls dependency
2025-12-04 23:53:10 -07:00
Chris Beck
7028f6ce9d
fix bug around env-filter
2025-12-04 23:45:30 -07:00
Chris Beck
5c6bbd6f96
rename "plotter" as "prometheus", make plot feature optional in signal-gateway
2025-12-04 23:35:04 -07:00
Chris Beck
7b7b6bcac7
better API and configurability for plots, use in signal-gateway
...
this adds chrono_tz as a dependency for the timezone interpretation
2025-12-04 21:37:43 -07:00
Chris Beck
7cb0da2337
add configurable line width
2025-12-04 18:44:21 -07:00