OSQuery で process_eventsをゲットしようとしてみたところ、どうもうまくいってない。
具体的には、audit.logにはどんどんログたまってるのに
select * from process_events;
しても1件も取れず。
osqueryd 動かしていても result.logが全く記録されない感じ。
環境
Process
[vagrant@localhost ~]$ ps aux | grep osquer[y] root 18816 0.0 1.7 217572 8516 ? SNsl 01:41 0:00 /usr/bin/osqueryd --flagfile /etc/osquery/osquery.flags --config_path /etc/osquery/osquery.conf root 18819 0.0 1.8 357320 9432 ? SNl 01:41 0:00 osqueryd: worker
config
[vagrant@localhost ~]$ cat /etc/osquery/osquery.conf { "schedule": { "process_events": { "query": "select * from process_events;", "interval": 60 }, "user_events": { "query": "select * from user_events;", "interval": 60 } } }
flag
[vagrant@localhost ~]$ cat /etc/osquery/osquery.flags --disable_events=false --disable_audit=false --audit_allow_config=true --audit_persist=true
INFO
[vagrant@localhost ~]$ cat /var/log/osquery/osqueryd.INFO Log file created at: 2017/08/07 01:41:22 Running on machine: localhost.localdomain Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg I0807 01:41:22.665422 18819 events.cpp:824] Event publisher failed setup: kernel: Cannot access /dev/osquery I0807 01:41:22.665441 18819 events.cpp:824] Event publisher failed setup: syslog: Publisher disabled via configuration
追記
よくわからないけれど、再起動で拾えるようになった。