Tracking Changes of Extension Attributes

jarrodranney
New Contributor II

I know that this requires scripting and use of the API, but I haven't figured out where to start. I populate extension attributes for SSID, State, and City. I'd like to populate a separate extension attribute to track the previous SSID, State, and City if they've changed. I only want to track a single change, so I imagine this only needs an EA and a correlating "previous" EA.

Any guidance any of you can provide would be great. TIA!

4 REPLIES 4

tlarkin
Honored Contributor

You can look at using the Inventory Complete webhook and ship the event somewhere. All EAs run at recon, so every time recon completes, jamf pro server can ship a hook as the event. The downside to this is that the event has to be shipped somewhere, and it doesn't include the entire inventory record, so you will have to do a call back. You will also have to buy/build some sort of web app to handle the hooks.

I know this doesn't answer your question directly, but it is a path I would say worth exploring as if you build it for this, you can use it for all the webhooks and then build data, or flows that are aware and can take action of state changes.

marklamont
Contributor III

Store the info in a plist or other file locally. That way you can populate the values on the device using scripts then use the EA to just read them in to two EAs current and previous.

jarrodranney
New Contributor II

I like the plist idea. That may be the cleanest way to run this.

tlarkin
Honored Contributor

local flat files is a good way to go light weight, but it doesn't store historical data, unless you want to do like a sqllite database or something and keep track of it, but if that endpoint needs to be wiped or fails that data is gone.

An EA is just the current state of that data you are collecting.