Commit Graph

134 Commits

Author SHA1 Message Date
Giorgi Guliashvili
386ccb5e96
disable malfunctioning new features on the fly using killswitch (#4671) 2018-07-18 22:11:19 +01:00
Alexander
1945db71b5
Numeric monitoring system concept (#4626)
Just an interface and simple implementation dumping points to file on disk.
And I add also few monitoring records to some places of osquery code as an example.

Brief
Just an interface and simple implementation dumping points to file on disk.
And I add also few monitoring records to some places of osquery code as an example.

Motivation
osquery can monitor system health. But at some point we need to monitor the condition of osquery itself. Vast majority of interesting parameters can be represented by
numbers. How many queries it runs, how long does each query takes, what is the performance hit of each query, how long was last downtime and so on and so far. For obviou
s reason it hard to measure most of this parameters by external instrument. And it is almost impossible to evaluate it on production. But we can do it from inside of osquery.

What this PR is for
The systems like graphite or RRDtool can store and plot time-series data for us. We just have to
be able to feed data to it. We can create different plugins to be able to send data to different instruments. And we need some proper internal interface to all potential plugins. This PR is attempt to create generic interface.

Interface description
The most systems accept data as sequences of 2-dimensional points. One of the dimensions is value, the other is time. Each particular sequence has unique key, to be distinguished from the others.
Data descriptions for carbon. I have used this three parameters as an attributes of one monitoring point.

To send one point from some particular place in the code you just need to call the function record from namespace monitoring declared in the file include/osquery/num eric_monitoring.h with 3 arguments (path, value, time). Where path is the unique key of sequence; value is some interesting value to watch; time is the time of the point (can be omitted, current system time is the default vaule).
2018-07-09 13:19:50 +01:00
Nick Anderson
e50a38490b
bug: wait for service thread to finish before exiting with SCM (#4386) 2018-05-11 14:30:16 -07:00
Filipe Manco
d706f6b52d Fix init when using fbthrift (and folly) (#4343) 2018-05-01 13:27:55 -04:00
Nick Anderson
305108155a
bug: handle windows service shutdowns gracefully (#4286) 2018-04-18 07:51:04 -07:00
Nick Anderson
9e2515a661
database: convert cached ptree entires to RapidJSON results (#4207) 2018-03-21 09:39:50 -07:00
Teddy Reed
6f20eced93
thrift: Optionally build and link with fbthrift (#4105) 2018-02-10 23:37:15 -08:00
Teddy Reed
00040c6c1a
feature: URI parsing from folly (#4035) 2018-01-06 20:26:36 -08:00
Teddy Reed
5efb0bd09a
Set minimum NOFILE limit to 1024 (#4020) 2017-12-27 14:12:51 -08:00
Teddy Reed
f6d077cbf7
license: Change license to Apache 2.0 and GPLv2 (#4007) 2017-12-18 16:04:06 -08:00
Teddy Reed
222f40f2d3
hash: Use the hash-cache by default and document flags (#4006) 2017-12-18 12:20:57 -08:00
Teddy Reed
f7be9fae71
ux: The ephemeral flag should disable the database (#4002) 2017-12-17 11:02:39 -08:00
Teddy Reed
70a214b8a6
logger: Remove invalid assumptions about status logging (#4001) 2017-12-17 09:44:15 -08:00
Teddy Reed
3ad5267642
[Fix #3941] Stop renaming worker and extension argv[0] (#3943) 2017-11-20 07:24:55 -08:00
Teddy Reed
a7c2669ba3
tidy: Improve clang-tidy (modernize) list of checks and run across codebase (#3870) 2017-10-29 22:25:49 -07:00
Nick Anderson
4ac3f42656 [Fix #3619] Better shutdown logic for Windows service controller (#3698) 2017-09-18 14:15:09 -07:00
Nick Anderson
2a317ce17f worker: shutdown safely on Windows only if not worker (#3628) 2017-08-30 08:45:56 -07:00
Teddy Reed
f29de27649 Combine osqueryi and osqueryd into single binary (#2742) 2017-08-27 11:09:25 -07:00
Teddy Reed
295acfcf3d worker: Do not ignore SIGCHLD to exit faster (#3487) 2017-07-24 08:48:06 -07:00
Teddy Reed
30a9f23cb0 tsan: Fix watcher and posix utils tsan findings (#3489) 2017-07-24 07:19:31 -07:00
Nick Anderson
dfbcd50737 windows: Adding osqueryi and osqueryd integration tests (#3479) 2017-07-21 11:20:56 -07:00
Teddy Reed
89ee28dcc4 watchdog: Fix disabled database and logging when watchdog is not used (#3448) 2017-06-28 23:24:18 -07:00
Nick Anderson
cffa9cb7a3 Changing init verbosity to honor verbose flag (#3406) 2017-06-14 21:08:33 -07:00
Teddy Reed
f8f5718297 watcher: Do not initialize the config in watcher (#3403) 2017-06-13 17:26:34 -07:00
Teddy Reed
70f30b99d8 watcher: Rename instance to get for consistency (#3359) 2017-05-29 17:16:19 -07:00
Teddy Reed
b38a62be8b config: Rename getInstance to get for consistency (#3350) 2017-05-28 23:04:53 -07:00
Teddy Reed
b427310241 deps: Rebuild the world, static and hidden (#3299) 2017-05-21 10:59:19 -07:00
Grigoriy Chudnov
e3a2445480 Add database init retry (#3179) 2017-04-21 15:32:40 -07:00
Teddy Reed
f95b14ac95 worker: Prefer null character over spaces when clearing argv (#2968) 2017-02-06 00:51:05 -08:00
Teddy Reed
487f7ee59b extensions: Select ephemeral path for shell socket (#2945) 2017-01-27 15:56:40 -08:00
Teddy Reed
cdb0bef64c Emit only ERROR logs to osqueryd stderr (#2928) 2017-01-19 23:22:41 -08:00
Teddy Reed
b2a90cd6e4 Do not control stderr teeing automatically (#2919) 2017-01-17 17:18:03 -08:00
Teddy Reed
1d758b1d9a Allow watchdog watcher to wait for child exits (#2908) 2017-01-12 18:09:46 -08:00
Teddy Reed
0e9733f94c Simplify Registry and plugin concepts (#2887) 2017-01-07 12:21:35 -08:00
Teddy Reed
b04736631a Add --extensions_require feature (#2672) 2016-10-24 18:13:44 -07:00
Teddy Reed
5bb5ae1030 Add optional default flagfile /etc/osquery/osquery.flags.default (#2673) 2016-10-22 16:56:32 -07:00
Teddy Reed
93b260025a Allow distributed plugin changes and reduce ifdefs (#2670) 2016-10-22 00:27:04 -07:00
Nick Anderson
b69981584f Fixing COM memory leak (#2583) 2016-10-02 12:15:17 -07:00
Teddy Reed
4d1451c9b4 Add extensions SDK incompatibility checking (#2527) 2016-09-26 17:32:41 -07:00
yying
a7af70d021 Adding remote config/logging capabilities to Windows build (#2469) 2016-09-20 14:18:58 -07:00
yying
84e6a3401a Reducing compiler warnings and fails on warn in VS (#2433) 2016-09-02 15:04:03 -07:00
yying
d347c847e1 Support for extensions (#2363) 2016-08-31 16:45:06 -07:00
Teddy Reed
d6e20279d8 Use LOG(INFO) and set INFO as default logging mode (#2420)
This is fairly important, it changes the default mode for what status
events are logged to INFO. It had been set to WARNING and INFO was relatively
unused.

This also removes expected support for RocksDB 'in-memory' databases.
If a shell-user requests a database via CLI flags it will now work.
2016-08-31 15:09:01 -07:00
Teddy Reed
1b75972181 [Fix #2387] Attempt to create user's osquery homedir (#2395) 2016-08-17 17:27:46 -07:00
Teddy Reed
f3f605e26a Introduce a PLATFORM_MASK and isPlatform (#2334)
Along with the platform defines and platform string defines provided by
CMake to the build, add a PLATFORM_MASK define.

Use this define as a platform-type mask with the PlatformType enum.
2016-08-09 20:27:42 -07:00
yying
50487c6880 Changes to make pidfile work on Windows (#2297) 2016-07-28 16:04:34 -07:00
yying
2fb3797c53 Changes to support building a osquery Windows service. (#2278) 2016-07-22 13:29:37 -07:00
Teddy Reed
c22f6147ea Move OSQUERY_HOME into core and use as filesystem config default (#2275) 2016-07-21 13:28:23 -07:00
Zachary Wasserman
f1f00cec2b Enable DB in osqueryi when --database_path specified (#2268)
Prior to this change, both --disable_database=false and --database_path had to
be specified together. Now, if the user specifies --database_path the database
is enabled automatically.
2016-07-20 17:44:50 -07:00
artemdinaburg
78e1cf7ab4 Transition __attribute__((constructor)) to a more platform independent approach (#2233) 2016-07-14 14:19:33 -07:00