osquery 操作系统监控工具
时间:2014-11-02 02:36 来源:linux.it.net.cn 作者:IT网
osquery —— 来自Facebook的操作系统监控工具
osquery 是 SQL 驱动的分析和监控操作系统的工具,是操作系统分析框架,支持 OS X 和 Linux 系统。osquery 能帮助监控和分析低水平的操作系统,提供更直观的性能监控。
osquery 在操作系统中就像是一个高性能的关系数据库,允许你编写基于 SQL 的查询语句来洞察操作系统的数据。使用 osquery,SQL 表代表如下抽象概念:
-
运行时的进程
-
加载内核模块
-
开放网络连接
SQL 表通过一个简单的可扩展 API 实现,各种表已经存在并且还在不断增加。
为了更好的理解 osquery,看看下面的 SQL 查询:
1
2
3
4
5
6
7
8
9
10
11
12
--------------------------------------------------------
-- get the name, pid and attached port of all processes
-- which are listening on all interfaces
--------------------------------------------------------
SELECT DISTINCT
process.name,
listening.port,
process.pid
FROM processes AS process
JOIN listening_ports AS listening
ON process.pid = listening.pid
WHERE listening.address = '0.0.0.0';
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--------------------------------------------------------
-- find every launchdaemon on an OS X host which
-- * launches an executable when the operating
-- system starts
-- * keeps the executable running
-- return the name of the launchdaemon and the full
-- path (with arguments) of the executable to be ran.
--------------------------------------------------------
SELECT
name,
program || program_arguments AS executable
FROM launchd
WHERE
(run_at_load = 'true' AND keep_alive = 'true')
AND
(program != '' OR program_arguments != '');
这些查询可以:
-
在特定条件下探索操作系统状态
-
通过执行调度程序来监控操作系统的主机状态
-
启动使用osquery api的自定义应用程序
SQL powered operating system instrumentation and monitoring. — More...
Issues
#318
TravisCI builds are failing inconsistently (network, boost compile, etc)
by theopolis 2014-11-01
#317
Node.js Driver
by carloscarcamo 2014-11-01
#316
Mounts table for linux
by polachok 2014-11-01
#315
RFC: osquery API (table names and column names) change tracking
by theopolis 2014-11-01
#313
Support gflags/google namespace changes
by theopolis 2014-11-01
(责任编辑:IT)
osquery —— 来自Facebook的操作系统监控工具 osquery 在操作系统中就像是一个高性能的关系数据库,允许你编写基于 SQL 的查询语句来洞察操作系统的数据。使用 osquery,SQL 表代表如下抽象概念:
SQL 表通过一个简单的可扩展 API 实现,各种表已经存在并且还在不断增加。 为了更好的理解 osquery,看看下面的 SQL 查询:
这些查询可以:
SQL powered operating system instrumentation and monitoring. — More...
(责任编辑:IT) |