diff options
| author | Zuul <zuul@review.openstack.org> | 2019-03-20 17:21:56 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2019-03-20 17:21:56 +0000 |
| commit | dd4a68fb2096d9727a6773ef756dfb67737df67d (patch) | |
| tree | 573447acc3833b70a99cd8414fa62659d23ea9be /docker | |
| parent | e73e7c39dff1c43c1b24b90dd43c60384ae4c15b (diff) | |
| parent | 7c19402403482aa9f5f6410d2be54fe359406cee (diff) | |
| download | kolla-dd4a68fb2096d9727a6773ef756dfb67737df67d.tar.gz kolla-dd4a68fb2096d9727a6773ef756dfb67737df67d.zip | |
Merge "Add Google mtail for generating metrics from logs"
Diffstat (limited to 'docker')
| -rw-r--r-- | docker/prometheus/prometheus-mtail/Dockerfile.j2 | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/docker/prometheus/prometheus-mtail/Dockerfile.j2 b/docker/prometheus/prometheus-mtail/Dockerfile.j2 new file mode 100644 index 000000000..28008f16d --- /dev/null +++ b/docker/prometheus/prometheus-mtail/Dockerfile.j2 @@ -0,0 +1,30 @@ +FROM {{ namespace }}/{{ image_prefix }}prometheus-base:{{ tag }} +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" + +{% block prometheus_mtail_header %}{% endblock %} + +{% if base_arch not in ['x86_64'] %} + +RUN echo 'There are no mtail binaries for {{ base_arch }}' \ + && /bin/false + +{% endif %} + +{% block prometheus_mtail_version %} +ARG prometheus_mtail_version=v3.0.0-rc24 +ARG prometheus_mtail_url=https://github.com/google/mtail/releases/download/${prometheus_mtail_version}/mtail_${prometheus_mtail_version}_linux_amd64 +{% endblock %} + +{% block prometheus_mtail_install %} +RUN curl -sSL -o /opt/mtail ${prometheus_mtail_url} \ + && chmod +x /opt/mtail +{% endblock %} + +{% block prometheus_mtail_footer %}{% endblock %} +{% block footer %}{% endblock %} + +# NOTE(dszumski): We run as root so that mtail can scrape root owned logs +# such as /var/log/secure which are mounted into the container as read only +# for auditing purposes. Longer term we should use a more secure mechanism +# for tailing these logs. +USER root |
