NinjaOne – Device Alert Heat Map

Note: This is a community project and not officially supported by NinjaOne, if you have any issues please open an issue on the GitHub repository.

As it is a long weekend in England thanks to Easter I thought I would see how far I could push NinjaOne custom fields. I decided to leverage some code I had used with Datto in the past to generate per device alert heatmaps. Unfortunately I found that the current version of the WYSIWYG fields can’t be pushed very far. The only formatting options in a table are to make font bold, an H1 or an H2. Using those limitations I have tweaked my heatmap and come up with this.

This will show you the times and days of the week when a device has the most conditions triggered. This can help spot if a device is having problems at a specific time regularly to aid with troubleshooting.

Setup

This script updates all devices at the same time via the API so can be run from any machine.

To set this up create a new Global Device WYSIWYG Custom field. Give it API Write permissions at a minimum and Technician Read permissions.

Create a Machine To Machine API Key with Client Credentials Grant Type.

Set the field name at the start of the script and provide your API keys in a secure way to it.

The latest version of the script can be found here:

NinjaOneAutomation/Generate-Device-Alert-Heatmap.ps1 at main ยท lwhitelock/NinjaOneAutomation (github.com)

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *