Posted on 05-16-2022 03:22 PM
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>"
Solved! Go to Solution.
Posted on 10-08-2024 07:50 AM
The above script is working as intended. No changes required.
Posted on 10-08-2024 07:50 AM
The above script is working as intended. No changes required.