Skip to content

Commit

Permalink
Speed up dhcpd.mtail by removing backtracking.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaqx0r committed Jul 3, 2019
1 parent 204dce0 commit cab98ff
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions docs/Language.md
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,4 @@ But for more useful situations, perhaps stopping if the log filename doesn't mat
getfilename() !~ /apache.access.log/ {
stop
}
...
```
2 changes: 1 addition & 1 deletion examples/dhcpd.mtail
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const MATCH_MAC /(?P<mac>([\da-f]{2}:){5}[\da-f]{2})/

@syslog {
# Request
/(balanced|balancing|BOOTREPLY|BOOTREQUEST|DHCPACK|DHCPDECLINE|DHCPDISCOVER|DHCPINFORM|DHCPNAK|DHCPOFFER|DHCPRELEASE|DHCPREQUEST)/ {
$message =~ /^(balanced|balancing|BOOTREPLY|BOOTREQUEST|DHCPACK|DHCPDECLINE|DHCPDISCOVER|DHCPINFORM|DHCPNAK|DHCPOFFER|DHCPRELEASE|DHCPREQUEST)/ {
# The lowercased name of the command matched in the regex is used to
# count the frequency of each command. An external collector can use
# this to compute the rate of each command independently.
Expand Down

0 comments on commit cab98ff

Please sign in to comment.