Commit Graph

199 Commits

Author SHA1 Message Date
George Guliashvili
971bee4441 Move build system to BUCK
fbshipit-source-id: 8ffef5e6a393ac67ce56dcb74845402e43d964a0
2018-12-07 16:12:35 +00:00
George Guliashvili
a31d7582f4 Fix rocksdb crash
Configuration of OptimizeForSmallDb was crashing osquery. To be more specific ColumnFamilyOptions::OptimizeForSmallDb part was doing it.
2018-12-07 16:00:46 +00:00
Nick Anderson
0314871908
bug: explicitly set safe permissions on osquery dbs (#5229) 2018-09-18 22:51:29 -07:00
Nick Anderson
bf93fcf2f9
database: changing default path of the database for pathing uniformity (#4832) 2018-09-14 11:36:24 -07:00
Max Kareta
78ba6e0e62
rocksdb implementation part (#4912) 2018-08-20 12:49:56 +01:00
Giorgi Guliashvili
6ff3262139
regex replace (#4847) 2018-08-09 09:55:48 +01:00
Filipe Manco
a841831493 Fix make sync (#4838) 2018-08-08 14:14:13 +01:00
JanEbbing
0cd8283a8a Use putBatch only for multiple puts, fix bug in setDatabaseVal (#4800) 2018-08-06 12:49:07 +01:00
Filipe Manco
be3646672a
Add migration for audit keys (#4779) 2018-08-02 00:20:37 +01:00
Filipe Manco
51a4ed1d25
Improve DB migration error handling and testing (#4777) 2018-07-30 14:25:07 +01:00
Giorgi Guliashvili
94397d3c04
get rid of unnecessary ptree includes (#4727) 2018-07-19 10:45:40 +01:00
Giorgi Guliashvili
d4e444c999
incorrect assumption about reserve behavior (#4728) 2018-07-19 10:44:56 +01:00
Alexander
585e73e1e8
tryTo<> generics for string to integer conversion (#4676)
`tryTo<>` generics for string to integer conversion

The first approach to substitute all `safeStrto*` conversions to `tryTo<>` generics.

Thare are some advantages in using templates here:
  - Destination value type explicitly takes a part in call syntax.
  - You could use it other template code

Also I have removed `safeStrtoi` from the code as an example of usage.
2018-07-12 18:03:57 +01:00
Alessandro Gario
8b864f1935 Improving audit-based table performances (#4647) 2018-07-12 10:10:52 -04:00
Teddy Reed
6d5f94b2c6
flags: Separate flags and flagalias (#4682) 2018-07-10 23:04:39 -04:00
Max Kareta
6ab2a83a61
Refactor/cmake 5 (#4642) 2018-06-26 16:54:08 +01:00
Giorgi Guliashvili
521041ba86
Ephemeral native support for int (#4489)
* Ephemeral native support for int

Ephemeral supports int without serialization.
Dump get and put pushed from database.cpp to the database plugin.
Basic support for rocksDB and sqlite

* status messages

* style and compilation problems fix

* const int& to int for database get

* const int& to int for database put

* more specific exception type of boost variant get

* eohemeral improvements

code repetition reduced
map operations reduced
error message improved
 #everything, next in the following.

* safeStrtoi implementation and use

*  code formatting

* atoi accepts base int type

* error message add to status

* compilation error and format correction
2018-06-06 19:08:23 -07:00
Giorgi Guliashvili
13a5e683f1
rocksDB simplify (#4490)
* rocksDB simplify

unnecessary private variables moved to functions.
Find method replaced by std::find

* reverting back some changes

* code move revert
2018-06-06 12:17:34 -07:00
Max Kareta
93110701d8
reworked cmake file split database plugins files (#4476) 2018-06-02 20:44:58 +01:00
Giorgi Guliashvili
8d7129ee03
Basic db int type support (#4454)
* Basic db int type support

Added API and tests for int types in the database abstraction.

For now, it's just the  wrapper over the string type. In the following commits, will utilize specific database capabilites for additional performance.

* source formatting corrected

* hardened tests
2018-06-02 12:38:29 -07:00
Max Kareta
5aca61375f
reorganized includes to improve compile time (#4445) 2018-05-30 00:17:40 +01:00
Mitchell Grenier
592f7d9fa8 bug: convert empty ptree json to empty RJ lists for db upgrades (#4325) 2018-04-24 13:39:22 -07:00
Nick Anderson
2017068f11
database: updating migration logic from ptree to rapidjson (#4294) 2018-04-17 10:55:58 -07:00
Nick Anderson
9e2515a661
database: convert cached ptree entires to RapidJSON results (#4207) 2018-03-21 09:39:50 -07:00
Teddy Reed
483fbbb594
query: Force query results into proper order (#2947) 2018-01-21 01:20:48 -05:00
Teddy Reed
90a737ead7
Replace most of boost::property_tree with rapidjson (#3910) 2018-01-20 20:58:01 -05:00
uptycs-nishant
1acc7b91ef Reducing memory footprint of osquery by achieving zero-copy (#3977) 2017-12-27 19:43:20 -08:00
Teddy Reed
b86b8c0ba3
rocksdb: Decrease max open database files to 128 from 256 (#4021) 2017-12-27 14:40:42 -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
a7c2669ba3
tidy: Improve clang-tidy (modernize) list of checks and run across codebase (#3870) 2017-10-29 22:25:49 -07:00
Teddy Reed
4d631edac6 rocksdb: Remove manual flush (#3663) 2017-09-08 13:04:44 -07:00
Seshu Pasam
6fab8b6083 logging: adding "counter" to differentiate initial results (#3651)
When setting up alerts for differential logs data you might want to skip the
initial added records. counter can be used to identify if the added records
are all records from initial query of if they are new records. For initial
query results that includes all records counter will be "0". For subsequent
query executions counter will be incremented by 1. When epoch changes, counter
will be reset back to "0".
2017-09-07 15:01:15 -07:00
Teddy Reed
16b40138fe rocksdb: Flush all column families and set max files (#3638) 2017-09-02 12:08:35 -07:00
Teddy Reed
205da3c698 rocksdb: Implement a 'backup' and recover feature for RocksDB (#3635) 2017-09-01 22:31:03 -07:00
Mitchell Grenier
7750fa8ee5 deps: Remove snappy and lz4 (#3545) 2017-08-27 12:02:27 -07:00
Teddy Reed
e4bbf06074 codemod: Refactor query functions out of database (#3615) 2017-08-26 18:36:06 -07:00
Teddy Reed
cf170c4278 cleanup: Move query out of database header (#3576) 2017-08-20 02:44:38 -07:00
Mitchell Grenier
8a963e8d40 [Distributed] Moving to RapidJSON (#3265) 2017-08-07 16:34:44 -07:00
Lambda Conjecture
ecb9e2ccf2 Add Epoch marker to scheduled query results (#3378) 2017-07-07 17:56:03 -07:00
Teddy Reed
99675fdbb2 audit: Increase speed when using socket_events (#3449) 2017-07-02 17:18:40 -07:00
Seshu Pasam
5f732084a2 kDBInitialized should be checked after acquiring lock (#3302) 2017-05-22 20:11:35 -07:00
Teddy Reed
8f07e1df23 database: Simplify database reset logic and locking (#3298) 2017-05-20 00:00:27 -07:00
Nick Anderson
8fdb0a6945 Adding distributed workid to carver (#3252) 2017-05-05 15:14:21 -07:00
Teddy Reed
6496c2eef7 database: Remove SKIP_ROCKSDB build option (#3235) 2017-04-28 17:48:45 -07:00
Teddy Reed
4372785d5d Refactor build logic to allow optional: yara, tsk, lldpd (#3226) 2017-04-28 13:45:41 -07:00
Teddy Reed
e52f85f95e database: Move r/w reset lock for extensions (#3219) 2017-04-27 00:55:02 -07:00
Teddy Reed
ca8a919602 database: Fix TSAN-detected reset lock inversion (#3207) 2017-04-24 07:51:05 -07:00
Teddy Reed
66c177945e logger: Require an open DB for status logs (#3205) 2017-04-23 13:16:12 -07:00
Grigoriy Chudnov
e3a2445480 Add database init retry (#3179) 2017-04-21 15:32:40 -07:00
Teddy Reed
76fe5d748c logging: Allow Glog reentrancy (#3142) 2017-04-06 15:57:44 -07:00