Commit graph

145 commits

Author SHA1 Message Date
Jeremiah Shirk
15f7567389 Allow HTTP version to be absent in apache logs of HTTP/1.0 requests 2012-06-18 04:18:16 -04:00
Jeremiah Shirk
18307bdca0 Apache log can have "-" for the request on a 408 (timeout) 2012-06-18 04:17:37 -04:00
Jeremiah Shirk
6c1b208ab9 Add ; and = to support URI path segment parameters
RFC 3986 (the URI specification) describes the , ; and =
characters used for including parameters in path segments.
Typically these are seen only on the final segment, just before
any query parameters, i.e.
    http://www.site.com/path1/path2;jsessionid=OI24B9ASD7BSSD

Adding ; and = to the regex, as , is already included
2012-06-18 04:16:49 -04:00
prune998
c1c1f443c8 Changed the PROG pattern to match Cisco PROG name starting with a percent (%).
Description : 
Usual syslog message :
<85>Jun 14 15:19:47 localhost sudo:     root : TTY=pts/1 ; PWD=/opt/logstash ; USER=root ; COMMAND=/bin/bash

Cisco typical message :
<166> Jun 14 15:30:00 10.100.252.52 %ASA-6-302021:  Teardown ICMP connection for faddr 10.100.120.120/0 gaddr 10.100.252.1/0 laddr 10.100.252.1/0

----> program name start with a %

Can be reproduced sending a manual syslog message with python script :


import logging
from logging.handlers import SysLogHandler

#message='Jun 14 15:19:47 localhost sudo:     root : TTY=pts/1 ; PWD=/opt/logstash ; USER=root ; COMMAND=/bin/bash'
message=' Jun 15 09:47:36 10.100.252.1 %ASA-6-111116:  Teardown UDP connection 6201992 for internet:192.168.1.1/1026 to interne:10.100.120.120/427 duration 0:02:04 bytes 588'

logger = logging.getLogger()
logger.setLevel(logging.INFO)
syslog = SysLogHandler(address=('localhost',5544))
#syslog = SysLogHandler(address='/dev/log')
#formatter = logging.Formatter('%(name)s: %(levelname)s %(message)s')
#syslog.setFormatter(formatter)
logger.addHandler(syslog)
logger.warning(message)

Leading to a "NOT SYSLOG" message in the logs and no @fields{} values

With this change the fields are OK and "NOT SYSLOG" message is gone. I still have a "@tags":["_grokparsefailure"], error though...
2012-06-15 11:43:13 -03:00
Nicholas Padilla
6644013a07 Merge remote-tracking branch 'upstream/master'
Conflicts:
	CONTRIBUTORS
	Makefile
	lib/logstash/outputs/elasticsearch_http.rb
	lib/logstash/outputs/sns.rb
	test/logstash/outputs/sns_test.rb
	test/test_helper.rb
2012-05-22 10:04:17 -06:00
Jordan Sissel
b9c8d269f5 - Fix QUOTEDSTRING pattern (LOGSTASH-446)
In some cases, Onigiruma gets confused about negative matches, so
  previously a pattern of '%{QS} something', if false match, would
  cause Oniguruma to loop frantickly. I haven't yet dug into
  the part of Oni that does this, but it's common that some regexp
  engines have this behavior. Easy fix moving to non-backtracking
  matches..
