Comments (3)
Curious - I'd be interested to see how that pans out!
from puppet-beats.
I have pushed a new branch where I have done some rework on the Filebeat part of the project.
The module is now using 100% Puppet Hashes for configuration and writing the config file is done by this piece of code:
# Filebeat config
class beats::filebeat::config{
$shipper_data_template = {
shipper => {
ignore_outgoing => true,
name => $::fqdn,
refresh_topology_freq => '10',
}
}
$shipper= deep_merge($shipper_data_template, $beats::shipper_data)
$prospectors = $beats::filebeat::prospectors
$outputs = $beats::filebeat::outputs
$filebeat_conf = merge($prospectors,$outputs,$shipper)
file {'/etc/filebeat/filebeat.yml':
ensure => present,
content => inline_template('<%= @filebeat_conf.to_yaml %>'),
}
}
$shipper_data_template
is a example of creating a default hash if you want some default values for pieces of your config file. The rest of the magic is provided by hash merge and <%= @filebeat_conf.to_yaml %>
This makes is really simple and remove a lot of pain regarding erb templates(spaces, newlines). Furthermore it allows us to handle changes in the Beat product, without the need to update .pp and .erb files.
I would like some feedback before I will rework the rest of the module.
from puppet-beats.
Could someone have a look and test the brance I created?
from puppet-beats.
Related Issues (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-beats.