Tracking internet plugins with munkireport

UPDATE: Moments after posting this, Arjen has pushed changes to munkireport-php that integrate Internet Plug-in version reporting directly into the software. If you can update to the latest WIP version, there is no need to hack your munkireport installation.


 

We run the excellent Mac software management tool Munki as well as the excellent reporting interface munkireport-php to manage our OSX systems. Part of munkireport is a software inventory system that reports about all software installed on the client systems. However, it only tracks “Applications” — meaning things that are Mac App bundles. Today I set about to track other software, specifically Internet Plug-ins.

Joe Wollard posted a modified version of Josh Potter’s script in the Munki-web-admin group. The script can be found here and seems to work just fine. It globs the Internet-plugins directory, gathers info about all the plugins contained therein and then appends that info to Munki’s application inventory file. The trick was to integrate this script into munkireport.

Munkireport integrates with munki by providing a custom set of pre/post-flight scripts. Obviously, the postflight is where we want to run this bit of code as we want to make sure we report the newly-installed version data. I’m a bit out of date on my munkireport installation, so I don’t have the postflight.d directory system yet, so I added it into the postflight script directly in the main() function before the point where the data is sent up to the munkireport server. Once I upgrade, I should be able to put this in a separate script inside postflight.d and package it separately.

My final script can be found in this gist. The one change I made was to replace blank CFBundleName strings with the globbed directory name rather than ‘N/A’ as this allows it to be more easily searchable in munkireport.

In order to get this new postflight pushed out to all clients, I use munkireport’s native client installation system by modifying the hosted postflight script on my munkireport server. This file is located in assets/client_installer/postflight. After editing that script, I generate a new munkireport.plist pkginfo file, add that to my Munki repository, run makecatalogs, and then bump the package version number so my clients all re-fetch the scripts including my new postflight.

Now all my clients are happily reporting their Java and Flash plugin versions in munkireport! And there was much rejoicing.

Flash plugin version report

This entry was posted in Mac and tagged , . Bookmark the permalink.

Comments are closed.