[Feat]: rspamd monitoring with netdata
ekexcello opened this issue · 3 comments
ekexcello commented
Problem
No response
Description
there are several 3rd-party plugins for monitoring rspamd with netdata can be found on Web, mostly based on python.d.plugin, but there's no native monitoring module shipped by netdata for it.
Importance
nice to have
Value proposition
- Statistics: spam/ham/scanned/learned
- Actions taken: reject/soft-reject/add-header/rewrite-subject/greylist/no-action
Proposed implementation
Details can be taken from rspamd web interface, usually port 11334 of rspamd server
ilyam8 commented
Hi, @ekexcello.
Can you provide more info? I don't understand "Value proposition" - what do these paths (/a/b/c/d) mean? Metrics?And "Proposed implementation" - can you elaborate? What do you mean by "taken from rspamd web interface"? Is there an endpoint that exposes metrics? Can you provide a link to the documentation? And share a sample of metrics?
I see that rspamd has built-in Prometheus exporter. Do you use it?
ilyam8 commented
I see that it has /stat
endpoint
Sample statistics response from an idle instance (no workload)
{
"version": "3.4",
"config_id": "gkwm3ysiqrx96kj1mwnfashx9hkypj833w1tgjaw4nysgwwxqthh7q78hyrezi9gzamke3n9ea7u8cjrzru7i5p4z7r9xhcoitjpjyy",
"uptime": 717,
"read_only": false,
"scanned": 0,
"learned": 0,
"actions": {
"reject": 0,
"soft reject": 0,
"rewrite subject": 0,
"add header": 0,
"greylist": 0,
"no action": 0
},
"scan_times": [],
"spam_count": 0,
"ham_count": 0,
"connections": 0,
"control_connections": 109,
"pools_allocated": 176,
"pools_freed": 139,
"bytes_allocated": 28807300,
"chunks_allocated": 282,
"shared_chunks_allocated": 4,
"chunks_freed": 0,
"chunks_oversized": 2,
"fragmented": 0,
"total_learns": 0,
"statfiles": [],
"fuzzy_hashes": {
"rspamd.com": 446607461
}
}
ilyam8 commented
@ekexcello I added the following metrics (as rates):
"scanned": 0,
"learned": 0,
"actions": {
"reject": 0,
"soft reject": 0,
"rewrite subject": 0,
"add header": 0,
"greylist": 0,
"no action": 0
},
"spam_count": 0,
"ham_count": 0,
"connections": 0,
"control_connections": 109,