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

How do I add the new conditionals in the Chef config? #4

Open
iandexter opened this issue Dec 28, 2014 · 0 comments
Open

How do I add the new conditionals in the Chef config? #4

iandexter opened this issue Dec 28, 2014 · 0 comments

Comments

@iandexter
Copy link
Contributor

How do I use the new conditional for "type" in the Chef configuration?

I currently use the following config:

...
    "agent": {
      "inputs": [
        {
          "file": {
            "path": ["/var/log/nginx/*log"],
            "exclude": ["*.gz"],
            "type": "nginx-access",
            "start_position": "beginning"
          }
        }
      ],
      "filters": [
        {
          "grok": {
            "type": "nginx-access",
            "match": [ "message", "%{IPORHOST:remote_addr} - %{USER:remote_user} \\[%{HTTPDATE:timestamp}\\] \\\"(?:%{WORD:http_verb} %{NOTSPACE:http_request}(?: HTTP/%{NUMBER:http_version})?|%{DATA:raw_http_request})\\\" %{NUMBER:http_status_code} (?:%{NUMBER:bytes_read}|-) %{QS:http_referer} %{QS:http_user_agent}"]
          }
        }
      ],
...

It appears to work, but I'm getting this in the logs:

{:timestamp=>"2014-12-28T13:10:20.495000+0000", :message=>"You are using a deprecated config setting \"type\" set in grok. Deprecated settings will continue to work, but are scheduled for removal from logstash in the future. You can achieve this same behavior with the new conditionals, like: `if [type] == \"sometype\" { grok { ... } }`. If you have any questions about this, please visit the #logstash channel on freenode irc.", :name=>"type", :plugin=><LogStash::Filters::Grok --->, :level=>:warn}

Thanks.

kyle-house-sp pushed a commit to kyle-house-sp/chef-logstash that referenced this issue Mar 6, 2015
Never add token field to cloudtrail messages (closes wearethefoos#4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant