Has anybody cobbled together a way to automate report creation?

duffcalifornia
Contributor

I know that report automation is a long-standing feature request, but has anybody come up with a way to do this? A search of JAMF Nation didn't reveal anything, but maybe I'm missing something.

6 REPLIES 6

mm2270
Legendary Contributor III

Kind of sort of I have, although its not something I've published anywhere.

Short story is, I developed a shell (bash) script that can use the JSS API to pull down a saved advanced search (saved report) on your JSS, and use the resulting xml to convert it to a csv file, kind of like how the JSS is able to export a search into csv.
That part of the script works well enough, provided everything is set up correctly in your JSS in regards to the API account, etc.

The part I only partially worked out was automating these reports to then be pulled on a scheduled basis and sent to an email distribution list. I did come up with something that, though clunky, was working, but since it was again a shell script it means it would likely need to run from either a Mac/Mac server or possibly a Linux server of some kind to work effectively. The script called some python code to send the csv as a valid attachment to a recipient list.

As I said, I haven't really polished up any of this, and I haven't used these scripts in some months now, but back when I was working on them, they seemed to do the job. I'd need to dust these off and do some more serious testing with them again to see if they still even work. I'm not sure what recent changes there may have been with the JSS API to possibly cause some breakage in the scripts now.

akamenev47
Contributor II

@mm2270 , I know it's been a long while, but if you do have by any chance the script - would help a lot. I could polish it as needed as well. Thanks

Ahoy!

JamesJhoung
Contributor

@shurkin18 The scheduled emailed reports should now be built-in for saved searches unless I'm missing something.

akamenev47
Contributor II

@james179, wanted to use smart groups for the reports.. as smart groups are already all setup.

Ahoy!

stevewood
Honored Contributor II
Honored Contributor II

@shurkin18

Why not use the API to pull down the Smart Group and use that XML to create the Advanced Search? Once created via the API you can go into the GUI to schedule the emails.

tlarkin
Honored Contributor

We are piping all our data to our product. While, this may not interest every Org that uses Jamf, I would recommend everyone take a look at it. You would need some sort of data tool, and the ability to share data from jamf to this tool. API connectors, webhooks, direct database access are the main ways you can get data from Jamf Pro into your data tool. Each of them have pros and cons and there is no magic answer for everyone.

Once your data is in your data tool of choice, you can do whatever you want with it for the most part. Build reports, gather BI, visualize it in software, and trend data over time. Also, once in your data tool you can share that data to other people and teams so they don't have to have direct access to your Jamf Pro environment. This also gets you off the hook of constantly generating and shipping reports to other parties.

I have created a web hook FR that would much easier data ingestion from a native webhook (no API connector needed!) that could be ingested by a plethora of data ingestion tools or simple roll-your-own solutions.

This might seem like a lot of extra work, and it honestly is, but the work is up front and you can maintain it moving forward. Having access to your data is very powerful and insightful, and being able to data share to other stake holders, partners, leadership, teams, and so forth opens up many new opportunities to leverage your data better.