Last active
April 13, 2019 15:38
-
-
Save moisseev/330c705e065cd7fd59d9 to your computer and use it in GitHub Desktop.
Simple rrdcgi template for Rspamd throughput RRD (rspamd.rrd)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--Rspamd filter stats graph--> | |
<RRD::GRAPH | |
<RRD::GETVAR TITLE_PREFIX>_<RRD::GETVAR TITLE_SUFFIX>.png | |
--font DEFAULT:0:Vera | |
--font-render-mode mono | |
--start <RRD::GETVAR START> --end now | |
--title="Rspamd throughput by <RRD::GETVAR TITLE_SUFFIX>, msg/min" | |
--height=120 | |
--width=720 | |
DEF:spam=<RRD::GETVAR RRD_PREFIX><RRD::GETVAR RRD>:reject:AVERAGE | |
DEF:soft=<RRD::GETVAR RRD_PREFIX><RRD::GETVAR RRD>:soft:AVERAGE | |
DEF:rewr=<RRD::GETVAR RRD_PREFIX><RRD::GETVAR RRD>:rewrite:AVERAGE | |
DEF:add_=<RRD::GETVAR RRD_PREFIX><RRD::GETVAR RRD>:add:AVERAGE | |
DEF:grey=<RRD::GETVAR RRD_PREFIX><RRD::GETVAR RRD>:greylist:AVERAGE | |
DEF:no__=<RRD::GETVAR RRD_PREFIX><RRD::GETVAR RRD>:no:AVERAGE | |
CDEF:per_min_spam=spam,60,* | |
CDEF:per_min_soft=spam,60,* | |
CDEF:per_min_rewr=spam,60,* | |
CDEF:per_min_add_=add_,60,* | |
CDEF:per_min_grey=grey,60,* | |
CDEF:per_min_no__=no__,60,* | |
CDEF:unknownh=no__,UN,1,0,IF | |
TICK:unknownh#FFCCCC:1 | |
AREA:per_min_spam#FF0000:"Rejected" | |
STACK:per_min_soft#BF8040:"Temporarily rejected" | |
STACK:per_min_rewr#FF6600:"Subject rewritten" | |
STACK:per_min_add_#FFAD00:"Probable spam" | |
STACK:per_min_grey#436EEE:"Greylisted" | |
STACK:per_min_no__#66CC00:"Clean" | |
> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/rrdcgi | |
<HTML> | |
<HEAD><TITLE></TITLE> | |
<META HTTP-EQUIV="Refresh" Content="300"> | |
</HEAD> | |
<BODY bgcolor=#dcdcdc> | |
<H3>Rspamd throughput</H3> | |
<div style=width:1460px> | |
<RRD::SETVAR RRD_PREFIX /tmp/> | |
<RRD::SETVAR FILTER-STAT-GRAPH ./filter-stats-graph.in> | |
<p> | |
<RRD::SETVAR TITLE_PREFIX Rspamd> | |
<RRD::SETVAR RRD rspamd.rrd> | |
<RRD::SETVAR TITLE_SUFFIX day> | |
<RRD::SETVAR START -1d> | |
<RRD::INCLUDE <RRD::GETVAR FILTER-STAT-GRAPH>> | |
<br> | |
<RRD::SETVAR TITLE_SUFFIX week> | |
<RRD::SETVAR START -1w> | |
<RRD::INCLUDE <RRD::GETVAR FILTER-STAT-GRAPH>> | |
<br> | |
<RRD::SETVAR TITLE_SUFFIX month> | |
<RRD::SETVAR START -30d> | |
<RRD::INCLUDE <RRD::GETVAR FILTER-STAT-GRAPH>> | |
<br> | |
<RRD::SETVAR TITLE_SUFFIX year> | |
<RRD::SETVAR START -365d> | |
<RRD::INCLUDE <RRD::GETVAR FILTER-STAT-GRAPH>> | |
</p> | |
</div> | |
</BODY> | |
</HTML> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment