Comments (6)
Is Filebeat not starting correctly or not parsing the files correctly? Both formats are valid YAML arrays, but not all YAML parsers are the same. It's not hard to fix, but I want to make sure that there isn't some other error going on with the config file.
Any chance you can include the relevant part of your manifest that's creating the config file example you included?
from puppet-filebeat.
There's a chance that this is caused because the lines weren't wrapped in quotes. Could you try the include_exclude_fix branch to see if that works as expected too?
from puppet-filebeat.
Filebeat is not parsing the file correctly in the sense that it includes all of the entries in syslog, not just the ones in include_lines.
First try was with
include_lines: - ["balbla\\["] - ["randomword"]
Second try did job
include_lines: ["balbla\\[", "randomword"]
I did not had the time to test the other branch.
from puppet-filebeat.
I should have noticed the issue earlier - do you have any idea where the square brackets around "randomword" are coming from? They're not in the template, so I'm not sure where they're coming from.
Do you know what version of filebeat you're using, and a copy of the test manifest might help too since I'm not able to re-create the issue.
from puppet-filebeat.
The square brackets came from my declaration and it seems that it was the problem
include_lines => [ '["balbla\\["]', '["randomword"]', ]
But in that case it seemed to me that it should not match at all and not match all lines. Thus I thought it was a problem in the yaml that needed fixing. Sorry for wasting your time.
from puppet-filebeat.
I think that the square brackets made the YAML parser think that each line was an array. Wrapping the lines in quotes should help with that, so I'll merge in the branch as extra protection against problems like this in the future.
Thanks for helping find a weak point.
from puppet-filebeat.
Related Issues (20)
- 7.5+ Common Input Parameters HOT 1
- bump puppet-archive dependency HOT 1
- registry options dont work with Filebeat6
- the modules config is not working properly HOT 1
- Wrong default for registry_path
- versioncmp in params.pp HOT 4
- YAML indent is wrong on parser multipath and tail_files is not valid for filestream HOT 2
- Autodiscover is not available in any tag release HOT 7
- New release HOT 1
- filebeat config pure_hash HOT 2
- Fix operators for windowsOS versioncmp check
- Support for filebeat 8 on windows for validate cmd HOT 1
- wrong tag for release 4.13.0 HOT 2
- Filestream not fully implemented HOT 3
- upgrading filebeat major_version takes multiple puppet runs
- [4.14.0] no support for module enable HOT 1
- json configuration not recognized anymore HOT 5
- update module to be compatible with stdlib 9.x HOT 1
- Allow powershell module 6.0.0?
- puppet-archive version HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puppet-filebeat.