graylog-plugin-function-multimatch

Graylog graylog-plugin-function-multimatch plugin for matching against multiple conditions

Лицензия

Лицензия

Категории

Категории

Graylog Библиотеки уровня приложения Logging
Группа

Группа

de.hilling.graylog
Идентификатор

Идентификатор

graylog-plugin-function-multimatch
Последняя версия

Последняя версия

1.1.2
Дата

Дата

Тип

Тип

jar
Описание

Описание

graylog-plugin-function-multimatch
Graylog graylog-plugin-function-multimatch plugin for matching against multiple conditions
Ссылка на сайт

Ссылка на сайт

https://github.com/guhilling/graylog-plugin-function-multimatch
Система контроля версий

Система контроля версий

https://github.com/guhilling/graylog-plugin-function-multimatch

Скачать graylog-plugin-function-multimatch

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/de.hilling.graylog/graylog-plugin-function-multimatch/ -->
<dependency>
    <groupId>de.hilling.graylog</groupId>
    <artifactId>graylog-plugin-function-multimatch</artifactId>
    <version>1.1.2</version>
</dependency>
// https://jarcasting.com/artifacts/de.hilling.graylog/graylog-plugin-function-multimatch/
implementation 'de.hilling.graylog:graylog-plugin-function-multimatch:1.1.2'
// https://jarcasting.com/artifacts/de.hilling.graylog/graylog-plugin-function-multimatch/
implementation ("de.hilling.graylog:graylog-plugin-function-multimatch:1.1.2")
'de.hilling.graylog:graylog-plugin-function-multimatch:jar:1.1.2'
<dependency org="de.hilling.graylog" name="graylog-plugin-function-multimatch" rev="1.1.2">
  <artifact name="graylog-plugin-function-multimatch" type="jar" />
</dependency>
@Grapes(
@Grab(group='de.hilling.graylog', module='graylog-plugin-function-multimatch', version='1.1.2')
)
libraryDependencies += "de.hilling.graylog" % "graylog-plugin-function-multimatch" % "1.1.2"
[de.hilling.graylog/graylog-plugin-function-multimatch "1.1.2"]

Зависимости

provided (1)

Идентификатор библиотеки Тип Версия
org.graylog2 : graylog2-server jar 2.5.2

test (1)

Идентификатор библиотеки Тип Версия
org.junit.jupiter : junit-jupiter jar 5.5.2

Модули Проекта

Данный проект не имеет модулей.

Build Status Maven Central

graylog multimatch function

Graylog plugin for matching against multiple conditions

This plugin provides the function multimatch that can be used to test a message dynamically against conditions from a lookup function.

Usage

The lookup must yield a java List containing Map<String, String> objects.

The multimatch evalutation yields true if any of the maps matches the contained conditions.

The maps may conatain one or more pairs. The evalutation is done as follows:

  • If the message does not have a field matching the key, the result is false.
  • If the key is message the message field of the log message is compared via regexp matcher with the value.
  • In all other cases it is compared via Objects.equals().

Example

A rule could be written as follows:

rule "apply blacklists"
when
  multimatch(matcherMap: lookup("blacklist", $message.source))
then
  set_field("backlisted", true);
  route_to_stream(name: "Blacklisted", remove_from_default: true);
end

With the lookup table yielding a result like:

{
  "single_value": "source-system",
  "multi_value": {
    "value": [
      {
        "message": "^DEBUG: .*$"
      },
      {
        "message": "^INFO: .*$"
      }
    ]
  },
  "ttl": 9223372036854776000
}

multi_value will be used with the above rule. A message will match if starting with either DEBUGor INFO.

Future development

Probably. If you have any questions or proposals for enhancements please drop me a note.

Credits

LMIS AG for the development of this plugin.

LICENSE

Copyright 2018 Gunnar Hilling

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Версии библиотеки

Версия
1.1.2
1.1.1
1.1.0
1.0.3
1.0.2
1.0.1