Howdy, y'alls!
So I've started working on writing a SNMP extend for polling stats for use with LibreNMS.
The big thing I am is how would I get count of blocked blocked and/or newly blocked?
Any suggestions would be most appreciated.
Below I've are ones I am thinking of so far and I would love input on if any of these are off.
# count of queued items in the worker queue
select count(*) from workerqueue where done = 0;
# number of profiles
select count(*) from profile
# known users, local and remote
select count(*) from `account-user`
# new accounts seen in last 5 minutes, local and remote
select count(*) from `account-user-view` where created > date_sub(now(),interval 5 minute);
# accounts updated in last 5 minutes, local and remote
select count(*) from `account-user-view` where created > date_sub(now(),interval 5 minute);
# posts in last 5 minutes
select count(*) from `post` where created > date_sub(now(),interval 5 minute);
# edited in last 5 minutes
select count(*) from `post` where edited > date_sub(now(),interval 5 minute);
# posts received
select count(*) from `post` where received > date_sub(now(),interval 5 minute);
# events created in last 5 minutes
select count(*) from `event` where created > date_sub(now(),interval 5 minute);
# events edited in last 5 minutes
select count(*) from `event` where edited > date_sub(now(),interval 5 minute);
# parsed urls in last 5 minutes
select count(*) from `parsed_url` where created > date_sub(now(),interval 5 minute);
# total pending registerations
select count(*) from register
# new pending registrations in last 5 minutes
select count(*) from register where created > date_sub(now(),interval 5 minute);
!Friendica Developers