- Developing an automation to compare a list of devices in a SQL database against the current list of devices in PI 3.1. The goal is to dynamically add/remove devices in PI based on what exists in this SQL database. In order to do the comparison, you need a full export of device IPs from PI and using the GET Devices API for this purpose. But it takes about 5 minutes to get the first 1000 results - does this this seem a bit long. It also seem to be getting 500 errors intermittently too. Here's the URI I'm using:
- "/webacs/api/v2/data/Devices.json?.full=true&.nocount=true&.maxResults=1000"
- Is there any recommendation on the most efficient way to export IP address of every device in the PI inventory
5 minutes is definitely too long a time. How many devices do you have on that appliance.
- Got 5438 devices in PI today. Based on the doc, I don't believe this is too many, is it. Unable to find much documentation that can help debug what is going on, so not sure what to do about it other than maybe use the default .maxevents of 100 to try and keep the connection alive.
- Something happened in the environment because when ran a query for 1000 devices today, it returned in 20 seconds.
OK, yeah, that sounds a lot more reasonable. If this happens again, you can check to see if you have any scheduled reports running, or if any of the background jobs in the system look like they're stuck or taking too long. Sometimes database contention can cause the API response times to spike, but in normal circumstances it shouldn't last for a long time.
Depending on the configuration you're using, you could be above the safe scaling limits for PI 3.1. But if you're running Standard, Professional, or Gen2 hardware then you should be safe.
Comments
0 comments
Please sign in to leave a comment.