ContributionsMost RecentMost LikesSolutionsRe: Add device to a Collector Group Thanks. So maybe I misunderstood but if I just add a device with a preferred collector Id and the collector is a member of an auto balanced collector group does that mean LM will just handle the load and I don’t need to be concerned? https://www.logicmonitor.com/support/collectors/collector-groups/auto-balanced-collector-group Add device to a Collector Group Hi Guys Is it possible to add a device to a Collector Group directly? I've been testing code to find a set of collectors that match a name and add to one of the specific collectors retrieved. Currently it grabs all with LON in the name and matches the device name. I'm then randomly picking one of them and adding the device). However, my understanding is its then tied to this collector and not the grrup? PLease correct me if I'm wrong here. So, can I add directly to a group with JSON as below $newdeviceobj= @{ 'name' = "$device" - name of the device 'displayName' = "$device" - name of the device 'preferredCollectorId' = "0" "autoBalancedCollectorGroupId" = $id - (this is the ID of the collector group) 'description' = "$device" - name of the device } I'm using a POST to device/devices and i receive @{data=; errmsg=Collector(id=0) does not exist; status=1404} I've got 'preferredCollectorId' = "0" as clearly i dont want to define it at this point. Thanks Re: Add Device via API Oh dear - massive schoolboy error. I had ID instead of Id :)/emoticons/smile@2x.png 2x" title=":)" width="20" /> "preferredCollectorID": 108 Thanks for your help anyway! Working now :)/emoticons/smile@2x.png 2x" title=":)" width="20" /> Re: Add Device via API Hi - I'm hitting /device/devices with the above JSON body using a POST Oddly enough I'm getting Function statuscode is 1404 Function return data is Function return items are Function return body is @{data=; errmsg=Collector(id=0) does not exist; status=1404} Body data is { "description": "Test Server", "name": "bwu-qts-ojtst54", "displayName": "bwu-qts-ojtst54", "preferredCollectorID": 108 } Almost like it expects a collectorID? Should i be posting with any other data? The reference is only API 1.0 so i dont know if API 3.0 has any other mandatory fields either. Add Device via API Hi - I'm trying to add a device via API and Powershell. I've prepared the following JSON which im passing as a BODY object via POST. { "description": "Test Server", "name": "xx", "displayName": "xx", "preferredCollectorID": xx } Is this enough data to POST - im getting a 1404 back which suggest an object doesn't exist (i assume in the case the Collector?). But that def the ID as ive retrieved it from a separate GET. Im making other REST calls using the same function so pretty sure my code is ok. The guide ive used for reference is below (even though its v1 I think this is correct) as the properties below are the only required ones. Property Description Required? Type Example name The host name or IP address of the device Yes String “name”:”10.36.11.240″ displayName The display name of the device Yes String “displayName”:”ProdServer24″ preferredCollectorId The Id of the preferred collector assigned to monitor the device Yes Integer “preferredCollectorId”:85 Add a Device | LogicMonitor Any help would be appreciated. Thanks
Top ContributionsAdd device to a Collector GroupRe: Add Device via APIAdd Device via APIRe: Add device to a Collector GroupRe: Add Device via API