jamf / scout-public

A tool to aggregate devices across multiple MDM servers
GNU General Public License v3.0
11 stars 3 forks source link

Report on devices that have become dormant / aren't checking in #3

Closed jacobschultz closed 5 years ago

jacobschultz commented 5 years ago

In the Jamf Pro Server, there is a field that denotes whether a device is 'managed' or not. This field simply refers to the status of the management framework on the device, not whether or not the device is actually actively checking in and is in compliance. We would like to know, and report on it in scout when devices have been dormant or haven't checked in for x days.

Tasks:

  1. Create a new column in the scout database called 'is_active'. Don't forget to edit the scout.sql database in the root of the project with this new field as well. The default value should be true.
  2. Add a new setting to the .env settings called 'ACTIVE_DAYS' that is an integer. If a device hasn't checked in that many days, it won't be considered active anymore. Make sure to update the sample.env at the root of the project and any installers as well.
  3. When the worker script runs on a limited run, compare the last checkin date to date and see if it's greater than the number of days specified in the ACTIVE_DAYS setting. If it is, set is_active to false. If it isn't, set it to true.
  4. Add the Is Active field to the devices UI
  5. Add the Is Active field to the Reporting Options

Pull Request Ready When:

  1. Scout admins can set and view the ACTIVE_DAYS setting in the settings pane with the rest of the values
  2. When the worker runs, this value is updated accurately
  3. The user is able to see the Is Active setting in the devices tables
  4. The user is able to create reports based on this value