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

collectd_tcp_network_connect not set to "on" #527

Open
sblatt opened this issue Jul 5, 2016 · 8 comments
Open

collectd_tcp_network_connect not set to "on" #527

sblatt opened this issue Jul 5, 2016 · 8 comments
Labels
bug Something isn't working needs-feedback Further information is requested

Comments

@sblatt
Copy link

sblatt commented Jul 5, 2016

Hello,
Probably I am missing something major, but I'll ask anyway:
This module does not set the seboolean for collectd_tcp_network_connect, and there is no switch for it.
I already tried setting puppetagent_manage_all_files to "on" and run puppet agent again, with no success.

Affected Puppet, Ruby, OS and module versions/distributions

CentOS Linux release 7.2.1511
puppet-collectd (v5.0.0)
ruby 2.0.0p598
puppet 3.8.7
foreman 1.11.3

Grafana 3.0.4
python-carbon 0.9.15

What are you seeing

Collectd cannot send stats as it is not allowed to connect to the network. the error message is:
Filter subsystem: Built-in target `write': Dispatching value to all write plugins failed with status -1.
write_graphite plugin: Connecting to grafanaserver:2003 via tcp failed. The last error was: failed to connect to remote host: Permission denied

SELinux config:
collectd_tcp_network_connect --> off

What behaviour did you expect instead

Data to arrive at the carbon server

How did this behaviour get triggered

Right after installation trough puppet

Output log

collectd: Stopping 5 write threads.
Initialization complete, entering read-loop.
write_graphite plugin: Connecting to grafanaserver:2003 via tcp failed. The last error was: failed to connect to remote host: Permission denied
Filter subsystem: Built-in target `write': Dispatching value to all write plugins failed with status -1.

Any additional information you'd like to impart

Thank you for your help!

@bastelfreak bastelfreak added the bug Something isn't working label Jul 5, 2016
@bastelfreak
Copy link
Member

Thanks for reporting this. Are you able to create a PR with a fix as well?

@sblatt
Copy link
Author

sblatt commented Jul 5, 2016

Actually I just wanted to know if this is a bug or if I missed something. If it is indeed a bug I will happily try to fix it.

@bastelfreak
Copy link
Member

yeah, we currently don't deal with selinux at all in this module :(

@sblatt
Copy link
Author

sblatt commented Jul 5, 2016

I never worked on a puppet module, but I'll try.

@bastelfreak
Copy link
Member

If you need any help please join our IRC channel #voxpupuli, we're 24/7 happy to help.

@sblatt
Copy link
Author

sblatt commented Jul 5, 2016

I commited a change to https://github.com/sblatt/puppet-collectd/tree/selinux_support

  • The variable is global to this module (as multiple plugins might need it, so they do not override eachother)
  • Default is false (which translates to off, but i just like bools better)
  • collectd gets restarted, which in my experience is needed for this bool to work (in both ways: on and off)
  • Does nothing if selinux is disabled ($::selinux = 'false' as far as I understand?)
  • name: $collectd_selinux
  • Integrates well into foreman

It still has issues:

  • the default value is false, which will alter already (manually) changed configurations
  • probably much more

Do you think this is the right way and i should continue running the tests?

@juniorsysadmin
Copy link
Member

@sblatt Please put up a Pull Request, then we can have everyone's input all in the same spot

@juniorsysadmin juniorsysadmin added the needs-feedback Further information is requested label Dec 20, 2016
@sblatt
Copy link
Author

sblatt commented Dec 20, 2016

The checks failed, now I am unsure what to do...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-feedback Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants