Closed ianblenke closed 8 years ago
Our Mantl distributive check for nginx-consul was failing with the following error:
nginx-consul
DEBU[0000] Running check DockerRunningRegexp DEBU[0000] ProbabalisticSplit couldn't find a consistent regexp attempted=[\t+ \s{4} \s{2,} \s+] outliers=3 DEBU[0000] ProbabalisticSplit chose a regexp regexp=\s{4}
While debugging why DockerRunningRegexp was failing, I've stumbled upon a bug with ProbablisticSplit inaccurately parsing the output of docker ps -a.
DockerRunningRegexp
ProbablisticSplit
docker ps -a
When there are no PORTS defined, the regex columns becomes ambiguous, breaking ProbablisticSplit.
A better approach would be to use the --format option to output only the {{.Image}} and {{Status}} values in a machine parseable form.
--format
{{.Image}}
{{Status}}
Fixed in #129
Our Mantl distributive check for
nginx-consul
was failing with the following error:While debugging why
DockerRunningRegexp
was failing, I've stumbled upon a bug withProbablisticSplit
inaccurately parsing the output ofdocker ps -a
.When there are no PORTS defined, the regex columns becomes ambiguous, breaking
ProbablisticSplit
.A better approach would be to use the
--format
option to output only the{{.Image}}
and{{Status}}
values in a machine parseable form.