We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi @repeatedly,
Thanks for the plugin!
I have a Syslog input and I'd like to add extra fields from Docker API:
In the current form, it won't be optimized as the call Docker calls will be make on each line.
Do you have idea on how to cache these call for at least some period of time?
Here's the current form:
<filter syslog.docker.containers.**> @type record_modifier prepare_value require 'docker' <record> docker_version ${Docker.version['Version'] rescue nil} </record> <record> docker_image ${sha_image = Docker::Container.get(record['ident']).info['Image']; Docker::Image.get(sha_image).info['RepoTags'].first.split(':').first} </record> <record> docker_tag ${sha_image = Docker::Container.get(record['ident']).info['Image']; Docker::Image.get(sha_image).info['RepoTags'].first.split(':').last} </record> <record> docker_restart_count ${Docker::Container.get(record['ident']).info['RestartCount']} </record> <record> docker_started_at ${Time.parse(Docker::Container.get(record['ident']).info['State']['StartedAt']).to_s} </record> <record> docker_finished_at ${Time.parse(Docker::Container.get(record['ident']).info['State']['FinishedAt']).to_s} </record> <record> docker_container ${Docker::Container.get(record['ident']).info['Name'][1..-1]} </record> <record> nomad_alloc_name ${Docker::Container.get(record['ident']).info['Config']['Env'].select { |e| e.include?('NOMAD_ALLOC_NAME') }.first.split('=').last rescue nil} </record> remove_keys extradata,msgid,container_id,pid </filter>
Any help would be much appreciated 🙇
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi @repeatedly,
Thanks for the plugin!
I have a Syslog input and I'd like to add extra fields from Docker API:
In the current form, it won't be optimized as the call Docker calls will be make on each line.
Do you have idea on how to cache these call for at least some period of time?
Here's the current form:
Any help would be much appreciated 🙇
The text was updated successfully, but these errors were encountered: