Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Way to retrieve connection quality and speed #84

Open
telebaslr opened this issue Nov 1, 2018 · 3 comments
Open

Way to retrieve connection quality and speed #84

telebaslr opened this issue Nov 1, 2018 · 3 comments
Labels
HOW-TO How-to do something with mikronode or the API

Comments

@telebaslr
Copy link

Hey there :)

Is there a way to retrieve the quality of the connection or the estimated connection-speed via the API? The current transmitting speed would also be helpful.

@Trakkasure
Copy link
Owner

If you can use the command line on the mikrotik to retrieve this, you should be able to do it with an api command.
I'll have to look into this.

@Trakkasure Trakkasure added the HOW-TO How-to do something with mikronode or the API label Dec 27, 2018
@telebaslr
Copy link
Author

telebaslr commented Jan 16, 2019

So I tried to use /interface/monitor-traffic/ether6 via the JS library, but it just yields that the command is not known.

@xeleniumz
Copy link
Contributor

xeleniumz commented Feb 15, 2019

hi @telebaslr Do you have a solution ? if not yet , please take a look my code. this example will get traffic in your routerboard interface

try{
 let device = new MikroNode('ip');
 let conn = await device.connect()
                  .then(([login]) => {
                    return login('username', 'password');
                }).catch(er => console.log(er));
let c1 = conn.openChannel();
 c1.closeOnDone(true);
 c1.write(`/interface/monitor-traffic`,{
                            'interface':'ether1',
                            'once':true
                }).then(p => {
                        let val = MikroNode.resultsToObj(p.data);
                        console.log(val);
                }).catch(er => console.log(er));
 } catch (error) {
  console.log(error);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
HOW-TO How-to do something with mikronode or the API
Projects
None yet
Development

No branches or pull requests

4 participants
@Trakkasure @xeleniumz @telebaslr and others