Cacti / plugin_mikrotik

Mikrotik Plugin for Cacti
GNU General Public License v2.0
60 stars 24 forks source link

Login Failure for RouterOS Login method post-v6.43: #35

Closed sciamachy closed 4 years ago

sciamachy commented 4 years ago

The Login Method has changed for post-v6.43. See https://wiki.mikrotik.com/wiki/Manual:API.

The following modification to the connect() function in routeros_api.class.php will resolve this (though break backwards compatibility). May make sense to either try both, or have the user config the version.

$this->write('/login'); $this->write('=name=' . $login, false); $this->write('=password=' . $password, false); $RESPONSE = $this->read(false); if (isset($RESPONSE[0]) && $RESPONSE[0] == '!done') { $this->connected = true; break; }

bvr373 commented 3 years ago

s Hello Dear cigamit,

I have same problem, User logged in/logged out by API

TheWitness commented 3 years ago

We updated the API some time ago to address this.