我发现有docker events command列出了泊坞主机上发生的所有事件。
我想在我的CI上使用此功能,以查看有助于我进行故障排除的任何开发人员操作。不幸的是,我的每个服务都有一个健康检查,每次执行健康检查都被认为是如下事件:
2018-03-12T11:15:57.390800327 + 01:00容器exec_start:/ bin / sh -c check.sh eb2676e25e747f77827490f5ded1c70051cd2a663746a5b0f458b46059258488 (com.docker.stack.namespace =代理, com.docker.swarm.node.id = g6zrzma1ua1etg5tbgvdoydz9, com.docker.swarm.service.id = a12vrvs5m6vw9l1rrmzc82akb, com.docker.swarm.service.name = proxy_proxy,com.docker.swarm.task =, com.docker.swarm.task.id = nzjuh4uwsjb66u6m5j845zo21, com.docker.swarm.task.name = proxy_proxy.1.nzjuh4uwsjb66u6m5j845zo21, 图像= vfarcic /搬运工流代理:17.10.03-38@sha256:53caca880fbbcd8ed1cea9fc64b6c98e58ac9ca5d00ed0e630872b617ce33f41, 名称= proxy_proxy.1.nzjuh4uwsjb66u6m5j845zo21)
不同的healthchecks有不同的命令,但它们都是exec_create或exec_start事件。有没有办法过滤所有这些并只保留其余的事件?或者只是保留由CLI触发的事件?
有过滤功能,但我找不到排除某些内容的方法。
答案 0 :(得分:0)
我不知道在当前事件CLI中排除的方法,但是您可以使用grep排除:
<div class="row">
<div class="col-9 my-1 input-ranges" id="range">
@{ var questionId = Model.QuestionAndAnswer[i].QuestionId;
var AcceptableScore = Model.QuestionAndAnswer[i].QuestionAcceptableScore;
}
@Html.TextBoxFor(model => model.QuestionAndAnswer[i].Ans_Score, htmlAttributes: new { @id = questionId, @tag = AcceptableScore, @class = "input-range", @min = "1", @max = "10", @step = "1", @type = "range" })
YourScore <span class="range-value">1</span>
</div>
<div class="col-3">
<a data-toggle="collapse" href="#ScoreComment_@i" role="button" aria-expanded="false" aria-controls="collapseExample">
<div class="fs-3x text-center text-info"><i class="la la-comment-o"></i></div>
</a>
</div>
<div class="col-12 bg-info SubQuestion" style="display:none">
<h1>Result</h1>
</div>
<div class="col-12">
<div class="collapse my-1" id="ScoreComment_@i">
@Html.TextAreaFor(model => model.QuestionAndAnswer[i].Ans_Score_Note, new { @class = "form-control p-1 w-100", @maxlength = "4000", @rows = "4", @placeholder = "توضیحات" })
</div>
</div>
</div>
<script>
$(function ($) {
console.log($.ajax);
$('.input-range').on('change', function () {
$(this).next('.range-value').html(this.value);
var questionId = $(this).attr("id");
var QAScore = $(this).attr("tag");
var rangevalue = $(this).nextAll('.range-value').first().text();
if (rangevalue < QAScore) {
$.ajax({
url: "/Question/GetSubQuestion",
type: "POST",
datatype: "json",
data: { QuestionId: questionId },
success: function (data) {
$(this).next(".SubQuestion").html(data);
$(this).next(".SubQuestion").show();
}
});
}
else {
$(this).parent().nextAll(".SubQuestion").hide();
}
});
});
</script>