GenieACS

Dan Morphis dan at milkcarton.com
Mon Jun 5 12:31:20 EDT 2017


You can do something like this, changing the values to fit your needs. This
script will refresh the parameters listed every 1.5 days. Create this as a
provision script, then create a preset to run the provision.

log("Running Refresh_ATM_Stats");
let twoDays = 1.5 * (24 * (60 * 60) * 1000); //1.5 days
let twoDaysAgo = Date.now() - twoDays;

let paramNames = [
    "InternetGatewayDevice.DeviceInfo.UpTime",

'InternetGatewayDevice.WANDevice.1.WANDSLInterfaceConfig.UpstreamCurrRate',

'InternetGatewayDevice.WANDevice.1.WANDSLInterfaceConfig.DownstreamCurrRate',

'InternetGatewayDevice.WANDevice.1.WANDSLInterfaceConfig.UpstreamMaxRate',

'InternetGatewayDevice.WANDevice.1.WANDSLInterfaceConfig.DownstreamMaxRate',

'InternetGatewayDevice.WANDevice.1.WANDSLInterfaceConfig.UpstreamNoiseMargin',

'InternetGatewayDevice.WANDevice.1.WANDSLInterfaceConfig.DownstreamNoiseMargin',

"InternetGatewayDevice.WANDevice.12.WANDSLInterfaceConfig.UpstreamCurrRate",

"InternetGatewayDevice.WANDevice.12.WANDSLInterfaceConfig.DownstreamCurrRate",

"InternetGatewayDevice.WANDevice.12.WANDSLInterfaceConfig.UpstreamMaxRate",

"InternetGatewayDevice.WANDevice.12.WANDSLInterfaceConfig.DownstreamMaxRate",

'InternetGatewayDevice.WANDevice.12.WANDSLInterfaceConfig.UpstreamNoiseMargin',

'InternetGatewayDevice.WANDevice.12.WANDSLInterfaceConfig.DownstreamNoiseMargin'
];

for(let key of paramNames) {
    declare(key, {value: twoDaysAgo});
}

On Mon, Jun 5, 2017 at 6:57 AM, Dan Therrien <dan at mofinetwork.com> wrote:

> I’m trying to keep track of bandwidth usage and need some ideas.
>
>
>
> I would like to have the router inform the genieACS server of the current
> value tx/rx and have the server retrieve that routers id and add that value
> as Bandwidth Usage. I don’t know where I would put this scripting.
>
>
>
> Has anyone done this before?
>
>
>
> Thanks
>
>
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.genieacs.com
> http://lists.genieacs.com/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.genieacs.com/pipermail/users/attachments/20170605/b0225540/attachment.html>


More information about the Users mailing list