Darktrace cSensor Extention Attribute

mmobin
New Contributor II

We have had the Darktrace cSensor running on our macs for months. I am currently tasked with creating a report that pulls in all machines with DT sensor and its running. I found a script that I could use with extension attributes to report that the sensor is installed and running, but it does not pull any data once it's set up as the exention attribute. I can run this script in a local bash environment on my mac and it seems to report that sensor is running on my mac. 

#!/bin/bash

# check for process
PROCESS=$( pgrep Darktrace\ cSensor )

#see if process is running
if [[ -z "$PROCESS" ]]; then
RESULT="Not Running"
else
RESULT="Running"
fi

#report results
echo "<result>${RESULT}</result>"

0 REPLIES 0