cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Upload ESXQuery Inventory via IIS ManagesoftRL?

We have some vCenter servers that the owners will not allow any firewall rules going in, so they run ESXQuery.exe and have a script that moves that to a Share on a Beacon. Would like to upload via IIS to ManagesoftRL, but when I tried this via PowerShell  Invoke-RestMethod and Invoke-WebRequest commands I googled got an error I have not figured out, "No action was found on the controller 'UploadRL' that matches the request."

1) Looking though the (2017) doc we have, it does not look like ESXQuery has a parameter to do the upload itself. Instructions say to copy the NDI file.

2) Does anyone have a script they use to do this via IIS?

3) I thought of using ndupload.exe, but it does not work standalone, so would need to install the agent I think. We don't seem to install agents on our vCenter servers, and I don't know why. The server Inventory is brought in via vCenter Introspection Discovery, or in this case, ESXQuery. Is there any reason to not install an agent on a vCenter (mostly Windows) server?

(1) Solution

Found out they do have an agent on this server, so using ndupload to send all the files in the directory that ESXQuery writes to. CMD:

C:
CD C:\Program Files (x86)\ManageSoft\Uploader\
ndupload -f "C:\ManageSoft\Incoming\Inventories\*"

View solution in original post

(8) Replies
In my opinion you would be better served to share the incoming inventory folder on the beacon and ask them to place the file in that location. If that’s not desired or feasible, you only need to have a script running on the beacon that would copy the inventory file to the incoming inventory folder. There is no need to upload via http/https.

We do it that way for some others, but since this is external, I was just hoping to use the external NAT setup we have for agent uploads rather than open a firewall rule through our Web DMZ Beacon server. Using a Share with firewall rule is the fall-back plan. 

Thanks

@DerekMac,

I might not be following your situation.  If you already "...have a script that moves that [the inventory file] to a Share on a Beacon", the script must already have the ability to write to the beacon and therefore, a FW rule must already exist.  If you have a beacon server in a DMZ, there would already be rules in place that allow the beacon to talk with your application/batch server or it wouldn't function.

If the file is already being copied to any beacon, it seems to me you would need to do either of:

  1. Share ...\Incoming\Inventory folder (with the proper permissions) and update the script to point to the new shared folder.  
  2.  Create and schedule a script that runs on that same beacon to move the file from the existing shared folder into the ...\Incoming\Inventory folder.  

The normal scheduled tasks on the beacon will then pick up any new files each minute and upload them to the application/batch server.  Is there something I am missing?

Hi @darren_haehnel ,

Spoiler, I have a solution now that I will share, but for clarification, we have 11 Beacon servers and 39 vCenters that we read, 4 of which come in via ESXQuery. We also have no access to any servers other than our own for FNMS. So this combination of this Beacon and this vCenter did not exist. 

ChrisG
By Community Manager Community Manager
Community Manager

Try writing a script/command to do an HTTP PUT of the NDI content you want to upload to a URL like http://your-beacon/ManageSoftRL/Inventories/unique-filename.ndi

If that isn't working, can you post the full command you're trying here? Somebody may be able to comment further if they can see exactly how you're attempting the upload.

(Did my reply solve the question? Click "ACCEPT AS SOLUTION" to help others find answers faster. Liked something? Click "KUDO". Anything expressed here is my own view and not necessarily that of my employer, Flexera.)

Thanks @ChrisG , that did work! Basically I had to add "Inventories/<write file name>" to below. I found that it uploads the file name in the -uri, not the -Infile, which I don't like. Found out last night they do have an agent on this vCenter server, so successfully tested using ndupload to send all the files in the directory (can specify which Beacon, but should not need it). 

This worked though:
Invoke-RestMethod -uri 'http://<beacon>/ManageSoftRL/Inventories/<write file name>' -Method Put -Infile "<input path and input file name>"


... could have had the PowerShell read all of the filenames and use that, but didn't need to figure that out since the ndupload solution seemed easier.

Found out they do have an agent on this server, so using ndupload to send all the files in the directory that ESXQuery writes to. CMD:

C:
CD C:\Program Files (x86)\ManageSoft\Uploader\
ndupload -f "C:\ManageSoft\Incoming\Inventories\*"