Posted on 07-05-2019 08:52 PM
Does anyone know how I could use a Smart Group to pull in software that is installed that isn't listed in Applications? This is for Palo Alto Traps. I'm trying to capture devices that don't have it installed.
I'm thinking that I might need to add something to the installer that creates a "dummy" entry in Applications and report on that. Let me know what your suggestions are.
Thanks!
Solved! Go to Solution.
Posted on 07-06-2019 09:30 AM
if you deploy it using jamf you can create a smart group of package installed by casper has xxx.pkg, failing that as mentioned create an EA to report on it. It may not be showing as an app because it isn't an app so you need to find where it lives and report on it that way.
Like this example for java plugin EA which would return either NA or the version
#!/bin/bash
#EA to show Java version. used to scope update policy
version="NA"
if [ -f /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Info.plist ]; then
version=$(/usr/bin/defaults read /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Info.plist CFBundleVersion)
echo "$version"
fi
echo "<result>$version</result>"
Posted on 07-06-2019 01:35 PM
UPDATE: I believe I found how to do this. See below. It's reporting back the short version name, which, is what I'm looking for. Thanks a lot!
#!/bin/bash
#Extension Attribute to show Traps being installed and its version.
version="NA"
if [ -f /Library/Application Support/PaloAltoNetworks/Traps/bin/traps_agent.app/Contents/Info.plist ]; then
version=$(/usr/bin/defaults read /Library/Application Support/PaloAltoNetworks/Traps/bin/traps_agent.app/Contents/Info.plist CFBundleShortVersionString)
echo "$version"
fi
echo "<result>$version</result>"
Posted on 07-06-2019 03:46 AM
The best way to do that is via a custom Extension attribute. Create a script that checks if the .app is installed or not, echo
the results and create a Smart Group based on the EA results you created.
Posted on 07-06-2019 09:30 AM
if you deploy it using jamf you can create a smart group of package installed by casper has xxx.pkg, failing that as mentioned create an EA to report on it. It may not be showing as an app because it isn't an app so you need to find where it lives and report on it that way.
Like this example for java plugin EA which would return either NA or the version
#!/bin/bash
#EA to show Java version. used to scope update policy
version="NA"
if [ -f /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Info.plist ]; then
version=$(/usr/bin/defaults read /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Info.plist CFBundleVersion)
echo "$version"
fi
echo "<result>$version</result>"
Posted on 07-06-2019 12:58 PM
Thank you @marklamont and @JustDeWon I think EA is the way to go. However, I'm not very familiar on how to set those up. I found the Traps Agent app located in "/Library/Application Support/PaloAltoNetworks/Traps/bin", however, I'm not sure how to put the script together in the EA. It would be nice to do something similar to @marklamont where it shows the version number of the app. Then, not only can I find Macs that don't have it installed but Macs that are running older versions.
Do either of you have a site that explains how to setup these extension attributes? Any help is greatly appreciated. Thank you!
Posted on 07-06-2019 01:35 PM
UPDATE: I believe I found how to do this. See below. It's reporting back the short version name, which, is what I'm looking for. Thanks a lot!
#!/bin/bash
#Extension Attribute to show Traps being installed and its version.
version="NA"
if [ -f /Library/Application Support/PaloAltoNetworks/Traps/bin/traps_agent.app/Contents/Info.plist ]; then
version=$(/usr/bin/defaults read /Library/Application Support/PaloAltoNetworks/Traps/bin/traps_agent.app/Contents/Info.plist CFBundleShortVersionString)
echo "$version"
fi
echo "<result>$version</result>"
Posted on 07-06-2019 02:48 PM
Another way to do this too, if you'd prefer these kinds of things to show up in the same table as the rest of your applications, is just to add that path to the custom search paths in Inventory Collection settings. No need to maintain extension attributes then either.
Posted on 07-08-2019 09:54 AM
Have you considered an extension attribute?
Posted on 08-02-2019 08:37 PM
I am new to this, please help..
i got as far as creating the EA for this script, but when creating the smart group, what do i need to put in for "operator" and Value.
thanks!
Posted on 04-11-2020 11:10 AM
@mwong Sorry, this is an old post, however, to answer your question. In creating your Smart Group you click on the Criteria Tab, then, in the top right click on the "Show Advanced Criteria" button. Then, you want to look for your extension attribute based on the name you gave it. For example, the EA I created for Palo Alto Traps is called Traps Installed. I select it from the list, then, enter in the value.