Commit Graph

94 Commits

Author SHA1 Message Date
yying
31b78cb996 Adding hostIdentifier, calendarTime, unixTime to status logging (#3146) 2017-04-10 11:56:23 -07:00
yying
20f8e6cd5a Adding Status Logging to AWS Kinesis/Firehose Logger Plugins (#3115) 2017-04-04 09:54:56 -07:00
Teddy Reed
c24603d8c9 logger: Add logger_min_status and disable stderr with stdout (#3131) 2017-04-04 08:12:26 -07:00
Teddy Reed
86e6bd1a73 Add additional regions to AWS Kinesis (#3013) 2017-02-21 20:52:10 -08:00
Teddy Reed
b2a90cd6e4 Do not control stderr teeing automatically (#2919) 2017-01-17 17:18:03 -08:00
Teddy Reed
0e9733f94c Simplify Registry and plugin concepts (#2887) 2017-01-07 12:21:35 -08:00
Zachary Wasserman
b855366c3b Generate random Kinesis partition keys per-record (#2872) 2016-12-16 16:34:02 -08:00
Ryan Holeman
31e395a078 Removed stream name checking for aws kinesis and firehose setup (#2867) 2016-12-15 10:56:27 -08:00
Marc LeBourdais
790aa06b51 Add a flag for prepending @cee: to json-logged messages to syslog (#2854) 2016-12-08 17:35:20 -08:00
Ryan Holeman
0b62245848 Fix for sending only failed data to kinesis on full or partial failed uploads (#2703) 2016-11-07 09:57:47 -08:00
Teddy Reed
a3acf2a3e5 Fix Config TLS plugin default verb (#2708) 2016-11-02 17:08:44 -07:00
Jonathan Lee
f529fc3a30 [Fix #2652] Shorten long lines (#2664) 2016-10-21 22:08:59 -07:00
Ryan Holeman
d76310da2c Random partition keys assigned per batch in kinesis plugin (#2662) 2016-10-21 19:43:31 -07:00
Teddy Reed
b00118a293 Fix regression in Requests/TLS APIs related to verb detection (#2660) 2016-10-21 12:58:40 -07:00
Zachary Wasserman
42fb80f40b Fix TLS logger plugin handling of re-enrollment scenarios (#2627) 2016-10-14 16:31:51 -07:00
Ryan Holeman
d1240f05e5 Fix for AWS ami role auth with cpp-netlib custom redirect condition (#2596) 2016-10-09 12:11:56 -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
Teddy Reed
a2540a2614 Update to AWS-SDK-CPP version 0.14.x (#2371) 2016-08-15 21:30:39 -07:00
Teddy Reed
f93253ec48 Nitpicks and style formatting 2016-08-15 16:07:51 -07:00
Ryan Holeman
a217035d12 Add AWS STS assume role authentication capability 2016-08-15 16:07:51 -07:00
Teddy Reed
58fd284f05 Improve dispatcher tests (#2358)
This improves dispatcher tests by allowing units to act like component
tests and use embedded std::thread-based osquery APIs. A unit may force
a 'service' to run by joining the Dispatcher before deconstructing.
2016-08-14 15:41:53 -07:00
Zachary Wasserman
8aa9d63c42 Properly intialize BufferedLogForwarder for TLS output plugin (#2328)
Missing initialization of the BufferedLogForwarder was causing an underflow in
the count of buffered logs, and error messages as described in #2324. This
commit brings the initialization of the forwarder for TLS in line with
aws_kinesis and aws_firehose, removing that error.
2016-08-08 15:20:25 -07:00
Zachary Wasserman
1074aad471 Use TLSTransport HTTP client in aws_util (#2299) 2016-07-28 23:09:28 -04:00
Zachary Wasserman
129ec81853 Add release valve for purging buffered logs in BufferedLogForwarder (#2244) 2016-07-27 15:26:45 -07:00
yying
2fb3797c53 Changes to support building a osquery Windows service. (#2278) 2016-07-22 13:29:37 -07:00
Teddy Reed
7f304a0934 Various fixups and best practices (#2237) 2016-07-11 09:45:57 -07:00
Teddy Reed
48cb4d555d Add systemLog API (#2229)
This includes a minor SDK refactor as it move quite a few specialized
functions and facilities from core.h into system.h. There was a breaking point
for needing to frequently update core includes.

The new logger systemLog function allows a call site to bypass logging config
and write a line to the OS logger (aka syslog).
2016-07-07 15:16:28 -07:00
Zachary Wasserman
8909602a40 Increase block period in flaky BufferedForwarder test (#2222)
This test was intermittently failing because it relies on the actual thread
scheduling. Our discussion in issue #2218 decided that it was worth keeping the
test around, while trying to mitigate the flakiness. The longer sleeps in this
test ran successfully hundreds of times in local testing.
2016-07-06 14:59:24 -07:00
artemdinaburg
e6fbde820e Windows Daemon/Shell: Make osquery code more Windows-friendly (#2188) 2016-07-01 14:56:07 -07:00
Ryan Holeman
b47f246ab4 Optional randomization of shard ids for AWS Kinesis load balancing (#2157) 2016-06-15 15:29:59 -07:00
Zachary Wasserman
79818c72ab Add newlines in firehose records (#2166) 2016-06-14 16:50:28 -07:00
Nick Anderson
cf30388705 Moved test_utils to it's own directory out of core. Updated references (#2154) 2016-06-09 10:49:26 -07:00
Ryan Holeman
deb9c56633 Changed stream validation from list streams to describe streams (#2141) 2016-06-07 17:17:15 -07:00
Zachary Wasserman
462cd8bdbf Update AWS logger code for AWS SDK 0.12.4 (#2140)
The AWS SDK changed how custom HTTP clients are used, and this commit brings
compatibility with the new initialization style.
2016-06-07 15:06:49 -07:00
Teddy Reed
ce2ba6d9c8 Refactor logStatus and logger initialization (#2081)
The initialization of a logger plugin was confusing. The 'init' step was
introduced to allow a daemon to buffer status events before a logger plugin
is determined by external/remote configuration. The buffered statuses could
then be transferred via a medium other than Glog (the default). To determine
if Glog should continue to write statuses to the filesystem the 'init' method
returned a Status.

Logger plugins should now use a feature method override to select how status
logs should be handled.
2016-05-11 12:05:09 -07:00
Teddy Reed
0bb79c83e0 Remove the logHealth method from logger plugins (#2079) 2016-05-10 08:34:55 -07:00
Teddy Reed
921221ed46 Add osquery version to status logs (#2067) 2016-05-05 13:19:25 -07:00
Teddy Reed
b6f09a7ecb Add action for snapshot query results (#2061) 2016-05-03 11:16:22 -07:00
Zachary Wasserman
4bb95a3a29 Fix AWS credentials test failure when env vars set (#2062) 2016-05-02 19:17:09 -07:00
Zachary Wasserman
262833c86a Add AWS Kinesis and Firehose logger plugins (#2045)
This commit adds logger plugin implementations for the Amazon
Kinesis (https://aws.amazon.com/kinesis/) and Kinesis
Firehose (https://aws.amazon.com/kinesis/firehose/) services. To support
these plugins there are a number of utility classes and functions for
AWS authentication, configuration and API integration. The logger plugin
implementations take advantage of the BufferedLogForwarder base class
for reliable buffering and batch sending of logs. In their current
implementations, the logger plugins only support sending of result logs
to these AWS services.
2016-04-25 16:19:51 -07:00
Zachary Wasserman
2376fedb73 Introduce BufferedLogForwarder (#2036)
BufferedLogForwarder is a base class for external log forwarding schemes
that require buffering and retries. It generalizes the logic from the
existing TLSLogForwarderRunner.

The existing TLSLoggerPlugin and TLSLogForwarderRunner are refactored to
demonstrate the use of this new base class.
2016-04-15 09:49:35 -07:00
Zachary Wasserman
8cb862e327 Allow TLS to proceed without node key if enrollment disabled 2016-04-07 08:47:03 -07:00
Teddy Reed
2379493721 Introduce decorator queries 2016-03-29 10:03:50 -07:00
Teddy Reed
d2d1431061 Move dispatcher to public API 2016-03-21 15:27:51 -07:00
Teddy Reed
0ba2861cf9 [Fix #1920] Detach thread before joining/clearing (terminate) 2016-03-13 12:15:18 -07:00
Teddy Reed
956ce75601 Remove Glog from third-party build 2016-03-07 12:54:00 -08:00
Teddy Reed
afd17f8134 1. Reorganize RocksDB database handle into a plugin
2. Introduce a SQLite-based database plugin
3. Refactor database usage to include local 'fast-calls'
4. Introduce an 'ephemeral' database plugin for testing (like a mock)
2016-03-06 20:40:16 -08:00
Teddy Reed
3101a32b01 Improve logging tests, add filesystem logger tests 2016-02-21 19:40:16 -08:00
Teddy Reed
14ff03dbf7 [Fix #1861] Add newline to all filesystem logger writes 2016-02-21 14:12:58 -08:00