-
Notifications
You must be signed in to change notification settings - Fork 444
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
Istio logs #3632
Istio logs #3632
Conversation
Nice to see this! It would be nice to have some sample logs provided and a sample produced event so as to see if there is something additional we could add etc. |
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.
It might be useful to add pipeline testing here - https://github.com/elastic/elastic-package/blob/main/docs/howto/pipeline_testing.md
…ent.original if parsed, change mapping type to text for text fields in istio
…ated tests with data from production, add missing docs for destination/source address/ip/port
packages/istio/data_stream/access_logs/_dev/test/pipeline/test-access-json-logs.log
Outdated
Show resolved
Hide resolved
packages/istio/data_stream/access_logs/_dev/test/pipeline/test-access-other-logs.log
Outdated
Show resolved
Hide resolved
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.
Nice! I have left some comments that we will need to consider.
Also please remember to add a "How to test manually" section in the PR description for everyone that would be interested to test it as well as for future reference.
packages/istio/data_stream/access_logs/_dev/test/pipeline/test-access-failed.log
Outdated
Show resolved
Hide resolved
packages/istio/data_stream/access_logs/_dev/test/pipeline/test-access-logs.log
Show resolved
Hide resolved
packages/istio/data_stream/access_logs/_dev/test/pipeline/test-access-other-logs.log
Outdated
Show resolved
Hide resolved
packages/istio/data_stream/access_logs/agent/stream/stream.yml.hbs
Outdated
Show resolved
Hide resolved
packages/istio/data_stream/access_logs/elasticsearch/ingest_pipeline/format-json.yml
Show resolved
Hide resolved
packages/istio/data_stream/access_logs/agent/stream/stream.yml.hbs
Outdated
Show resolved
Hide resolved
Co-authored-by: Chris Mark <chrismarkou92@gmail.com>
b6e4c68
to
71e9a3f
Compare
...ges/istio/data_stream/access_logs/_dev/test/pipeline/test-access-json-logs.log-expected.json
Show resolved
Hide resolved
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.
LGTM!
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.
LGTM! I've left few questions
@@ -0,0 +1,17 @@ | |||
# Istio Integration | |||
|
|||
This integration ingest access logs created by the [Istio](https://istio.io/) service mesh. |
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.
is it only access logs? as I understood this format works for both access and error logs, or?
should then the data_stream be renamed access_logs
-> logs
?
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.
good point. I would argue that we are only processing a subset of all logs (only the access logs). Errors can probably be either in access logs or not. So I would keep the name as it is
parsers: | ||
- container: | ||
stream: stdout | ||
format: cri |
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.
is it needed to define this parser configuration? default values looks quite safe - https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-input-filestream.html#_container. also if this integration is used on cluster with docker
log format, it will not work
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.
sorry I just saw this message after I have already merged the PR. I'll keep it in mind for v0.2.0
field: http.response.status_code | ||
type: long | ||
ignore_missing: true | ||
on_failure: |
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.
will be there added any information in document that processor failed?
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.
do you mean for this specific field or in general? In general, there is a field error.message that is added to the last step of the pipeline.
What does this PR do?
Add support for Istio logs.
Notes:
container
parser with a separate ingest pipeline for json logs.Checklist
changelog.yml
file.Author's Checklist
How to test this PR locally
Setup istio on elastic cloud + k8s on google cloud
1.24.3-gke.200
and 3 nodes with machine typee2-medium
git clone --branch snapshot https://github.com/elastic/package-storage.git
and then started the package registry with that local folder mounted as a volume. Commanddocker run -it -p 80:8080 -v $(pwd)/package-storage/packages/:/packages/package-registry docker.elastic.co/package-registry/package-registry:main
elastic-package build
inside the folderpackages/istio
from the integrations repo (cloned locally)us-west2
so that you can change custom configxpack.fleet.registryUrl: "http://<ip>:80"
. change<ip>
with primary external ip (ephemeral) of the VM where you started the package registry. Make sure the port 80 is open at the firewall level.Save
to restart kibana with the new configsAgent policy
to generate a fleet enrollment token to use to connect the elastic agents running on k8s to the elastic stackFLEET_URL
andFLEET_ENROLLMENT_TOKEN
from kibana intoelastic-agent/deploy/kubernetes/elastic-agent-managed-kubernetes.yaml
to correctly configure elastic-agent to talk to Kibana/fleet on your elastic deployment1. Follow all the steps at https://istio.io/latest/docs/setup/getting-started/ to setup istio and start a sample app to generate some access logs
Related issues
Screenshots