Skip to content

Comments

Input resource#104

Open
aladmit wants to merge 12 commits intoGraylog2:api-supportfrom
aladmit:input_resource
Open

Input resource#104
aladmit wants to merge 12 commits intoGraylog2:api-supportfrom
aladmit:input_resource

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 <postgred@gmail.com>
Signed-off-by: Andrey Aleksandrov <postgred@gmail.com>
Signed-off-by: Andrey Aleksandrov <postgred@gmail.com>
Signed-off-by: Andrey Aleksandrov <postgred@gmail.com>
Signed-off-by: Andrey Aleksandrov <postgred@gmail.com>
Signed-off-by: Andrey Aleksandrov <postgred@gmail.com>
Signed-off-by: Andrey Aleksandrov <postgred@gmail.com>
Signed-off-by: Andrey Aleksandrov <postgred@gmail.com>
Signed-off-by: Andrey Aleksandrov <postgred@gmail.com>
Signed-off-by: Andrey Aleksandrov <postgred@gmail.com>
Signed-off-by: Andrey Aleksandrov <postgred@gmail.com>
@mariussturm
Copy link
Contributor

Looks good so far, go ahead with your approach!

Signed-off-by: Andrey Aleksandrov <postgred@gmail.com>
@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