AnsweredAssumed Answered

Force Samanage Agent to check in on OSX. Does it work for you?

Question asked by on Oct 3, 2016

Does anyone force the agent to check in OSX? We are in a pre deployment and testing phase. We have been seeing mixed results with (computers) clients not showing up in our dashboard after the agent install.


I have been experimenting with the force checkin options listed within the cmb.rb file.


Does anyone use this?

If so I am curious if you also find this documentation to be correct for OSX.

The specified item was not found.


In my testing I had to modify 2 things. The location of the file is different when I install the agent.


This is where I am finding the cmb.rb file:




The second issue is that when I run the command the first line errors out:



/Applications/ line 1: syntax error near unexpected token `('

/Applications/ line 1: `RUNNING_DIR = File.expand_path File.dirnam'(File.dirname(File.dirname(__FILE__)))


I granted myself read/write access to the mini_kernel directory and the cmd.rb file in order to add this to the first line of the .rb file "#!/usr/bin/env ruby"

I didn't add the quotes. After doing this I was able successfully force the check in on 2 of my testing machines.


It does output some errors but the machine does show as being updated in my dashboard:



/Applications/ `<module:HttpHelper>': uninitialized constant OpenSSL::SSL::OP_NO_COMPRESSION (NameError)

  from /Applications/ `<top (required)>'

  from /Applications/ `require_relative'

  from /Applications/ `<main>'


This seems like a bit of a wacky/hacky work around. Is there any way to force the check in without having to modify this file?


I am attempting to use this as a way to resolve an issue where a machine isn't showing up in the dashboard after the agent install. This didn't fix it. Has anyone else seen this issue? Any input is helpful.



So it looks like the hostname/localhost/computer name may have been the issue. It was set to a generic "MacBook Pro" name. After changing that the force checkin script worked and the computer asset that had not shown up properly showed up. This didn't require a re installation of the agent.