Efficient way to get parameters from all devices parodically

I am new to Genieacs. Our team is currently using Genieacs REST APIs for the CPE configuration. Now we also want to fetch the stats parodically (every 15 min interval) for all the devices. Is there a way to do it efficiently using available REST APIs.
One method I could think of is get all the devices and parodically run getparameter request for required parameters on each devices, but not sure how efficient it will be.
Can someone experienced suggest or point me to the right document.

1 Like

First question is why do you need these params every 15 minutes? I’ve been doing this for 8 years and have never needed to do that.

Pull the information you need from the CPE when you need it. This is way more efficient than blindly pulling back data from the CPE you are most likely not going to need/use.

If you are truly intent on pulling data back every 15 minutes from your CPEs, the easiest way to accomplish this is set the inform interval to 15 minutes (1800 seconds). Then create a provision script that has all the params you want to refresh. Something like this:

const fifteenMinutesAgo = Date.now() - (15 * 60);
declare('Device.DSL.Channel.*.Stats.*.*', {value: fifteenMinutesAgo});
2 Likes

Thanks akcoder for the help. We want to show historical graphs for some of the parameters e.g. bandwidth used.
If I understood it correctly after implementing and executing above provision script we can fetch the parameters from the MongoDB it will have the refreshed value. Is this understanding is correct?

Yes it would.

I would engage with GenieACS sales on this one. I believe there is existing code available under a paid support contract that has this functionality you need built in.

Thanks akcoder.