add telegraf log directory /var/log/kolla/telegraf
Closes-Bug: #1622609 Change-Id: I89d4059e2c31b7f1737c147479cdc3c36b06fa69
This commit is contained in:
parent
8249f3a188
commit
388eee2eab
@ -6,8 +6,11 @@ MAINTAINER {{ maintainer }}
|
||||
{{ macros.install_packages(telegraf_packages | customizable("packages")) }}
|
||||
|
||||
COPY telegraf_sudoers /etc/sudoers.d/kolla_telegraf_sudoers
|
||||
COPY extend_start.sh /usr/local/bin/kolla_telegraf_extend_start
|
||||
|
||||
RUN chmod 750 /etc/sudoers.d \
|
||||
&& chmod 440 /etc/sudoers.d/kolla_telegraf_sudoers \
|
||||
&& chmod 755 /usr/local/bin/kolla_telegraf_extend_start \
|
||||
&& usermod -a -G kolla telegraf
|
||||
|
||||
{% block telegraf_footer %}{% endblock %}
|
||||
|
10
docker/telegraf/extend_start.sh
Normal file
10
docker/telegraf/extend_start.sh
Normal file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
TELEGRAF_LOG_DIR="/var/log/kolla/telegraf"
|
||||
|
||||
if [[ ! -d "${TELEGRAF_LOG_DIR}" ]]; then
|
||||
mkdir -p ${TELEGRAF_LOG_DIR}
|
||||
fi
|
||||
if [[ $(stat -c %a ${TELEGRAF_LOG_DIR}) != "755" ]]; then
|
||||
chmod 755 ${TELEGRAF_LOG_DIR}
|
||||
fi
|
Loading…
Reference in New Issue
Block a user