- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- IAM Permissions
- Try it!
Full name: projects.locations.instances.extractSyslog
ExtractSyslog extracts structured part of log from a unstructured log by running a grok regex over it. The target field indicates the structured part. For a raw log: "123.249.198.123 structured_part" And preprocess config this: regex: "%{IP:Principal_ip} %{GREEDYDATA:data}", target: "data" This will generate: map<string, string> {"data": "structured_part"}
HTTP request
POST https://chronicle.googleapis.com/v1alpha/{instance}:extractSyslog
Path parameters
Parameters | |
---|---|
instance |
Required. The Chronicle instance associated with the request. Format: projects/{project}/locations/{location}/instances/{instance} |
Request body
The request body contains data with the following structure:
JSON representation |
---|
{
"preprocess_config": {
object ( |
Fields | |
---|---|
preprocess_config |
PreProcessConfig holds the GROK expression to extract the syslog header. |
log |
The raw log. A base64-encoded string. |
Response body
Response message for ExtractSyslog.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{
"field_mappings": {
string: string,
...
},
"error": {
object ( |
Fields | |
---|---|
field_mappings |
map of extracted fields. An object containing a list of |
error |
Output only. Error message if any, when running grok_regex over the log. |
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.
IAM Permissions
Requires the following IAM permission on the instance
resource:
chronicle.parserExtensions.removeSyslog
For more information, see the IAM documentation.