Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input resource #104

Open
wants to merge 12 commits into
base: api-support
Choose a base branch
from
Open

Input resource #104

wants to merge 12 commits into from

Conversation

aladmit
Copy link

@aladmit aladmit commented Oct 7, 2017

Hi! This is a draft of input resource.

The resource creates an input if it doesn't exist. If resource's attributes changed, input's configuration changes too.

Examples:

# You can create global input
graylog2_input 'global syslog' do
  type 'Syslog TCP' # use name of type instead of type_id
  settings(configuration: { bind_address: '0.0.0.0', port: 514 })
end

# Or for specific node
graylog2_input 'local syslog' do
  hostname 'graylog.local' # use hostname instead of node_id
  type 'Syslog TCP'
  settings(configuration: { bind_address: '0.0.0.0', port: 515 })
end

# Also, you can delete input by :delete action
graylog2_input 'local syslog' do
  action :delete
end

What do think about this realization?
If it's okay, I will move most of the ruby logic to the gem and write tests.

Signed-off-by: Andrey Aleksandrov <[email protected]>
Signed-off-by: Andrey Aleksandrov <[email protected]>
Signed-off-by: Andrey Aleksandrov <[email protected]>
Signed-off-by: Andrey Aleksandrov <[email protected]>
Signed-off-by: Andrey Aleksandrov <[email protected]>
Signed-off-by: Andrey Aleksandrov <[email protected]>
Signed-off-by: Andrey Aleksandrov <[email protected]>
Signed-off-by: Andrey Aleksandrov <[email protected]>
Signed-off-by: Andrey Aleksandrov <[email protected]>
@mariussturm
Copy link
Contributor

Looks good so far, go ahead with your approach!

Signed-off-by: Andrey Aleksandrov <[email protected]>
@kabakakao
Copy link

It would be really nice to see such a resource in the cookbook.
Especially in Graylog3, where you can't easily use contentpack files for your inputs, this resource would be great. Are here missing tasks to get it completed?

@CLAassistant
Copy link

CLAassistant commented Jul 29, 2019

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants