Dynatrace / Dynatrace-AppMon-Puppet-DEPRECATED

Installs the Dynatrace Application Monitoring solution using Puppet.
MIT License
20 stars 12 forks source link

Facter: error while resolving custom fact "install_server__check_service": No such file or directory - pgrep -f "dtserver" #34

Closed jgjohn02 closed 7 years ago

jgjohn02 commented 7 years ago

On every puppet run on a windows 2012r2 server we are getting the error Facter: error while resolving custom fact "install_server__check_service": No such file or directory - pgrep -f "dtserver"

looking at the code lib\facter\install_server__check_service.rb it looks like the issue is we do not have pgrep on puppet agents or windows boxes. For now the quick fix i would recommend is adding confine :kernel => 'Linux' to line 2 so it would look something like

Facter.add(:install_server__check_service) do
  confine :kernel => 'Linux'
  setcode do

this will allow the fact to work in Linux and stop the error for windows, ( and i am not sure if dtserver even runs on windows)

MarcinZejer commented 7 years ago

Hi,

Thanks for your help. install_server__check_service.rb has been updated as suggested

Marcin