select source,
count(source) as log_count
from logs
group by source
order by log_count desc;
select count(*) from logs;
select
json_extract(logs.msg, '$.MESSAGE') as message,
timestamp,
source,
json_extract(logs.msg, '$.SYSLOG_TIMESTAMP') as ts,
json_extract(logs.msg, '$.SYSLOG_IDENTIFIER') as syslog_id
from logs
where json_valid(msg)
and syslog_id='sshd'
and message like '%Accepted publickey%'
order by timestamp desc;
select id,
timestamp,
source,
json_extract(logs.msg, '$.MESSAGE') as a_msg,
json_extract(logs.msg, '$._CMDLINE') as a_cmdline
from logs
where json_valid(msg)
and a_cmdline like '%sudo apt upgrade%'
order by timestamp desc
limit 100;
💌 Get notified on new features and updates