Posted on 11-12-2019 04:55 AM
Dear All, i have trouble deploying Nexthink collector though JAMF.
I have re-package the 'Nexthink collector' installer using "composer",
I do not have any error on deloyment but we lack files.
Does anyone of you know a proper way to deploy the Nexthink collector with Jamf?
Posted on 11-12-2019 06:13 AM
Yes, it's simple. You need the installer but in our case we also needed a root ca txt file and also a customer key text file. You then distribute the package with a post install command that runs something like:
cd Nexthink_collector_6.1.1.1/csi.app/Contents/Macos
./csi -address serveraddress -port 999 -tcp_port 999 -rootca /path/to/txtfile -key /path/to/txtfile
Posted on 11-12-2019 09:07 AM
Fantastic, thanks for your help. It is working now
Posted on 11-12-2019 10:46 AM
Just wanted to share what we are douing, hope it might help someone.
We package the Nexthink_Collector installer, RootCA & Customer Key & place it in /private/tmp/
Below is the Installation Script:
#!/bin/sh
#Description: Script to install the Nexthink Collector form the pre-cached dmg installer file, Root CA & Customer Key.
# Variables used by this script.
dmgName="Nexthink_Collector.dmg"
# CHECK TO SEE IF A VALUE WERE PASSED IN Jamf FOR PARAMETER 4 AND ASSIGN THEM
if [ "$4" != "" ] && [ "$dmgName" == "" ]; then
dmgName="$4"
fi
# Mount the DMG
/usr/bin/hdiutil attach /private/tmp/Nexthink_Collector/$dmgName -noverify -nobrowse -noautoopen
# Change the directory to the path of the csi application:
cd /Volumes/Nexthink_Collector_6.23.1.9 OSX 10.12 - 10.15/csi.app/Contents/MacOS/
# Define the parameters for csi.app for installing the Collector from the command line interface
sudo ./csi -address x.x.x.x
-port xxx -tcp_port xxxx
-rootca /private/tmp/Nexthink_Collector/Nexthink-root-ca.txt -key /private/tmp/Nexthink_Collector/Nexthink-customer-key.txt
-campaign enabled
# Unmount the DMG
hdiutil detach /Volumes/Nexthink_Collector_6.23.1.9 OSX 10.12 - 10.15/ -force
# Delete the package contents
/bin/rm -rf /private/tmp/Nexthink_Collector/
And here goes the EA:
#!/bin/bash
#Description: Extension Attribute to report the installed version of the Nexthink agent, or Not Installed.
if [ -f "/Library/Application Support/Nexthink/config.json" ]; then
VERSION=$( /bin/cat /Library/Application Support/Nexthink/config.json | grep -i version | cut -d '"' -f4 )
else
VERSION="Not Installed"
fi
echo "<result>$VERSION</result>"
Posted on 12-14-2020 11:59 AM
@Surajit Did you repackage the DMG for nexthink? or curious how the DMG was deployed to the /private/tmp/?
do you have a separate pkg with the rootca and customer key?
Thank you
Posted on 12-16-2020 11:10 PM
Yes, @walt I repackaged the source DMG, rootca and customer key using Composer as one package.
Posted on 10-05-2022 02:11 PM
hi @Surajit I have tried the same step with source dmg and customer & root key created pkg with composer and added the script as post-install scripts and tried manual installation of created pkg file it did not work. could you please tell me is correct or wrong.
thanks
Posted on 12-17-2020 07:47 AM
@Surajit okay and that was a flat pkg? and the script above is a postinstall script?
thank you in advance for the clarification!
edit: think I got it, I used a flat package and that seemed to work with our version on 10.15, but if there is a better method I am still curious. thank you again
Posted on 01-24-2022 08:33 AM
To followup to @Surajit 's post of the EA to report the Nexthink version installed, here's one to report the tcp-status for the agent so you can see if it's communicating with the server:
#!/bin/zsh
# EA - Nexthink TCP Status
# Reports the tcp-status from the Nexthink config.json file, or Not Installed if the file isn't found.
FileToCheck="/Library/Application Support/Nexthink/config.json"
tcpStatus=" Not Installed" # Leading space is intended, it will be removed when the result is echoed
if [ -f "$FileToCheck" ]; then
tcpStatus=$( grep -i tcp-status "$FileToCheck" | cut -d '"' -f4 | cut -d ']' -f3 )
fi
echo "<result>${tcpStatus:1}</result>"