How would I go about sending a one-off request to a device to run diagnostics (ping or speedtest) and then see those results in the UI?
Provisions and Presets seem to be the way to get actions to run on a devices, so would I have to create a Preset that runs at a certain time in the “Schedule” attribute and then have that run a Provision which sets the Diagnostic params? Where would the diag results of that test go and how is it viewable?
Is there anyway to setup a more streamlined flow for this use-case in the UI such as button on the Device page which triggers the action?
You can use the GUI to set the appropriate TR-069 parameters and then collect the data on 8 DIAGNOSTICS COMPLETE.
To have anything automated you would need to either modify the source, or use an external system to initiate the tests, and then have a provision script refresh the appropriate parameters. In my environment, I capture that data and use an extension script to send the data to another system for historical purposes.
I know that the CPE sends a 8 DIAGNOSTICS COMPLETE to the ACS when its finished with the tests, however what I don’t understand his how to accomplish the parameter refresh to pull the results into GenieACS. From what I can tell in the docs, I would need to create a Preset that triggers on the 8 DIAGNOSTICS COMPLETE event and runs a Provision, however I don’t see a built-in function that reads values from the device. I do see a “refresh” provision that appears to be built-in and maybe thats the key to reading values in, but I cannot find any documentation on how to use it.
@Tagore.PDE: I think it really depends on what exactly you’re trying to do. But I can tell you that if you want to initiate something like a ping test from the UI, you go into the Device and then under “All parameters” you’ll see a InternetGatewayDevice.IPPingDiagnostics. You refresh that tree (hit refresh button to the right, then commit up top). Then you’ll see all the sub-params. You would then hit the Edit icon next to Host and set your host to ping. Then edit your NumberOfRepetitions to be how many times to ping. Then edit DiagnosticsState to be Requested. Then commit all those changes at the top of the page which pushes those parameters to the CPE.
After some time the CPE should run the test and you can then use the Refresh button on the InternetGatewayDevice.IPPingDiagnostics tree and you should see the results populated in the sub-params like InternetGatewayDevice.IPPingDiagnostics.SuccessCount.
I am beginning to understand a bit more about how one would go about automating this more using the Preset, Provision and NBI, but I am still learning the landscape and how thing flow in this system.
@seankndy thanks so much about this, tested and is working.
I’m in the same boat, learning and learning.
there is very little information about all this.
if i get this automated i will back to you with the info.
If you get first, i will be very helpfull if you share the automated part.
i m looking to have some “button” to do this in the UI of the genieacs, i dont know if that is posible.
Absolutely. I do this. Here is a rough outline of my process.
Support personal (or automated process in the case of required government testing) initiate a Download/Upload/Ping/UDP Echo/Trace Route test. My server adds the necessary information to the custom Diagnostics vparam (JSON encoded data) and then the server sets the appropriate params for the test and things kick off.
When the 8 DIAGNOSTICS COMPLETE event is fired by the CPE, I have a provision script which reads the diagnostic state information from the vparam, refreshes the appropriate parameters and then calls an extension script to send the data to our subscriber management server.
Here is the example contents of the vparam. Keep in mind this data is JSON encoded. In my environment, I need to know the source as that tells me what to do with the data at the end of the diagnostic test.
@akcoder, appears you’re in the ISP space as well (not surprising, I’m sure most GenieACS users are)?
Some governmental testing requires latency tests once per minute for 1 week and speedtests once an hour in that same week. Are you accomplishing this same testing by issuing 61 requests (60 ping + 1 speedtest) per CPE per hour during the testing window from your ACS? Is your speedtest just downloading a basic file from an HTTP server sitting at your “IXP” or are they using Ookla or some other speed testing?
I would love to hear more about your deployment if you’re willing to share!
We are under CAF, so I can only speak to those rules. With CAF, you can do upload/download testing one week, and latency a different week. The testing just has to be done with the same customers during the same testing period.
A file from our server sitting at the IXP. Just doing HTTP. FTP had to many issues (like a lot of CPE vendors not supporting authentication).
For our actual testing code, I have a process that fires once per minute and gathers the customers to be tested. Then I put a bunch of messages in a message queue (RabbitMQ) to do the actual processing of the customer (I’ve done things this way to work around threading limitations). The code that consumes the messages checks if the user is using more than 64k up/32k down. If so, an in use record is added. Otherwise a call to GenieACS to do the actual performance testing is done. Part of setting the parameters in the ACS is setting a special vparam I use to track state (what is being tested, when the testing started, finished, test status, and source - the data is JSON encoded).
On the ACS, I have a preset which is triggered by 8 DIAGNOSTICS COMPLETE which runs a provision which consumes the data from the vparam, determines which test data to refresh from the CPE, then packages the data up and sends it to our subscriber management software.
Thats the 10,000 ft view. If you want a deeper dive on any part, please let me know.
How are you checking if the user is using more than 64k? SNMP?
Can you elaborate on vparams? Why does it exist and what are the common use-cases? You said you set vparam parameters and then later consume them during a 8 DIAGNOSTICS COMPLETE event in your Provision. I don’t understand how you would access them from a Provision script that is triggered by an Event? The issue is I am fundamentally confused on how they work and honestly still a bit confused on how Presets and Provisions work.
What router model do you use as your CPE? Are you happy with it?
Currently, I ask the NAS via their API. In a few weeks, that code will be migrated to use the LibreQOS node manager API.
vparam is short hand for VirtualParameter. A vparam is use to abstract away some sort of logic to make your scripts simpler. A common use case is to abstract away the differences between tr069 and tr181. In my case, I’m using it to store data.
You access a vparam the same way you do any other parameter, via declare const diagnostics = JSON.parse(declare('VirtualParameters.Diagnostics'').value[0]);
SmartRG 515/516/555. Throughly hate the SR555.
Adtran 834, not happy with it. It was not pleasant working with Adtran to resolve their defects.
Zyxel VMG4927, EX3510/5510/5512. Happy with these. Zyxel has been fairly responsive to fix defects.