2012-05-13 01:14:43 -07:00
Nicholas Padilla
473fa4541a rebase with upstream/master 2012-05-10 08:55:33 -06:00
Aaron Blew
f4ddbc051c Added UUID type
Added {} to URIPATH and URIPARAM patterns
2012-05-04 16:02:25 -07:00
Jordan Sissel
67495940b8 Merge pull request #134 from shaftoe/master
Adding a grok pattern that I use to parse log levels (INFO, Warning, err, ...)
2012-04-28 18:57:04 -07:00
Robin Bowes
df33b88f3a Add ; to chars allowed in URIPATH 2012-04-17 14:18:43 +00:00
Alexander Fortin
670c99ec87 Adding LOGLEVEL to grok-patterns 2012-03-31 18:31:57 +02:00
Jordan Sissel
b6bb443a59 Merge pull request #89 from knuckolls/haproxy-fix
fixed haproxy pattern for httplog and tcplog (LOGSTASH-376)
2012-01-30 09:39:30 -08:00
Kevin Nuckolls
32fd1e96f2 fixed haproxy pattern for httplog and tcplog 2012-01-23 22:13:08 -06:00
Jelle Smet
3f3707d060 Extended Nagios rules 2012-01-20 21:37:06 +01:00
Jelle Smet
5514388117 Added space filter 2012-01-20 21:35:56 +01:00
Jordan Sissel
1c9b2ff4c9 - merge ruby-grok's pattern data in again after some fixes 2011-12-17 15:25:36 -08:00
Jordan Sissel
eb5fe56129 - clean up the MONTHDAY pattern
- use logging in grok
- add some todos
2011-10-18 00:15:06 -07:00
Jordan Sissel
f2460ad186 - reorder MONTHNUM for most common match 2011-10-17 23:36:07 -07:00
Jordan Sissel
7d659da783 - convert to using pure-ruby grok
- enable multithreaded filtering for now
2011-08-20 01:55:06 -07:00
Jordan Sissel
83fbdbdd93 - fix haproxy pattern (syslog pattern name changed) 2011-07-30 11:30:13 -07:00
Pete Fritchman
ae5a141935 allow apache access logs with an invalid referer: field 2011-05-21 00:37:38 -07:00
Tello, Inc
b60dc12548 Add a custom grok pattern for parsing MySQL slow query log datetimes 2011-01-27 06:39:01 +00:00
ec2
c09d5e2021 Add new grok pattern for matching dates like 'Wed Dec 08 19:57:42 -0800 2010' which are found in rails logs 2011-01-22 09:56:59 +00:00
Jordan Sissel
fc885e819c - Update java patterns to work properly (tested with actual stack
traces)
2010-11-20 10:12:44 +00:00
Jordan Sissel
d34c4b8358 - Add java patterns 2010-11-20 01:58:34 -08:00
Jordan Sissel
1a2ca3fc28 - Add some nagios patterns 2010-11-11 07:37:07 +00:00
Jordan Sissel
65a115fee6 - Add support for iso8601 timestamps in syslog messages 2010-11-09 10:22:25 +00:00
Jordan Sissel
57f480adeb - Make TZ in DATESTAMP_OTHER optional
- Add more debugging to filters/grok to make it easier to see pattern compile problems.
- Add percentage progress to rate.sh (for tracking long imports on logstash)
- Add content-type to the webserver
- Update to web interface to use new @-prefixed notation (@message, etc)
2010-10-31 08:59:28 +00:00
Jordan Sissel
d2f8cadc50 - add Logger support 2010-10-28 19:05:14 +00:00
Jordan Sissel
2053ceabcb - revert :port addition 2010-10-28 10:59:08 +00:00
Jordan Sissel
b8358e6004 - Add '_' to valid characters in URI paths and query parameters 2010-10-28 10:49:44 +00:00
Jordan Sissel
953fadeb80 - Import from grok svn r3079 (all pattern tests passing) 2010-10-28 09:20:07 +00:00
Jordan Sissel
4aea3bddb3 - Sync grok-patterns from grok svn HEAD. 2010-05-18 08:11:06 +00:00
Jordan Sissel
32ca7fbaea - copy grok patterns again 2010-04-14 09:19:21 +00:00
Jordan Sissel
cbfa08081d - Copy new patterns from grok 2010-04-14 07:42:33 +00:00
Jordan Sissel
473ee8cd74 - Add ':' to URIPATH 2009-10-25 09:46:00 +00:00
Jordan Sissel
78cfbff565 - uri paths can have /[@{}]/ in it 2009-10-25 04:26:10 +00:00
Jordan Sissel
4abe95037a - syslog program names can have periods or underscores 2009-10-23 16:57:27 +00:00
Pete Fritchman
27204e825b - remove some debugging cruft
- remove sample agent.redhat.rb; sample config is the same thing
- indexers now broadcast to each other and build up a directory
- indexers respond to a directory request and provide a list of indexers
- move some errors/usage messages to $stderr
- refactor search.rb to query all available indexers
2009-10-18 23:38:35 +00:00
Jordan Sissel
3b8a9416b6 - Add cron patterns to linux-syslog 2009-09-19 10:06:49 +00:00
Jordan Sissel
4b870cc9fd - add haproxy bits 2009-09-11 10:54:57 +00:00
Pete Fritchman
40f830d85a - capture pid in SYSLOGPROG
- add some linux-syslog patterns
- sample config for linux-syslog
2009-08-10 02:13:05 +00:00
Pete Fritchman
ee69c120c7 - OK, so I'm crazy. File load order does not matter, and it shouldn't. 2009-08-10 02:05:58 +00:00
Pete Fritchman
3d1745efc4 - work around a weird grok bug (?), load patterns in sort order, and
always load the grok-patterns first
2009-08-10 01:59:51 +00:00
Pete Fritchman
f622532240 - move grok-patterns to patterns/ subdir
- load all pattern files under patterns/
- grok captures don't include @LINE, so put it there ourselves
- properly filter grok captures per comments
- tear out grok cmdline stuff
- switch to seconds since epoch for @DATE
- add firewalls pattern with initial netscreen session close pattern
2009-08-09 20:40:36 +00:00