After i start building monitoring service for openlitespeed i come with an idea of improving monitoring statistic.
First .rtreport counters are reset after ols restart. It will be good to have options to manually reset static counters (eq: TOT_REQS ) via command line.
Also it will be good to make it in-memory to reduce disk io and maybe flush to disk every minute.
With this kind of functionality we can easy make monitoring service like:
minute 1 : TOT_REQS 200
minute 2: TOT_REQS 300
minute 3: TOT_REQS 800
average between minute 1 and minute 2 : 1.6 request per second
average between minute 2 and minute 3 : 8.3 request per second
We can just lost 1 minute of statistics (those not flushed to disk) in case of server/hardware/ols failure witch is rare.
I think bold keys should be persistent
VERSION: LiteSpeed Web Server/Open/1.4.11
UPTIME: 07:09:24
BPS_IN: 0, BPS_OUT: 0, SSL_BPS_IN: 0, SSL_BPS_OUT: 0
MAXCONN: 2000, MAXSSL_CONN: 1000, PLAINCONN: 0, AVAILCONN: 2000, IDLECONN: 0, SSLCONN: 0, AVAILSSL: 1000
REQ_RATE []: REQ_PROCESSING: 0, REQ_PER_SEC: 0, TOT_REQS: 5
REQ_RATE [_AdminVHost]: REQ_PROCESSING: 0, REQ_PER_SEC: 0, TOT_REQS: 0
REQ_RATE [serverapp]: REQ_PROCESSING: 0, REQ_PER_SEC: 0, TOT_REQS: 0
EXTAPP [LSAPI] [] [php54]: CMAXCONN: 1000, EMAXCONN: 1000, POOL_SIZE: 1, INUSE_CONN: 0, IDLE_CONN: 1, WAITQUE_DEPTH: 0, REQ_PER_SEC: 2, TOT_REQS: 81134
BLOCKED_IP:
EOF
I understand that we can read this file every second but that is more for real statistic eq: 1 sec, but for long view monitoring, we need min 30s or 1 minute resolution.
What do you think about this?