Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Insight Discovery Rebuild in PowerShell

Gary.Smith August 18, 2021

I got sick of waiting for Insight to come up with a viable solution to scraping info from workstations and importing it into JSM. The discovery tool is just such a mess in a large environment that I felt it was just not worth it and as Jira still hasn't given an ETA (or even said if it is on the roadmap) I decided to just skip them and do it myself. 

So I rebuilt the windows discovery agent in PowerShell. 
Invoke-HostInfo.ps1 
It is running on PowerShell 7 and as such is cross-platform, however, I have only designed it for Windows at this time with Mac\Linux coming further down the line. 

I will be rolling this out to my 5000 workstations shortly so will keep this function updated with any changes that I see. 

Inside JSM I used a copy of the schema that Insight discovery makes and made just a few changes to the way that the fields are named so you all should be able to work that out fairly easy. 

My solution to the issue with JSMs import needing to be done manually is to have the output converted to JSON and then pushed to an azure blob directly from the workstation, and then all the files are downloaded on a schedule and imported into Insight via my main JSM.Insight module all via a scheduled task (run on one of our servers). 

If you are not looking for updates as often or have fewer workstations then you could simply do a Get-InsightObjectByIQL (store the returned ID in the registry so you don't have to look it up every time) against the CMDB for that device and then Set-InsightObject right from the host (after a network check).

1 comment

Alexis Neveu August 19, 2021

Hi,

I am facing the same issue, which lead me to the same concluion : building my own import tool, since Atlassian team is not able to provide any ETA nor relevant info about how to get assets data into this integrated version of Insight. Using manual CSV/JSON/DSC imports is not an option in a large environement. We are using SCCM to manage our Windows devices, and we are seriously considering developping a kind of middleware that would act as a connector between SCCM and Insight (using Insight REST API), but this will certainly be a lot of work...

Hey, JSM Team, why can't you provide an estimated ETA for SCCM integration ??

Even if I am new to JSM, I feel this cloud version will be great, but right now it is suffering from limitations, and I don't believe I would have choosed JSM as our ITSM tool if I had been aware of such limitations, since the time required to get it work is high, compared to the subscription fees (which are also high, to my point of view).   

Gary, thanks for sharing. This will certainly be a good start for us.

Gary.Smith August 29, 2021

SCCM integration would be super simple. Just use powershell 'Get-CMDevice' to get all computers in a collection and use my JSM.Insight module to post to Insight.

We are toying with the idea of writing one anyway which I will share if it comes to pass. But as we have been moving our assets to InTune they might skip SCCM..   

Like Jan Odvárka likes this

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events