-
Notifications
You must be signed in to change notification settings - Fork 289
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
Running Sensu on Windows as a specific account #819
Comments
Hi @bodgit We do expose the parameters, |
I notice on Windows that parameter doesn't do anything, there's just a The long story is I have a need to monitor some files/directories that are on SMB/CIFS shares with fairly restrictive permissions, and it's preferable to create a dedicated AD account for Sensu to run with that has read-only access to the shares rather than grant access to the LocalService/LocalSystem account (which I'm not even sure is possible). What I've done so far is replace the dsc_service { 'sensu-client':
dsc_ensure => present,
dsc_name => 'sensu-client',
dsc_state => $service_ensure,
dsc_startuptype => $service_enable ? {
true => 'automatic',
default => 'disabled',
},
dsc_credential => { # This will become a class parameter, or maybe can reuse $sensu_user?
'user' => 'DOMAIN\user',
'password' => 'password',
},
dsc_displayname => 'Sensu Client',
dsc_path => 'c:\\opt\\sensu\\bin\\sensu-client.exe',
require => File['C:/opt/sensu/bin/sensu-client.xml'],
before => Service['sensu-client'],
} In theory it's functionally equivalent to the |
I've created #823 which contains the changes I've made to get things working. |
Solved by #823 |
Thanks @bodgit for letting us know! Re-opened and we will continue to work this. Sensu v1 has been on the back burner to get Sensu v2 supported and now we are circling back to get these issues fixed. |
Fixed with PR #917 |
Released in v2.61.0 |
I have a need to run Sensu on Windows with a different account to the default LocalService/LocalSystem that it uses by default. This would require registering the service with some different Powershell that looks something like this:
This doesn't strike me as something very idempotent if one were to change the account details after the service has already been registered.
Would it make sense to instead use one of the
dsc_service
ordsc_xservice
types from the DSC module which should a) hide the scary Powershell and b) hopefully be a bit more idempotent w.r.t. the account credentials?The text was updated successfully, but these errors were encountered: