-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Cleanup] Reformat audit json files with jq
Reformat the files by running for f in *json do jq . $f > out mv out $f done This makes it a lot easier to work with the files in CLion (which happily wants to reformat the file when adding new fields) Change-Id: If84830a897abe30af4d7226197c1abd81b91a59d Reviewed-on: https://review.couchbase.org/c/kv_engine/+/181597 Tested-by: Build Bot <build@couchbase.com> Reviewed-by: Dave Rigby <daver@couchbase.com>
- Loading branch information
Showing
3 changed files
with
144 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,44 @@ | ||
{ | ||
"version" : 2, | ||
"module" : "auditd", | ||
"events" : [ | ||
{ "id" : 4096, | ||
"name" : "configured audit daemon", | ||
"description" : "loaded configuration file for audit daemon", | ||
"sync" : false, | ||
"enabled" : true, | ||
"filtering_permitted" : false, | ||
"mandatory_fields" : { | ||
"timestamp" : "", | ||
"real_userid" : {"domain" : "", "user" : ""}, | ||
"hostname" : "", | ||
"version" : 1, | ||
"auditd_enabled" : true, | ||
"rotate_interval" : 1, | ||
"log_path" : "", | ||
"descriptors_path" : "" | ||
}, | ||
"optional_fields" : {} | ||
}, | ||
|
||
{ "id" : 4097, | ||
"name" : "shutting down audit daemon", | ||
"description" : "The audit daemon is being shutdown", | ||
"sync" : false, | ||
"enabled" : true, | ||
"filtering_permitted" : false, | ||
"mandatory_fields" : { | ||
"timestamp" : "", | ||
"real_userid" : {"domain" : "", "user" : ""} | ||
}, | ||
"optional_fields" : {} | ||
} | ||
|
||
] | ||
"version": 2, | ||
"module": "auditd", | ||
"events": [ | ||
{ | ||
"id": 4096, | ||
"name": "configured audit daemon", | ||
"description": "loaded configuration file for audit daemon", | ||
"sync": false, | ||
"enabled": true, | ||
"filtering_permitted": false, | ||
"mandatory_fields": { | ||
"timestamp": "", | ||
"real_userid": { | ||
"domain": "", | ||
"user": "" | ||
}, | ||
"hostname": "", | ||
"version": 1, | ||
"auditd_enabled": true, | ||
"rotate_interval": 1, | ||
"log_path": "", | ||
"descriptors_path": "" | ||
}, | ||
"optional_fields": {} | ||
}, | ||
{ | ||
"id": 4097, | ||
"name": "shutting down audit daemon", | ||
"description": "The audit daemon is being shutdown", | ||
"sync": false, | ||
"enabled": true, | ||
"filtering_permitted": false, | ||
"mandatory_fields": { | ||
"timestamp": "", | ||
"real_userid": { | ||
"domain": "", | ||
"user": "" | ||
} | ||
}, | ||
"optional_fields": {} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,31 @@ | ||
{ | ||
"version" : 1, | ||
"module" : "example", | ||
"events" : [ | ||
{ "id" : 8192, | ||
"name" : "example event", | ||
"description" : "this is the full description of the example event", | ||
"sync" : false, | ||
"enabled" : true, | ||
"mandatory_fields" : { | ||
"timestamp" : "", | ||
"real_userid" : {"domain" : "", "user" : ""} | ||
}, | ||
"optional_fields" : { | ||
"sessionid" : "", | ||
"remote" : {"ip" : "", "port" : 1}, | ||
"effective_userid" : {"domain" : "", "user" : ""} | ||
} | ||
} | ||
] | ||
"version": 1, | ||
"module": "example", | ||
"events": [ | ||
{ | ||
"id": 8192, | ||
"name": "example event", | ||
"description": "this is the full description of the example event", | ||
"sync": false, | ||
"enabled": true, | ||
"mandatory_fields": { | ||
"timestamp": "", | ||
"real_userid": { | ||
"domain": "", | ||
"user": "" | ||
} | ||
}, | ||
"optional_fields": { | ||
"sessionid": "", | ||
"remote": { | ||
"ip": "", | ||
"port": 1 | ||
}, | ||
"effective_userid": { | ||
"domain": "", | ||
"user": "" | ||
} | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,76 +1,75 @@ | ||
{ | ||
"modules" : [ | ||
{ | ||
"auditd" : { | ||
"startid" : 4096, | ||
"file" : "kv_engine/auditd/etc/auditd_descriptor.json", | ||
"header" : "kv_engine/auditd/auditd_audit_events.h" | ||
|
||
} | ||
}, | ||
{ | ||
"ns_server" : { | ||
"startid" : 8192, | ||
"file" : "ns_server/etc/audit_descriptor.json" | ||
} | ||
}, | ||
{ | ||
"xdcr" : { | ||
"startid" : 16384, | ||
"file" : "goproj/src/github.com/couchbase/goxdcr/etc/audit_descriptor.json" | ||
} | ||
}, | ||
{ | ||
"memcached" : { | ||
"startid" : 20480, | ||
"file" : "kv_engine/etc/memcached_descriptor.json", | ||
"header":"kv_engine/memcached_audit_events.h" | ||
} | ||
}, | ||
{ | ||
"fts" : { | ||
"startid" :24576, | ||
"file" : "cbft/etc/audit_descriptor.json" | ||
} | ||
}, | ||
{ | ||
"n1ql" : { | ||
"startid" :28672, | ||
"file" : "goproj/src/github.com/couchbase/query/etc/audit_descriptor.json" | ||
} | ||
}, | ||
{ | ||
"eventing" : { | ||
"startid" : 32768, | ||
"file" : "goproj/src/github.com/couchbase/eventing/audit/audit_descriptor.json", | ||
"enterprise" : true | ||
} | ||
}, | ||
{ | ||
"analytics" : { | ||
"startid" : 36864, | ||
"file" : "analytics/cbas/cbas-server/src/main/resources/com/couchbase/analytics/audit/audit_descriptor.json", | ||
"enterprise" : true | ||
} | ||
}, | ||
{ | ||
"view_engine" : { | ||
"startid" : 40960, | ||
"file" : "couchdb/src/couch_audit/etc/audit_descriptor.json" | ||
} | ||
}, | ||
{ | ||
"backup" : { | ||
"startid" : 45056, | ||
"file" : "cbbs/audit/audit_descriptor.json", | ||
"enterprise": true | ||
} | ||
}, | ||
{ | ||
"index" : { | ||
"startid" : 49152, | ||
"file" : "goproj/src/github.com/couchbase/indexing/secondary/audit/audit_descriptor.json" | ||
} | ||
} | ||
] | ||
"modules": [ | ||
{ | ||
"auditd": { | ||
"startid": 4096, | ||
"file": "kv_engine/auditd/etc/auditd_descriptor.json", | ||
"header": "kv_engine/auditd/auditd_audit_events.h" | ||
} | ||
}, | ||
{ | ||
"ns_server": { | ||
"startid": 8192, | ||
"file": "ns_server/etc/audit_descriptor.json" | ||
} | ||
}, | ||
{ | ||
"xdcr": { | ||
"startid": 16384, | ||
"file": "goproj/src/github.com/couchbase/goxdcr/etc/audit_descriptor.json" | ||
} | ||
}, | ||
{ | ||
"memcached": { | ||
"startid": 20480, | ||
"file": "kv_engine/etc/memcached_descriptor.json", | ||
"header": "kv_engine/memcached_audit_events.h" | ||
} | ||
}, | ||
{ | ||
"fts": { | ||
"startid": 24576, | ||
"file": "cbft/etc/audit_descriptor.json" | ||
} | ||
}, | ||
{ | ||
"n1ql": { | ||
"startid": 28672, | ||
"file": "goproj/src/github.com/couchbase/query/etc/audit_descriptor.json" | ||
} | ||
}, | ||
{ | ||
"eventing": { | ||
"startid": 32768, | ||
"file": "goproj/src/github.com/couchbase/eventing/audit/audit_descriptor.json", | ||
"enterprise": true | ||
} | ||
}, | ||
{ | ||
"analytics": { | ||
"startid": 36864, | ||
"file": "analytics/cbas/cbas-server/src/main/resources/com/couchbase/analytics/audit/audit_descriptor.json", | ||
"enterprise": true | ||
} | ||
}, | ||
{ | ||
"view_engine": { | ||
"startid": 40960, | ||
"file": "couchdb/src/couch_audit/etc/audit_descriptor.json" | ||
} | ||
}, | ||
{ | ||
"backup": { | ||
"startid": 45056, | ||
"file": "cbbs/audit/audit_descriptor.json", | ||
"enterprise": true | ||
} | ||
}, | ||
{ | ||
"index": { | ||
"startid": 49152, | ||
"file": "goproj/src/github.com/couchbase/indexing/secondary/audit/audit_descriptor.json" | ||
} | ||
} | ||
] | ||
} |