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

Allow setting groups for the telegraph user #26

Closed
joshuaspence opened this issue May 25, 2016 · 1 comment
Closed

Allow setting groups for the telegraph user #26

joshuaspence opened this issue May 25, 2016 · 1 comment

Comments

@joshuaspence
Copy link
Contributor

We are running Varnish 4.1 and using the following Telegraf configuration in order to send Varnish stats to InfluxDB:

telegraf::inputs:
  exec:
    commands:
      - 'varnishstat -j'
    data_format: 'json'

This doesn't quite work for Varnish 4.1, however, because the telegraf user is not a member of the varnish group. I was able to work around this problem by adding the following puppet code:

user { 'telegraf':
  groups     => ['varnish'],
  home       => '/etc/telegraf',
  managehome => false,
  shell      => '/bin/false',
  system     => true,
  require    => Class['varnish::install'],
}

It would be more convenient, however, if this module exposed a $groups parameter which would allow me to do this:

class { 'telegraf':
  groups => ['varnish'],
}

Some related resources:

@yankcrime
Copy link
Member

I'm not keen on integrating user or group management in this module. Personally I don't see anything wrong with the approach taken in your workaround - typically it's the sort of thing you'd apply in a profile class anyway.

If anyone feels strongly enough to disagree to the point where they raise a pull request and argue support for this feature, I'll happily reconsider.

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

No branches or pull requests

2 participants