Giter Site home page Giter Site logo

cookbook-logstash-forwarder's People

Contributors

dragonsmith avatar fishnix avatar gmccue avatar kasen avatar kwilczynski avatar legal90 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

cookbook-logstash-forwarder's Issues

Provider broken

When running chef with cookbook version 0.2.1, the chef run fails with the following error:

Recipe Compile Error in /var/cache/chef/cookbooks/logstash-forwarder/providers/default.rb

NoMethodError

undefined method `provides' for #Class:0x000000045b6540

Cookbook Trace:

/var/cache/chef/cookbooks/logstash-forwarder/providers/default.rb:9:in `class_from_file'

Relevant File Content:

/var/cache/chef/cookbooks/logstash-forwarder/providers/default.rb:

2: # Cookbook Name:: logstash-forwarder
3: # Provider:: log_forward
4: # Author:: Kirill Kouznetsov [email protected]
5: #
6: # Copyright (c) 2015, Parallels IP Holdings GmbH
7: #
8:
9>> provides :log_forward
10:
11: use_inline_resources if defined?(use_inline_resources)
12:
13: action :create do
14: end
15:

General question ?

You created and published on supermarket this cookbook 2 weeks ago.

But there is already a living logstash_forwarder cookbook for almost a year on Chef supermarket (ok the '_' in the name is not very good .. but that's not a problem) :

What are the goals and the differences with the existing one that leads you to write "yet-another-cookbook-for-**" ...
Maybe the first one was not good enough ? But why not trying to PR ?
Can you explain to the community your motivations ?

Thanks ! ๐Ÿ˜„

wrong number of arguments (1 for 0)

I am unable to get this recipe to work. Version 0.2.2 with Chef 11.10. It fails with the following error:

ArgumentError
-------------
wrong number of arguments (1 for 0)

Cookbook Trace:
---------------
/var/lib/aws/opsworks/cache.stage2/cookbooks/logstash-forwarder/resources/default.rb:9:in `class_from_file'

Relevant File Content:
----------------------
/var/lib/aws/opsworks/cache.stage2/cookbooks/logstash-forwarder/
     resources/default.rb:

2:  # Cookbook Name:: logstash-forwarder
3:  # Resource:: log_forward
4:  # Author:: ******************
5:  #
6:  # Copyright (c) 2015, Parallels IP Holdings GmbH
7:  #
8:  
9>> resource_name :log_forward
10:  provides :log_forward
11:  
12:  actions :create
13:  default_action :create
14:  
15:  attribute :paths, kind_of: Array, required: true
16:  attribute :fields, kind_of: Hash, default: {}, required: true

Cannot find a provider for log_forward

I have tried to use your cookbook like this:

node.set['logstash-forwarder']['logstash_servers'] = ['127.0.0.1:5043']

include_recipe 'logstash-forwarder'

log_forward 'nginx' do
  paths ['/var/log/nginx/access.log', '/var/log/nginx/error.log']
  fields types: 'nginx'
end

log_forward 'syslog' do
  paths ['/var/log/messages']
  fields types: 'syslog'
end

but it does not find the lwrp:

       [2015-07-02T11:33:34+00:00] WARN: Using an LWRP by its name (LogstashForwarder) directly is no longer supported in Chef 13 and will be removed.  Use Chef::Resource.resource_for_node(node, name) instead.

           - execute the ruby block get log_forward resources

           - update content in file /etc/logstash-forwarder.conf from 4ae3d6 to 34c23b
           --- /etc/logstash-forwarder.conf 2015-07-02 11:30:34.598356221 +0000

           @@ -6,6 +6,6 @@
         "timeout": 15
          },

           -  "files": [{"paths":["/var/log/messages"],"fields":{"types":"syslog"}}]
           +  "files": [{"paths":["/var/log/nginx/access.log","/var/log/nginx/error.log"],"fields":{"types":"nginx"}},{"paths":["/var/log/messages"],"fields":{"types":"syslog"}}]

        (up to date)
        (up to date)
       Recipe: asy-logstash::default


           ================================================================================
           Error executing action `create` on resource 'log_forward[nginx]'
           ================================================================================

           ArgumentError
           -------------
           Cannot find a provider for log_forward[nginx] on ubuntu version 14.04

           Resource Declaration:
           ---------------------
           # In /tmp/kitchen/cookbooks/asy-logstash/recipes/default.rb

            44: log_forward 'nginx' do
            45:   paths ['/var/log/nginx/access.log', '/var/log/nginx/error.log']
            46:   fields types: 'nginx'
            47: end
            48: 


           ------------------
           # Declared in /tmp/kitchen/cookbooks/asy-logstash/recipes/default.rb:44:in `from_file'

           log_forward("nginx") do
             action :create
             retries 0
             retry_delay 2
             default_guard_interpreter :default
             declared_type :log_forward
             cookbook_name :"asy-logstash"
             recipe_name "default"
             paths ["/var/log/nginx/access.log", "/var/log/nginx/error.log"]
             fields {:types=>"nginx"}
           end

       Recipe: logstash-forwarder::default



       Running handlers:
       [2015-07-02T11:33:34+00:00] ERROR: Running exception handlers
       Running handlers complete
       [2015-07-02T11:33:34+00:00] ERROR: Exception handlers complete
       Chef Client failed. 7 resources updated in 17.087332162 seconds
       [2015-07-02T11:33:34+00:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out
       [2015-07-02T11:33:34+00:00] ERROR: log_forward[nginx] (asy-logstash::default line 44) had an error: ArgumentError: Cannot find a provider for log_forward[nginx] on ubuntu version 14.04
       [2015-07-02T11:33:34+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

Opsworks error undefined method 'source_url'

I was trying to set up this cookbook on an AWS Opsworks environment but it failed with the following error:

ERROR: Could not read /opt/aws/opsworks/current/merged-cookbooks/logstash-forwarder into a Chef object: undefined method `source_url'

(currently Opsworks running off Chef 11.10.4, Berkshelf 3.2.0)

I just wanted to make you aware of this and it might help other people who might bump into this issue.
I don't know what could be done about it at the moment.

It looks like other cookbooks are having the same issue:
sous-chefs/aws#122

Changes to node['logstash-forwarder']['config_path'] not fully honored.

Changing the value of the config_path attribute changes the location to which the config file is written but it does not update the init.d script so the service continues to look for the file in the default location. Either the config path should not be exposed as an attribute (which suggests it is modifiable) or changes to it need to be fully honored. Since I am trying to change it, obviously I prefer the latter.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.