{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/logstash/issues/1831","repository_url":"https://api.github.com/repos/elastic/logstash","labels_url":"https://api.github.com/repos/elastic/logstash/issues/1831/labels{/name}","comments_url":"https://api.github.com/repos/elastic/logstash/issues/1831/comments","events_url":"https://api.github.com/repos/elastic/logstash/issues/1831/events","html_url":"https://github.com/elastic/logstash/issues/1831","id":44709842,"number":1831,"title":"Feature Request: load_config pattern","user":{"login":"cdenneen","id":720097,"avatar_url":"https://avatars.githubusercontent.com/u/720097?v=3","gravatar_id":"","url":"https://api.github.com/users/cdenneen","html_url":"https://github.com/cdenneen","followers_url":"https://api.github.com/users/cdenneen/followers","following_url":"https://api.github.com/users/cdenneen/following{/other_user}","gists_url":"https://api.github.com/users/cdenneen/gists{/gist_id}","starred_url":"https://api.github.com/users/cdenneen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdenneen/subscriptions","organizations_url":"https://api.github.com/users/cdenneen/orgs","repos_url":"https://api.github.com/users/cdenneen/repos","events_url":"https://api.github.com/users/cdenneen/events{/privacy}","received_events_url":"https://api.github.com/users/cdenneen/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/elastic/logstash/labels/discuss","name":"discuss","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2014-10-02T16:48:56Z","updated_at":"2016-03-09T01:38:16Z","closed_at":null,"body":"If deemed valuable to others:\r\n\r\nWould it be possible for someone with ruby experience to update the globbing of configs to be *.conf (might be just as simple as changing line 288 of agent.rb). This would allow you to also keep backups of old configs or move configs out of the way if you want to piecemeal during testing which configs are live. (luckily the added bonus even with * is that private directories like .git aren't sourced so the entire logstash/conf.d can be under version control)\r\n\r\n```ruby\r\n    287   def load_config(path)\r\n    288     path = File.join(path, \"*\") if File.directory?(path)\r\n    289\r\n    290     if Dir.glob(path).length == 0\r\n    291       fail(I18n.t(\"logstash.agent.configuration.file-not-found\", :path => path))\r\n    292     end\r\n    293\r\n    294     config = \"\"\r\n    295     Dir.glob(path).sort.each do |file|\r\n    296       next unless File.file?(file)\r\n    297       if file.match(/~$/)\r\n    298         @logger.debug(\"NOT reading config file because it is a temp file\", :file => file)\r\n    299         next\r\n    300       end\r\n    301       @logger.debug(\"Reading config file\", :file => file)\r\n    302       config << File.read(file) + \"\\n\"\r\n    303     end\r\n    304     return config\r\n    305   end # def load_config\r\n```"},"comment":{"url":"https://api.github.com/repos/elastic/logstash/issues/comments/194058657","html_url":"https://github.com/elastic/logstash/issues/1831#issuecomment-194058657","issue_url":"https://api.github.com/repos/elastic/logstash/issues/1831","id":194058657,"user":{"login":"suyograo","id":1595958,"avatar_url":"https://avatars.githubusercontent.com/u/1595958?v=3","gravatar_id":"","url":"https://api.github.com/users/suyograo","html_url":"https://github.com/suyograo","followers_url":"https://api.github.com/users/suyograo/followers","following_url":"https://api.github.com/users/suyograo/following{/other_user}","gists_url":"https://api.github.com/users/suyograo/gists{/gist_id}","starred_url":"https://api.github.com/users/suyograo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/suyograo/subscriptions","organizations_url":"https://api.github.com/users/suyograo/orgs","repos_url":"https://api.github.com/users/suyograo/repos","events_url":"https://api.github.com/users/suyograo/events{/privacy}","received_events_url":"https://api.github.com/users/suyograo/received_events","type":"User","site_admin":false},"created_at":"2016-03-09T01:38:16Z","updated_at":"2016-03-09T01:38:16Z","body":"@jordansissel WDYT?"}}