Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Extractor for msg_id: 1AFF-0018 #48

Open
uclnj opened this issue Sep 1, 2019 · 3 comments
Open

Add Extractor for msg_id: 1AFF-0018 #48

uclnj opened this issue Sep 1, 2019 · 3 comments
Assignees
Labels
extractor this issue is related to a new or existing extractor

Comments

@uclnj
Copy link

uclnj commented Sep 1, 2019

http://www.watchguard.com/help/docs/fireware/12/en-US/log_catalog/index.html#log-messages/proxy_msgs.html?Highlight=1AFF0018

msg_id: 1AFF-0018

Sep 1 09:24:18 NAME SERIAL (2019-09-01T13:24:18) http-proxy[3376]: msg_id="1AFF-0018" Allow 0-FIOS 1-Trusted tcp 1.2.3.4 5.6.7.8 65149 80 msg="ProxyAllow: HTTP Content Type match" proxy_act="Proxy-Rule" rule_name="Default" content_type="text/html" (proxy-name-00)

Graylog Version: 3.1

Getting some 30K of these a day.

@uclnj uclnj added the extractor this issue is related to a new or existing extractor label Sep 1, 2019
@ThoZed
Copy link
Owner

ThoZed commented Sep 2, 2019

Hey uclnj,

have a try with the following extractor, if it's fine i'll include it in the next commit.

-> Please import following extractor in System/input/manageextractors/action/import...

{ "extractors": [ { "title": "Proxy HTTP INFO 1AFF-0018", "extractor_type": "grok", "converters": [], "order": 14, "cursor_strategy": "copy", "source_field": "message", "target_field": "", "extractor_config": { "grok_pattern": "^.* %{NOTSPACE:action} %{NOTSPACE:srcif} %{NOTSPACE:dstif} %{NOTSPACE:protocol} %{IPV4:srcip} %{IPV4:dstip} %{BASE10NUM:srcport} %{BASE10NUM:dstport} msg=\"%{DATA:proxy_msg}\" proxy_act=\"%{DATA:proxy_action}\" rule_name=\"%{DATA:rule_name}\"((?:\\s+(geo_src=\"%{DATA:geo_src}\"|geo_dst=\"%{DATA:geo_dst}\")?)|\\()" }, "condition_type": "regex", "condition_value": "^.*msg_id=\"1AFF-0018\".*" } ], "version": "3.1.0" }

@uclnj
Copy link
Author

uclnj commented Sep 2, 2019

Looks good - I added a content_type="%{DATA:content_type}" to grab the content type when identified by the proxy. Will the extractor care if there is data there or not? Some proxies report in as content_type="" or content_type="text/html" and content_type="video/MP2T".

@ThoZed
Copy link
Owner

ThoZed commented Sep 2, 2019

ah, I just missed content_type :-)
that's fine if it works for now. Just checked the GROK Pattern "DATA". Its the regex for .*? which matches also if nothing is there.

Nearly every extractor is created like that, feel free to contribute.
have a nice day

@ThoZed ThoZed self-assigned this Sep 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extractor this issue is related to a new or existing extractor
Projects
None yet
Development

No branches or pull requests

2 participants