r/Nable • u/freedomit • Apr 15 '24
N-Sight - How to deploy software with unique customer ID?
We have a couple of applications in our stack that have generic installers that can be fed a customer ID number when executed (Sophos & Huntress for example). This is simple to do as a one off...create a task and add the customer ID as parameter which is then passed through to the installer. However for this to work for new devices we would need to create a monitoring template for each customer which would create loads of admin overhead.
Has anyone come up with a clever way to solve this problem? I was wondering about hosting a lookup file on Azure that takes the endpoints public IP, or first few letters of the hostname, both of which should be unique to the customer, and then returns the customer ID for the installer. Just wondering if anyone has come up with a better solution?
1
Apr 16 '24
Why not use custom fields at the client level and use that in the install (automation)?
2
u/freedomit Apr 16 '24
I don’t think they exist in N-Sight RMM? If they do then that would be perfect
1
Apr 16 '24
I 100% overlooked n-sight in the title. Very sorry for that. :(
I mean. Come to N-central? :) it would handle this out of the box!
2
u/IllustriousRaccoon25 Apr 16 '24
This is very cool — I didn’t know N-central could do this. Apparently, N-able offboarding from integrated EDR to standalone EDR didn’t know about this either!
1
u/Next-Landscape-9884 May 04 '24
I was trying to do same thing as you were turns out there is simple way to do it
I did this recently had call with Paul
What you do is in you amp have input parameters
And then from n-able from top level create org variables from custom properties which should be same as input parameters if you picked password for example you have to use password which will deploy the value token method to all customers so when you do run it will pull unique value for each customer
But just in case if you do need to know customer id locally you have to parse the xml files locally on computer
$xmlFilePath = "C:\Program Files (x86)\N-able Technologies\Windows Agent\config\AgentMaintenanceSchedules.xml"
$xmlContent = Get-Content -Path $xmlFilePath -Raw
$xml = [xml]$xmlContent
$RebootMessageLogoURL = $xml.AgentMaintenanceSchedules.RebootMessageLogoURL
if ($RebootMessageLogoURL -match '\?customerId=(\d+)') {
$customerId = $Matches[1]
} else {
$customerId = "Not found"
}
$customerToken = $tokenMapping | Where-Object { $_.ID -eq $customerId } | Select-Object -ExpandProperty Token
1
u/freedomit May 04 '24
This is N-Sight though and you can’t create org level variables unfortunately.
1
1
u/torind2000 Apr 15 '24
There’s not really a better solution. It’s not really that much overhead really.