{"id":59,"date":"2014-10-03T19:30:51","date_gmt":"2014-10-03T19:30:51","guid":{"rendered":"http:\/\/blogs.nrao.edu\/jmalone\/?p=59"},"modified":"2014-10-08T18:58:07","modified_gmt":"2014-10-08T18:58:07","slug":"tracking-internet-plugins-with-munkireport","status":"publish","type":"post","link":"https:\/\/blogs.nrao.edu\/jmalone\/2014\/10\/03\/tracking-internet-plugins-with-munkireport\/","title":{"rendered":"Tracking internet plugins with munkireport"},"content":{"rendered":"<p>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.<\/p>\n<hr \/>\n<p>&nbsp;<\/p>\n<p>We run the excellent Mac software management tool <a href=\"https:\/\/github.com\/munki\/munki\">Munki<\/a> as well as the excellent reporting interface <a href=\"https:\/\/github.com\/munkireport\/munkireport-php\">munkireport-php<\/a> 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 &#8220;Applications&#8221; &#8212; meaning things that are Mac App bundles. Today I set about to track other software, specifically Internet Plug-ins.<\/p>\n<p>Joe Wollard posted a modified version of Josh Potter&#8217;s script in the Munki-web-admin group. The script can be found <a href=\"https:\/\/groups.google.com\/forum\/#!msg\/munki-web-admin\/H6faDyup8fM\/5PZF6fgD8jYJ\">here <\/a>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&#8217;s application inventory file. The trick was to integrate this script into munkireport.<\/p>\n<p>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&#8217;m a bit out of date on my munkireport installation, so I don&#8217;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.<\/p>\n<p>My final script can be <a href=\"http:\/\/gist.github.com\/48kRAM\/8632d33b9b1b05c67b5d\">found in this gist<\/a>. The one change I made was to replace blank CFBundleName strings with the globbed directory name rather than &#8216;N\/A&#8217; as this allows it to be more easily searchable in munkireport.<\/p>\n<p>In order to get this new postflight pushed out to all clients, I use munkireport&#8217;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, <em>run makecatalogs<\/em>, and then bump the package version number so my clients all re-fetch the scripts including my new postflight.<\/p>\n<p>Now all my clients are happily reporting their Java and Flash plugin versions in munkireport! And there was much rejoicing.<\/p>\n<p><a href=\"http:\/\/blogs.nrao.edu\/jmalone\/files\/2014\/10\/Flash_versions_mr.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-62\" src=\"http:\/\/blogs.nrao.edu\/jmalone\/files\/2014\/10\/Flash_versions_mr.png\" alt=\"Flash plugin version report\" width=\"800\" height=\"301\" srcset=\"https:\/\/blogs.nrao.edu\/jmalone\/files\/2014\/10\/Flash_versions_mr.png 1013w, https:\/\/blogs.nrao.edu\/jmalone\/files\/2014\/10\/Flash_versions_mr-300x112.png 300w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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. &nbsp; &hellip; <a class=\"more-link\" href=\"https:\/\/blogs.nrao.edu\/jmalone\/2014\/10\/03\/tracking-internet-plugins-with-munkireport\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[3,4],"class_list":["post-59","post","type-post","status-publish","format-standard","hentry","category-mac","tag-munki","tag-munkireport"],"_links":{"self":[{"href":"https:\/\/blogs.nrao.edu\/jmalone\/wp-json\/wp\/v2\/posts\/59"}],"collection":[{"href":"https:\/\/blogs.nrao.edu\/jmalone\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.nrao.edu\/jmalone\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.nrao.edu\/jmalone\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.nrao.edu\/jmalone\/wp-json\/wp\/v2\/comments?post=59"}],"version-history":[{"count":8,"href":"https:\/\/blogs.nrao.edu\/jmalone\/wp-json\/wp\/v2\/posts\/59\/revisions"}],"predecessor-version":[{"id":68,"href":"https:\/\/blogs.nrao.edu\/jmalone\/wp-json\/wp\/v2\/posts\/59\/revisions\/68"}],"wp:attachment":[{"href":"https:\/\/blogs.nrao.edu\/jmalone\/wp-json\/wp\/v2\/media?parent=59"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.nrao.edu\/jmalone\/wp-json\/wp\/v2\/categories?post=59"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.nrao.edu\/jmalone\/wp-json\/wp\/v2\/tags?post=59"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}