{"id":20366,"date":"2016-02-22T17:03:47","date_gmt":"2016-02-22T10:03:47","guid":{"rendered":"https:\/\/kitty.in.th\/?p=20366"},"modified":"2016-12-05T16:32:16","modified_gmt":"2016-12-05T09:32:16","slug":"graylog-extractor-for-fortigate-firewall","status":"publish","type":"post","link":"https:\/\/kitty.in.th\/index.php\/2016\/02\/22\/graylog-extractor-for-fortigate-firewall\/","title":{"rendered":"Graylog Extractor for Fortigate Firewall"},"content":{"rendered":"<p>I&#8217;ve been using Graylog in production for awhile. It&#8217;s a great log analysis tool, backed by elasticsearch. Conceptually, graylog is pretty much like splunk. I consolidate approximately 170-200 million log messages to graylog everyday. So, I need to optimize them well enough.<\/p>\n<p>Few days ago, I started to use\u00a0Fortigate extractors from a git repo. It uses regex, and it is very slow.\u00a0So I (have to) write my own extractors.\u00a0I write Grok pattern, and keep rewriting until I could cover all messages I need to extract. Then, I started to optimize the pattern. The result is quite good though. I could reduce extractor time from more than 100,000 usec to about 100 usec.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-20382 aligncenter\" src=\"https:\/\/kitty.in.th\/wp-content\/uploads\/2016\/02\/extractor.jpg\" alt=\"extractor\" width=\"771\" height=\"319\" srcset=\"https:\/\/kitty.in.th\/wp-content\/uploads\/2016\/02\/extractor.jpg 771w, https:\/\/kitty.in.th\/wp-content\/uploads\/2016\/02\/extractor-96x40.jpg 96w, https:\/\/kitty.in.th\/wp-content\/uploads\/2016\/02\/extractor-300x124.jpg 300w, https:\/\/kitty.in.th\/wp-content\/uploads\/2016\/02\/extractor-768x318.jpg 768w\" sizes=\"auto, (max-width: 771px) 100vw, 771px\" \/><\/p>\n<p>Yes, that&#8217;s approximately 1000x times faster. It&#8217;s definitely not perfect though, but it works for me. If you think it might be good for you, you can download my Fortigate content pack <a href=\"ftp:\/\/ftp.kitty.in.th\/pub\/sources\/graylog\/fortigate_content_pack.json\">here<\/a>.<\/p>\n<p>Enjoy :)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve been using Graylog in production for awhile. It&#8217;s a great log analysis tool, backed by elasticsearch. Conceptually, graylog is pretty much like splunk. I consolidate approximately 170-200 million log messages to graylog everyday. So, I need to optimize them well enough. Few days ago, I started to use\u00a0Fortigate extractors from a git repo. It &hellip; <a href=\"https:\/\/kitty.in.th\/index.php\/2016\/02\/22\/graylog-extractor-for-fortigate-firewall\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Graylog Extractor for Fortigate Firewall<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[85,86],"tags":[92,322,5],"class_list":["post-20366","post","type-post","status-publish","format-standard","hentry","category-blog","category-lab","tag-foss","tag-graylog","tag-linux"],"_links":{"self":[{"href":"https:\/\/kitty.in.th\/index.php\/wp-json\/wp\/v2\/posts\/20366","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kitty.in.th\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kitty.in.th\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kitty.in.th\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kitty.in.th\/index.php\/wp-json\/wp\/v2\/comments?post=20366"}],"version-history":[{"count":2,"href":"https:\/\/kitty.in.th\/index.php\/wp-json\/wp\/v2\/posts\/20366\/revisions"}],"predecessor-version":[{"id":20387,"href":"https:\/\/kitty.in.th\/index.php\/wp-json\/wp\/v2\/posts\/20366\/revisions\/20387"}],"wp:attachment":[{"href":"https:\/\/kitty.in.th\/index.php\/wp-json\/wp\/v2\/media?parent=20366"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kitty.in.th\/index.php\/wp-json\/wp\/v2\/categories?post=20366"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kitty.in.th\/index.php\/wp-json\/wp\/v2\/tags?post=20366"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}