Merge pull request #95 from AnalogJ/instant_collector

pull/98/head
Jason Kulatunga 4 years ago committed by GitHub
commit 382175bbb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -34,7 +34,7 @@ ENV PATH="/scrutiny/bin:${PATH}"
ADD https://github.com/dshearer/jobber/releases/download/v1.4.4/jobber_1.4.4-1_amd64.deb /tmp/ ADD https://github.com/dshearer/jobber/releases/download/v1.4.4/jobber_1.4.4-1_amd64.deb /tmp/
RUN apt install /tmp/jobber_1.4.4-1_amd64.deb RUN apt install /tmp/jobber_1.4.4-1_amd64.deb
RUN apt-get update && apt-get install -y smartmontools=7.0-0ubuntu1~ubuntu18.04.1 ca-certificates && update-ca-certificates RUN apt-get update && apt-get install -y smartmontools=7.0-0ubuntu1~ubuntu18.04.1 ca-certificates curl && update-ca-certificates
ADD https://github.com/just-containers/s6-overlay/releases/download/v1.21.8.0/s6-overlay-amd64.tar.gz /tmp/ ADD https://github.com/just-containers/s6-overlay/releases/download/v1.21.8.0/s6-overlay-amd64.tar.gz /tmp/
RUN tar xzf /tmp/s6-overlay-amd64.tar.gz -C / RUN tar xzf /tmp/s6-overlay-amd64.tar.gz -C /

@ -0,0 +1,14 @@
#!/usr/bin/with-contenv bash
echo "waiting for scrutiny service to start"
s6-svwait -u /var/run/s6/services/scrutiny
#tell s6 to only run this script once
s6-svc -O /var/run/s6/services/collector-once
# wait until scrutiny is "Ready"
while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' http://localhost:8080/api/health)" != "200" ]]; do sleep 5; done
echo "starting scrutiny collector"
/scrutiny/bin/scrutiny-collector-metrics run
Loading…
Cancel
Save