Skip to content

Commit

Permalink
Forgot a fix (+4 squashed commits)
Browse files Browse the repository at this point in the history
Squashed commits:
[c5ff92f] Wrong MAC example
[3ff10c5] Apply the right pattern
[0124b99] Fix typo
[10e639d] Remove encoding
  • Loading branch information
matejzero committed Apr 14, 2016
1 parent 269f88e commit a77e23d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions dhcpd.grok
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ DHCPD_AAI_DISCOVER DHCPDISCOVER from %{MAC:mac} via %{IP:via}:( network %{DATA:s
# 1 DHCPDECLINE of 10.0.3.106 from 00:25:b3:bf:94:88 (iPhone) via 10.0.0.1: abandoned
DHCPD_AAI_DECLINE DHCPDECLINE of %{IP:client} from %{MAC:mac}( %{DATA})? via %{IP:via}: %{GREEDYDATA:error}

# 1 DHCPREQUEST for 1.2.3.4 (10.1.20.1) from a0:38:f7:4s:85:1b via 192.168.1.10: lease owned by peer
# 1 DHCPREQUEST for 1.2.3.4 (10.1.20.1) from a0:38:f7:4a:85:1b via 192.168.1.10: lease owned by peer
DHCPD_AAI_DHCPREQUEST DHCPREQUEST for %{IP:client} \(%{IP:dhcp_server}\) from %{MAC:mac} via %{IP:via}: %{GREEDYDATA:error}

DHCPD (%{DHCPD_AAI_CLIENT}|%{DHCPD_AAI_DISCOVER}|%{DHCPD_AAI_DECLINE|DHCPD_AAI_DHCPREQUEST})
DHCPD (%{DHCPD_AAI_CLIENT}|%{DHCPD_AAI_DISCOVER}|%{DHCPD_AAI_DECLINE}|%{DHCPD_AAI_DHCPREQUEST})

6 changes: 3 additions & 3 deletions test/dhcpd_0005.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
pattern: DHCPD_AAI_DECLINE
data: "DHCPREQUEST for 1.2.3.4 (10.1.20.1) from a0:38:f7:4s:85:1b via 192.168.1.10: lease owned by peer"
pattern: DHCPD_AAI_DHCPREQUEST
data: "DHCPREQUEST for 1.2.3.4 (10.1.20.1) from a0:38:f7:4a:85:1b via 192.168.1.10: lease owned by peer"
results:
client: "1.2.3.4"
dhcp_server: "10.1.20.1"
mac: "a0:38:f7:4s:85:1b"
mac: "a0:38:f7:4a:85:1b"
via: "192.168.1.10"
error: "lease owned by peer"
2 changes: 1 addition & 1 deletion test/test.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
encoding: utf-8
#encoding: utf-8
require 'rubygems'
require 'minitest/autorun'
require 'grok-pure'
Expand Down

0 comments on commit a77e23d

Please sign in to comment.