Need smart group for software the doesn't show in Applications

bcbackes
Contributor III

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!

2 ACCEPTED SOLUTIONS

marklamont
Contributor III

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

View solution in original post

bcbackes
Contributor III

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

View solution in original post

8 REPLIES 8

JustDeWon
Contributor III

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.

marklamont
Contributor III

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

bcbackes
Contributor III

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!

bcbackes
Contributor III

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

psliequ
Contributor III

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.

monroeiv
New Contributor

Have you considered an extension attribute?

mwong
New Contributor

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!

bcbackes
Contributor III

@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. 4dc14a3bc59d4558b748c93b212e2ffd