-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Closed
Labels
Description
This issue attempts to help debug configuration errors with the Linux syslog
table.
osquery reads syslog logs from rsyslogd
via a named pipe. This pipe, and rsyslogd
must be configured properly in order to query syslog.
Debugging Suggestions
- Ensure that you are using the
--enable_syslog
flag (as well as--disable_events=false
when using withosqueryi
). - Turn on verbose logging (
verbose
configuration flag).- Is osquery able to create/open the pipe file? If so, skip to step 4.
- If osquery cannot create/open the pipe:
- Does
/var/osquery/
(or the directory you used forsyslog_pipe_path
) exist? Is it read/writeable by the osquery process? - Does
/var/osquery/syslog_pipe
(or the path you used forsyslog_pipe_path
) exist? Is it readable by the osquery process?
- Does
- If osquery does not report an error opening the pipe, but no logs are in the
syslog
table:-
Check the permissions of the pipe file:
- If
rsyslogd
runs as usersyslog
(default Ubuntu setup):
$ ls -l /var/osquery/syslog_pipe pr--rw---- 1 root syslog 0 Apr 4 18:50 /var/osquery/syslog_pipe
- If
rsyslogd
runs as userroot
:
$ ls -l /var/osquery/syslog_pipe pr--rw---- 1 root root 0 Apr 4 18:50 /var/osquery/syslog_pipe
- If
-
Make sure that
rsyslogd
is able to write to the pipe.- Kill all osquery processes.
- In a separate shell:
cat /var/osquery/syslog_pipe
(or the path you used forsyslog_pipe_path
). - Try sending a log using the
logger
utility in your shell:logger "test log foo"
. Did the output show up in the shell runningcat
?
-
If the above steps fail:
- Check that
rsyslogd
is properly configured to write to the pipe. See the configuration docs. - Restart
rsyslogd
:sudo service rsyslog restart
. - Does
rsyslogd
report any errors in/var/log/syslog
?
- Check that
-
Other considerations
- Is SELinux turned on? Are SELinux policies preventing rsyslogd or osquery from accessing the pipe file?