{
"name": "nginx-51",
"description": "",
"namespace": "default",
"policy_id": "a1c33c30-2de9-11ed-b772-1b55494b0e06",
"enabled": true,
"inputs": [
{
"type": "logfile",
"policy_template": "nginx",
"enabled": true,
"streams": [
{
"enabled": true,
"data_stream": {
"type": "logs",
"dataset": "nginx.access"
},
"vars": {
"paths": {
"value": [
"/var/log/nginx/access.log*"
],
"type": "text"
},
"tags": {
"value": [
"nginx-access"
],
"type": "text"
},
"preserve_original_event": {
"value": false,
"type": "bool"
},
"processors": {
"type": "yaml"
}
}
},
{
"enabled": true,
"data_stream": {
"type": "logs",
"dataset": "nginx.error"
},
"vars": {
"paths": {
"value": [
"/var/log/nginx/error.log*"
],
"type": "text"
},
"tags": {
"value": [
"nginx-error"
],
"type": "text"
},
"preserve_original_event": {
"value": false,
"type": "bool"
},
"processors": {
"type": "yaml"
}
}
}
]
},
{
"type": "httpjson",
"policy_template": "nginx",
"enabled": false,
"streams": [
{
"enabled": false,
"data_stream": {
"type": "logs",
"dataset": "nginx.access"
},
"vars": {
"interval": {
"value": "10s",
"type": "text"
},
"search": {
"value": "search sourcetype=nginx:plus:access",
"type": "text"
},
"tags": {
"value": [
"forwarded",
"nginx-access"
],
"type": "text"
},
"preserve_original_event": {
"value": false,
"type": "bool"
},
"processors": {
"type": "yaml"
}
}
},
{
"enabled": false,
"data_stream": {
"type": "logs",
"dataset": "nginx.error"
},
"vars": {
"interval": {
"value": "10s",
"type": "text"
},
"search": {
"value": "search sourcetype=nginx:plus:error",
"type": "text"
},
"tags": {
"value": [
"forwarded",
"nginx-error"
],
"type": "text"
},
"preserve_original_event": {
"value": false,
"type": "bool"
},
"processors": {
"type": "yaml"
}
}
}
],
"vars": {
"url": {
"value": "https://server.example.com:8089",
"type": "text"
},
"username": {
"type": "text"
},
"password": {
"type": "password"
},
"token": {
"type": "password"
},
"ssl": {
"value": "#certificate_authorities:\n# - |\n# -----BEGIN CERTIFICATE-----\n# MIIDCjCCAfKgAwIBAgITJ706Mu2wJlKckpI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-----END CERTIFICATE-----\n",
"type": "yaml"
}
}
},
{
"type": "nginx/metrics",
"policy_template": "nginx",
"enabled": true,
"streams": [
{
"enabled": true,
"data_stream": {
"type": "metrics",
"dataset": "nginx.stubstatus"
},
"vars": {
"period": {
"value": "10s",
"type": "text"
},
"server_status_path": {
"value": "/nginx_status",
"type": "text"
}
}
}
],
"vars": {
"hosts": {
"value": [
"http://127.0.0.1:80"
],
"type": "text"
}
}
}
],
"package": {
"name": "nginx",
"title": "Nginx",
"version": "1.4.1"
}
}
Summary
Add a UI toggle that enabled synthetic
_sourcefor a given data stream to the policy editor.Parent issue #132818
Ref #139862
Implementation
Indexing Options (Experimental)section to the policy editor at the end of each data stream's settings sectionSynthetic sourceSynthetic sourceswitch also includes a tooltip with additional information/referencesProposed Request Addition to Package Policy API
Show current example payload
{ "name": "nginx-51", "description": "", "namespace": "default", "policy_id": "a1c33c30-2de9-11ed-b772-1b55494b0e06", "enabled": true, "inputs": [ { "type": "logfile", "policy_template": "nginx", "enabled": true, "streams": [ { "enabled": true, "data_stream": { "type": "logs", "dataset": "nginx.access" }, "vars": { "paths": { "value": [ "/var/log/nginx/access.log*" ], "type": "text" }, "tags": { "value": [ "nginx-access" ], "type": "text" }, "preserve_original_event": { "value": false, "type": "bool" }, "processors": { "type": "yaml" } } }, { "enabled": true, "data_stream": { "type": "logs", "dataset": "nginx.error" }, "vars": { "paths": { "value": [ "/var/log/nginx/error.log*" ], "type": "text" }, "tags": { "value": [ "nginx-error" ], "type": "text" }, "preserve_original_event": { "value": false, "type": "bool" }, "processors": { "type": "yaml" } } } ] }, { "type": "httpjson", "policy_template": "nginx", "enabled": false, "streams": [ { "enabled": false, "data_stream": { "type": "logs", "dataset": "nginx.access" }, "vars": { "interval": { "value": "10s", "type": "text" }, "search": { "value": "search sourcetype=nginx:plus:access", "type": "text" }, "tags": { "value": [ "forwarded", "nginx-access" ], "type": "text" }, "preserve_original_event": { "value": false, "type": "bool" }, "processors": { "type": "yaml" } } }, { "enabled": false, "data_stream": { "type": "logs", "dataset": "nginx.error" }, "vars": { "interval": { "value": "10s", "type": "text" }, "search": { "value": "search sourcetype=nginx:plus:error", "type": "text" }, "tags": { "value": [ "forwarded", "nginx-error" ], "type": "text" }, "preserve_original_event": { "value": false, "type": "bool" }, "processors": { "type": "yaml" } } } ], "vars": { "url": { "value": "https://server.example.com:8089", "type": "text" }, "username": { "type": "text" }, "password": { "type": "password" }, "token": { "type": "password" }, "ssl": { "value": "#certificate_authorities:\n# - |\n# -----BEGIN CERTIFICATE-----\n# MIIDCjCCAfKgAwIBAgITJ706Mu2wJlKckpIvkWxEHvEyijANBgkqhkiG9w0BAQsF\n# ADAUMRIwEAYDVQQDDAlsb2NhbGhvc3QwIBcNMTkwNzIyMTkyOTA0WhgPMjExOTA2\n# MjgxOTI5MDRaMBQxEjAQBgNVBAMMCWxvY2FsaG9zdDCCASIwDQYJKoZIhvcNAQEB\n# BQADggEPADCCAQoCggEBANce58Y/JykI58iyOXpxGfw0/gMvF0hUQAcUrSMxEO6n\n# fZRA49b4OV4SwWmA3395uL2eB2NB8y8qdQ9muXUdPBWE4l9rMZ6gmfu90N5B5uEl\n# 94NcfBfYOKi1fJQ9i7WKhTjlRkMCgBkWPkUokvBZFRt8RtF7zI77BSEorHGQCk9t\n# /D7BS0GJyfVEhftbWcFEAG3VRcoMhF7kUzYwp+qESoriFRYLeDWv68ZOvG7eoWnP\n# PsvZStEVEimjvK5NSESEQa9xWyJOmlOKXhkdymtcUd/nXnx6UTCFgnkgzSdTWV41\n# CI6B6aJ9svCTI2QuoIq2HxX/ix7OvW1huVmcyHVxyUECAwEAAaNTMFEwHQYDVR0O\n# BBYEFPwN1OceFGm9v6ux8G+DZ3TUDYxqMB8GA1UdIwQYMBaAFPwN1OceFGm9v6ux\n# 8G+DZ3TUDYxqMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAG5D\n# 874A4YI7YUwOVsVAdbWtgp1d0zKcPRR+r2OdSbTAV5/gcS3jgBJ3i1BN34JuDVFw\n# 3DeJSYT3nxy2Y56lLnxDeF8CUTUtVQx3CuGkRg1ouGAHpO/6OqOhwLLorEmxi7tA\n# H2O8mtT0poX5AnOAhzVy7QW0D/k4WaoLyckM5hUa6RtvgvLxOwA0U+VGurCDoctu\n# 8F4QOgTAWyh8EZIwaKCliFRSynDpv3JTUwtfZkxo6K6nce1RhCWFAsMvDZL8Dgc0\n# yvgJ38BRsFOtkRuAGSf6ZUwTO8JJRRIFnpUzXflAnGivK9M13D5GEQMmIl6U9Pvk\n# sxSmbIUfc2SGJGCJD4I=\n# -----END CERTIFICATE-----\n", "type": "yaml" } } }, { "type": "nginx/metrics", "policy_template": "nginx", "enabled": true, "streams": [ { "enabled": true, "data_stream": { "type": "metrics", "dataset": "nginx.stubstatus" }, "vars": { "period": { "value": "10s", "type": "text" }, "server_status_path": { "value": "/nginx_status", "type": "text" } } } ], "vars": { "hosts": { "value": [ "http://127.0.0.1:80" ], "type": "text" } } } ], "package": { "name": "nginx", "title": "Nginx", "version": "1.4.1" } }Enabling synthetic source
Reference https://github.com/elastic/integrations/blob/main/docs/how_to_test_new_indexing_features.md
We'll need to make an update to the appropriate component template equivalent to:
Designs