mirror of
				https://github.com/krislamo/puppet-fluentd
				synced 2025-11-04 02:38:35 +00:00 
			
		
		
		
	Implemented <parse>, <storage> etc sections within fluentd::source template
- Changed templates/source.erb to accept Hash elements within 'config' - Updated source_spec test - Updated README.md
This commit is contained in:
		@@ -18,6 +18,14 @@ describe 'fluentd::source' do
 | 
			
		||||
                'type'   => 'tail',
 | 
			
		||||
                'format' => 'json',
 | 
			
		||||
                'path'   => '/var/log/test-application/*.json',
 | 
			
		||||
                'parse'  => {
 | 
			
		||||
                    'type'       => 'regexp',
 | 
			
		||||
                    'expression' => '^(?<name>[^ ]*) (?<user>[^ ]*) (?<age>\d*)$'
 | 
			
		||||
                },
 | 
			
		||||
                'storage'=> {
 | 
			
		||||
                    'type'   => 'local',
 | 
			
		||||
                    'path'   => 'test.pos'
 | 
			
		||||
                },
 | 
			
		||||
                'tag'    => 'application.test'
 | 
			
		||||
              }
 | 
			
		||||
          }
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										8
									
								
								spec/fixtures/files/source_tail.conf
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										8
									
								
								spec/fixtures/files/source_tail.conf
									
									
									
									
										vendored
									
									
								
							@@ -2,5 +2,13 @@
 | 
			
		||||
  type tail
 | 
			
		||||
  format json
 | 
			
		||||
  path /var/log/test-application/*.json
 | 
			
		||||
  <parse>
 | 
			
		||||
    type regexp
 | 
			
		||||
    expression ^(?<name>[^ ]*) (?<user>[^ ]*) (?<age>\d*)$
 | 
			
		||||
  </parse>
 | 
			
		||||
  <storage>
 | 
			
		||||
    type local
 | 
			
		||||
    path test.pos
 | 
			
		||||
  </storage>
 | 
			
		||||
  tag application.test
 | 
			
		||||
</source>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user