使用Logstash查询Grok和Mutate插件

我正在尝试匹配通过Logstash提取的模式ES文档。 我将以下作为logstash conf的一部分,但是我看不到文档中添加了任何字段,也没有在日志中看到任何错误。

模式是指以小时为单位的持续时间,例如PT(小时)H。

示例:PT2856H

jQuery.fn.liScroll = function(settings) {
    settings = jQuery.extend({
        travelocity: 0.03
    },settings);
    return this.each(function() {
        var $strip = jQuery(this);
        $strip.addClass("newsticker")
        var stripHeight = 1;
        $strip.find("li").each(function(i) {
            stripHeight += jQuery(this,i).outerHeight(true); // thanks to Michael Haszprunar and Fabien Volpi
        });
        var $mask = $strip.wrap("<div class='mask'></div>");
        var $tickercontainer = $strip.parent().wrap("<div class='tickercontainer'></div>");
        var containerHeight = $strip.parent().parent().height(); //a.k.a. 'mask' width  
        $strip.height(stripHeight);
        var totalTravel = stripHeight;
        var defTiming = totalTravel / settings.travelocity; // thanks to Scott Waye     
        function scrollnews(spazio,tempo) {
            $strip.animate({
                top: '-=' + spazio
            },tempo,"linear",function() {
                $strip.css("top",containerHeight);
                scrollnews(totalTravel,defTiming);
            });
        }
        scrollnews(totalTravel,defTiming);
        $strip.hover(function() {
                jQuery(this).stop();
            },function() {
                var offset = jQuery(this).offset();
                var residualSpace = offset.top + stripHeight;
                var residualTime = residualSpace / settings.travelocity;
                scrollnews(residualSpace,residualTime);
            });
        $strip.on('wheel',function (e) {
            e.preventDefault();
            var offset = jQuery(this).offset();
            var delta = e.originalEvent.deltaY;
            var direction = Math.sign(delta);
            var sensitivity = 5;
            offset.top += direction * sensitivity;
            jQuery(this).offset(offset);
        });
    });
};

$(function() {
    $("ul#ticker01").liScroll();
});

我需要从字符串中提取数字,并在匹配模式时将其作为Elasticsearch文档中的新字段添加。 有人可以让我知道我在这里想念什么吗?

gyglove2008 回答:使用Logstash查询Grok和Mutate插件

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3165406.html

大家都在问