Hello, I have the mikrotik hAP lite and through PHP API I’m trying to clean the webproxy log in mikrotik memory .
Can anyone guide me ?
thank you very much
Hello, I have the mikrotik hAP lite and through PHP API I’m trying to clean the webproxy log in mikrotik memory .
Can anyone guide me ?
thank you very much
If you’re talking about logs in the “/log” menu… I’m afraid those are not removable. The closest to that you can do is to adjust the settings in “/system logging” so as to either disable proxy logging altogether OR set up a remote logging server. At the remote logging server, you can clear the logs at whatever intervals/events you want.
If you mean the counters at “/ip proxy”, those are resettable via the “reset-counters-all” command at the appropriate menu, e.g.
<?php
use PEAR2\Net\RouterOS;
require_once 'PEAR2_Net_RouterOS-1.0.0b5.phar';
$client = new RouterOS\Client('192.168.88.1', 'admin', 'password');
$client->sendSync(new RouterOS\Request('/ip proxy access reset-counters-all'));
$client->sendSync(new RouterOS\Request('/ip proxy cache reset-counters-all'));
$client->sendSync(new RouterOS\Request('/ip proxy direct reset-counters-all'));