Skip to main content
Question

Nexthink Collector Deployment

  • November 12, 2019
  • 8 replies
  • 50 views

Forum|alt.badge.img+2

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?

8 replies

Forum|alt.badge.img+11
  • Valued Contributor
  • November 12, 2019

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


Forum|alt.badge.img+2
  • Author
  • New Contributor
  • November 12, 2019

Fantastic, thanks for your help. It is working now


Surajit
Forum|alt.badge.img+7
  • Contributor
  • November 12, 2019

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>"

Forum|alt.badge.img+9
  • Valued Contributor
  • December 14, 2020

@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


Surajit
Forum|alt.badge.img+7
  • Contributor
  • December 17, 2020

Yes, @walt I repackaged the source DMG, rootca and customer key using Composer as one package.


Forum|alt.badge.img+9
  • Valued Contributor
  • December 17, 2020

@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


sdagley
Forum|alt.badge.img+25
  • Jamf Heroes
  • January 24, 2022

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>"

Forum|alt.badge.img+3

Yes, @walt I repackaged the source DMG, rootca and customer key using Composer as one package.


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