-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add Nginx getting-started catalog component for setting up fluent-bit… #166
add Nginx getting-started catalog component for setting up fluent-bit… #166
Conversation
… agent for collecting, transforming and shipping Nginx access logs into opensearch Signed-off-by: YANGDB <yang.db.dev@gmail.com>
Signed-off-by: YANGDB <yang.db.dev@gmail.com>
Signed-off-by: YANGDB <yang.db.dev@gmail.com>
Signed-off-by: YANGDB <yang.db.dev@gmail.com>
{ | ||
"name": "Fluent-Bit Log Converter", | ||
"label": "Log Parsing", | ||
"info": "<info URL>", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these supposed to still be placeholders?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks - moved into draft util all the comments / questions are resolved
], | ||
"liveDemo": { | ||
"command": "docker-compose up -d", | ||
"path": "<docker-compose-url>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another placeholder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks - moved into draft util all the comments / questions are resolved
integrations/observability/nginx/getting-started/opensearch_dashboards.yml
Outdated
Show resolved
Hide resolved
"label": "Log Parsing", | ||
"info": "<info URL>", | ||
"description": "Setup Fluent-Bit logs converter lua script config file converting Nginx access log into Simple schema format", | ||
"content": "local hexCharset = \"0123456789abcdef\"\nlocal function randHex(length)\n if length > 0 then\n local index = math.random(1, #hexCharset)\n return randHex(length - 1) .. hexCharset:sub(index, index)\n else\n return \"\"\n end\nend\n\nlocal function format_apache(c)\n return string.format(\n \"%s - %s [%s] \\\"%s %s HTTP/1.1\\\" %s %s\",\n c.host,\n c.user,\n os.date(\"%d/%b/%Y:%H:%M:%S %z\"),\n c.method,\n c.path,\n c.code,\n c.size\n )\nend\n\nlocal function format_nginx(c)\n return string.format(\n \"%s %s %s [%s] \\\"%s %s HTTP/1.1\\\" %s %s \\\"%s\\\" \\\"%s\\\"\",\n c.remote,\n c.host,\n c.user,\n os.date(\"%d/%b/%Y:%H:%M:%S %z\"),\n c.method,\n c.path,\n c.code,\n c.size,\n c.referer,\n c.agent\n )\nend\n\nlocal formats = {\n [\"apache.access\"] = format_apache,\n [\"nginx.access\"] = format_nginx\n}\n\nfunction convert_to_otel(tag, timestamp, record)\n local data = {\n traceId=randHex(32),\n spanId=randHex(16),\n [\"@timestamp\"]=os.date(\"!%Y-%m-%dT%H:%M:%S.000Z\"),\n observedTimestamp=os.date(\"!%Y-%m-%dT%H:%M:%S.000Z\"),\n body=formats[tag](record),\n attributes={\n data_stream={\n dataset=tag,\n namespace=\"production\",\n type=\"logs\"\n }\n },\n event={\n category=\"web\",\n name=\"access\",\n domain=tag,\n kind=\"event\",\n result=\"success\",\n type=\"access\"\n },\n http={\n request={\n method=record.method\n },\n response={\n bytes=tonumber(record.size),\n status_code=tonumber(record.code)\n },\n flavor=\"1.1\",\n url=record.path\n },\n communication={\n source={\n address=\"127.0.0.1\",\n ip=record.remote\n }\n }\n }\n return 1, timestamp, data\nend\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's better for content to be a file ref like what we have for the other long-form content in integrations. Makes the config file smaller and easier to read, and makes an easier editing experience.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Swiddis can u plz share an example for the above content ?
Signed-off-by: YANGDB <yang.db.dev@gmail.com>
Signed-off-by: YANGDB <yang.db.dev@gmail.com>
add getting started dashboard asset + markdown Signed-off-by: YANGDB <yang.db.dev@gmail.com>
add getting started dashboard asset + markdown Signed-off-by: YANGDB <yang.db.dev@gmail.com>
add getting started dashboard asset + markdown Signed-off-by: YANGDB <yang.db.dev@gmail.com>
Signed-off-by: YANGDB <yang.db.dev@gmail.com>
Signed-off-by: YANGDB <yang.db.dev@gmail.com>
- quickstart - connect to an existing collector Signed-off-by: YANGDB <yang.db.dev@gmail.com>
Signed-off-by: YANGDB <yang.db.dev@gmail.com>
Signed-off-by: YANGDB <yang.db.dev@gmail.com>
Signed-off-by: YANGDB <yang.db.dev@gmail.com>
…on resource - getting started - getting_started.json - metadata - Getting-Started.md - markdown - sample.json - sample data Signed-off-by: YANGDB <yang.db.dev@gmail.com>
…on resource - getting started - getting_started.json - metadata - Getting-Started.md - markdown - data - sample data Signed-off-by: YANGDB <yang.db.dev@gmail.com>
…on resource - getting started - getting_started.json - metadata - Getting-Started.md - markdown - data - sample data Signed-off-by: YANGDB <yang.db.dev@gmail.com>
@@ -44,6 +44,7 @@ | |||
{ "name": "logs", "version": "1.0.0" } | |||
], | |||
"assets": [ | |||
{ "name": "getting-started-tutorial", "version": "1.0.0", "extension": "ndjson", "type": "savedObjectBundle", "workflows": ["dashboards"] }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the intended flow to present this to the user? Making it a saved object bundle associated with the integration means that it won't be added to the cluster until after they set up the integration.
Signed-off-by: YANGDB <yang.db.dev@gmail.com>
Description
add Nginx getting-started catalog component for setting up fluent-bit agent for:
Also includes live docker compose sample to run for showcasing the instructions
The updated schema for the integration will contain an optional
getting-started
field containing:Schema Fields :
type
,content
,input-params
anddescription
,info
,input-params
console-cmd
,file-url
,image
,video
file-url
case) or to additional documentation in other casesIssues Resolved
#165
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.