Closed sprkbrn closed 6 years ago
Hi @sprkbrn,
This is very concerning! So to clarify, you are doing the following
Get-Group -Id 46827 | Get-Sensor
When you do this, the following should happen
But it seems for some reason we're not getting any Parent IDs that should be created in step 5
Before we look into this deeper, can you please run See belowGet-Module PrtgAPI
and confirm the version of PrtgAPI you're running?
Hi @sprkbrn,
I have figured out what is going on here. The issue is occurring because the SomeApp group does not have any child devices directly under it. As result, this request
https://prtg-app/api/table.xml?content=devices&columns=location,host,group,probe,favorite,condition,upsens,downsens,downacksens,partialdownsens,warnsens,pausedsens,unusualsens,undefineds
ens,totalsens,schedule,basetype,baselink,parentid,notifiesx,interval,intervalx,access,dependency,position,status,comments,priority,message,type,tags,active,objid,name&count=*&filter_parentid=46827&usern
ame={redacted}&passhash={redacted}
returns a list of zero devices. Get-Sensor
selects all of the IDs in the empty list (none) and updates the SensorFilter
(overwriting it with nothing) resulting in the behavior you are seeing. What Get-Sensor
should do instead is if it sees there are no devices, skip retrieving sensors from this group and continue onto all child groups (of which you appear to have 3)
VERBOSE: Get-Sensor: Processing 3 child groups of parent group SomeApp
I will try and release PrtgAPI 0.8.3 with the required fix tomorrow. In the meantime you can circumvent this issue by manually retrieving all child sensors via all child devices
Get-Group -Id 46827 | Get-Device | Get-Sensor
Hi @sprkbrn,
PrtgAPI 0.8.3 has now been released. Can you please run Update-Module PrtgAPI
, reopen PowerShell and confirm whether this issue is resolved?
Note: if you are not currently on PrtgAPI 0.8.2, please be aware of any breaking changes between your current and the latest version.
Regards, lordmilko
Hey @lordmilko , thanks for all your help this update did work. Also great thinking for the workaround. Thanks so much!
Good day,
Having an issue with populating a sensor for a single group. For some reason it pulls all sensors instead. It appears to occur only with this particular group, as far as I see the group is the same as our others. Any further assistance would be greatly appreciated.
I believe the issue originates from this line of the beneath log. I can't figure out why it drops the "count=*&filter_parentid=46827&" from the request, causing it to pull all the sensors down from PRTG.
brokenlog.txt