将osqueryi
交互式 shell 用于osquery时,我遇到了一个问题,即即使应该禁用日志记录,也会显示警告。这是一个错误吗?
文档解释如下:
--logger_min_status
状态日志记录的最低级别。使用以下值:INFO = 0、WARNING = 1、ERROR = 2。要禁用所有状态消息,请使用 3+。
--logger_min_sterr
写入 stderr 的状态日志的最低级别。使用以下值:INFO = 0、WARNING = 1、ERROR = 2。要禁用所有状态消息,请使用 3+。
我所拥有的:(为简洁起见,结果被截断)
# osqueryi --json --logger_min_status=3 --logger_min_stderr=3 'select * from block_devices'
WARNING: Failed to connect to lvmetad. Falling back to device scanning.
[{"block_size":"512","label":"","model":"VBOX HARDDISK","name":"/dev/sda","parent":"","size":"83886080","type":"","uuid":"","vendor":"ATA"},...]
我的期望:
# osqueryi --json --logger_min_status=3 --logger_min_stderr=3 'select * from block_devices'
[{"block_size":"512","label":"","model":"VBOX HARDDISK","name":"/dev/sda","parent":"","size":"83886080","type":"","uuid":"","vendor":"ATA"},...]