Skip to main content
Solved

Report back custom data field?

  • February 21, 2020
  • 2 replies
  • 18 views

Forum|alt.badge.img+3

Is there a way to store script output back to Jamf? Is it possible to do it in a way that is searchable?

I would like to be able to create a Computer Search for "firewall disabled".

To get the data, I could call socketfilterfw --getglobalstate in a script and report the output back to Jamf.

Is this possible?

Thank you!

Best answer by KatieE

Hi @NullPointer - yup, you're looking for a Computer Extension Attribute Populated by a Script.

What you describe would look something like

#!/bin/sh
echo "<result>$(/usr/libexec/ApplicationFirewall/socketfilterfw --getglobalstate)</result>"

But you'd likely want to parse that output a bit:

#!/bin/sh
echo "<result>$(/usr/libexec/ApplicationFirewall/socketfilterfw --getglobalstate| awk '{print $3}' | sed 's/.$//')</result>"

2 replies

KatieE
Forum|alt.badge.img+24
  • Employee
  • Answer
  • February 23, 2020

Hi @NullPointer - yup, you're looking for a Computer Extension Attribute Populated by a Script.

What you describe would look something like

#!/bin/sh
echo "<result>$(/usr/libexec/ApplicationFirewall/socketfilterfw --getglobalstate)</result>"

But you'd likely want to parse that output a bit:

#!/bin/sh
echo "<result>$(/usr/libexec/ApplicationFirewall/socketfilterfw --getglobalstate| awk '{print $3}' | sed 's/.$//')</result>"

Forum|alt.badge.img+3
  • Author
  • New Contributor
  • February 24, 2020

Thank you @kenglish ! I didn't realize Computer Extension Attributes existed, this opens so many doors!