mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 22:57:16 -04:00
update regexp example & test
This commit is contained in:
parent
0b23d59e87
commit
70ebef9c83
2 changed files with 3 additions and 3 deletions
|
@ -21,7 +21,7 @@ filters:
|
||||||
- nagios
|
- nagios
|
||||||
- test
|
- test
|
||||||
- match:
|
- match:
|
||||||
message: r/foo.*bar/i
|
message: (?i)foo.*bar
|
||||||
program: test
|
program: test
|
||||||
add_fields:
|
add_fields:
|
||||||
nagios_alert: foo_alert
|
nagios_alert: foo_alert
|
||||||
|
|
|
@ -67,7 +67,7 @@ class TestFilterGrep < Test::Unit::TestCase
|
||||||
|
|
||||||
def test_single_match_regexp
|
def test_single_match_regexp
|
||||||
test_name "single_match_regexp"
|
test_name "single_match_regexp"
|
||||||
config [{"match" => {"str" => /test.*foo/i}}]
|
config [{"match" => {"str" => "(?i)test.*foo"}}]
|
||||||
|
|
||||||
event = LogStash::Event.new
|
event = LogStash::Event.new
|
||||||
event.type = @typename
|
event.type = @typename
|
||||||
|
@ -78,7 +78,7 @@ class TestFilterGrep < Test::Unit::TestCase
|
||||||
|
|
||||||
def test_single_match_regexp_drop
|
def test_single_match_regexp_drop
|
||||||
test_name "single_match_regexp_drop"
|
test_name "single_match_regexp_drop"
|
||||||
config [{"match" => {"str" => /test.*foo/}}]
|
config [{"match" => {"str" => "test.*foo"}}]
|
||||||
|
|
||||||
event = LogStash::Event.new
|
event = LogStash::Event.new
|
||||||
event.type = @typename
|
event.type = @typename
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue