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

newdevice: Added signal support for RouterOS #5498

Merged
merged 1 commit into from Jan 19, 2017

Conversation

Projects
None yet
8 participants
@laf
Member

laf commented Jan 18, 2017

DO NOT DELETE THIS TEXT

Please note

Please read this information carefully. You can run ./scripts/pre-commit.php to check your code before submitting.

  • Have you signed the Contributors agreement - please do NOT submit a pull request unless you have (signing the agreement in the same pull request is fine). Your commit message for signing the agreement must appear as per the docs.
  • Have you followed our code guidelines?

Renamed existing mikrotik files to routeros.

Fixes: #3770

@LibreNMS-CI

This comment has been minimized.

LibreNMS-CI commented Jan 18, 2017

Auto-Deploy finished, Test PR at http://5498.ci.librenms.org or https://5498.ci.librenms.org

@scrutinizer-notifier

This comment has been minimized.

scrutinizer-notifier commented Jan 18, 2017

The inspection completed: No new issues

@geordish

This comment has been minimized.

Contributor

geordish commented Jan 18, 2017

Not quite working. The sensor is detected correctly, but values are not being stored.

Could be due to the device returning -ve values?

I would imagine either the RRD creation needs updating to accept a -ve number as a min, or setting the division to -1.

@laf

This comment has been minimized.

Member

laf commented Jan 18, 2017

Odd as negative values are used in quite a few places, this is the test that's been done and works fine on negative values.:

image

@spinza

This comment has been minimized.

Contributor

spinza commented Jan 18, 2017

Will test on a large install of RouterOS devices. Any chance of catching CCQ at the same time?
Does this add the graph on the port/interface or does this go into the same place as temperature etc? It's really an interface level thing?

@laf

This comment has been minimized.

Member

laf commented Jan 18, 2017

What's CCQ?

@wizzycom

This comment has been minimized.

wizzycom commented Jan 18, 2017

It is a link quality counter counted in percentage...

OIDs for the interfaces we worked for the signaling
.1.3.6.1.4.1.14988.1.1.1.3.1.10.7
.1.3.6.1.4.1.14988.1.1.1.3.1.10.6

I am just trying to understand how you accomplished the signal sensor (not a programmer myself), because there are too many things that can be graphed and I need to take my chances to graph them

@laf

This comment has been minimized.

Member

laf commented Jan 18, 2017

https://github.com/laf/librenms/blob/0c3e32d2d9f41f10d03f1bb6e86332562f359022/includes/discovery/sensors/signal/routeros.inc.php

I just walked the OID for the signal strength, the rest of the code is kind of standard and we just register the sensor which then takes the leg work out of it.

So for CCQ we don't have a sensory type that would match so we'd need to add something appropriate.

@wizzycom

This comment has been minimized.

wizzycom commented Jan 18, 2017

Useful info. This will help me further.
So my issue is solved. I think it will be merged soon.

Thank you very much @laf

@geordish

This comment has been minimized.

Contributor

geordish commented Jan 18, 2017

Been going a few hours now, and nothing:
image

I will take a proper look into why its not working for me later.

@laf

This comment has been minimized.

Member

laf commented Jan 18, 2017

Chuck the debug output up when you can.

@spinza

This comment has been minimized.

Contributor

spinza commented Jan 18, 2017

What's CCQ?

CCQ is a measure of quality.

It should be available on both Tx and Rx of wireless interfaces though I think Mikrotik mainly makes the Tx available on SNMP.

@spinza

This comment has been minimized.

Contributor

spinza commented Jan 18, 2017

I referenced the stuff of interest in #1232 before.

I imagine it makes more sense to put the signal, CCQ and these numbers all on the relevant port page as you'd have it per wireless port.

@geordish

This comment has been minimized.

Contributor

geordish commented Jan 18, 2017

@geordish

This comment has been minimized.

Contributor

geordish commented Jan 18, 2017

As @laf pointed out I'm an idiot.

I can confirm it works.

image

@laf

This comment has been minimized.

Member

laf commented Jan 18, 2017

image

@tomecat tomecat referenced this pull request Jan 18, 2017

Closed

RouterOS wireless section support #5499

5 of 5 tasks complete
@spinza

This comment has been minimized.

Contributor

spinza commented Jan 19, 2017

I see the signal is coming through. Seems to be working on my setup, but I have to point out again that the signal is a per interface item. Not really a device level sensor.

@laf

This comment has been minimized.

Member

laf commented Jan 19, 2017

We have no support for adding this to interfaces so for now it's either this or nothing.

@tomecat

This comment has been minimized.

tomecat commented Jan 19, 2017

How does it works? mtxrWlRtabStrength shows average value from all connected radio users?
@spinza Do You think it should by shown per interface in port section or better in wireless section?
@laf Adding that sort of data (for example to interfaces) causes lot of fundamental changes?

@wizzycom

This comment has been minimized.

wizzycom commented Jan 19, 2017

mtxrWlRtabStrength is grabbed from the wireless registration table of mikrotik and I think that it shows the average per user or connection.
Signaling per interface will be tricky, because if on a connection you are on the client side, then as far as I remember there are no signaling data on the interface.
Mikrotik is ages back on SNMP.
For these kind of SNMP OIDs, I use the Services capabilities of LibreNMS

@tomecat

This comment has been minimized.

tomecat commented Jan 19, 2017

Thanks for explanation, in that case it works as I supposed.

@spinza

This comment has been minimized.

Contributor

spinza commented Jan 19, 2017

We have no support for adding this to interfaces so for now it's either this or nothing.

Then this.

I'd like to make it work on interfaces at some point as I'd love to add some of the other per interface values. I just need guidance on an example to follow to do it?

@spinza

This comment has been minimized.

Contributor

spinza commented Jan 19, 2017

This is working on three different devices I tested:
image

rb2011, dynadish and a netbox.

@laf laf merged commit 02bffcd into librenms:master Jan 19, 2017

2 checks passed

Auto-Deploy Build finished.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@laf laf deleted the laf:issue-3770 branch Jan 19, 2017

@tomecat

This comment has been minimized.

tomecat commented Jan 20, 2017

I'm not sure if signal stuff is working correctly.
In miktotik device wlan interfaces are down if there is no connected clients.
In that case clients has disconnects and the sensor are gone:
discovery-g6-rbswr.ap.txt
sensor-gone.txt
Iv'e got 4 wlan's, discovery found 2, with connected clients. While polling client has disconnected, one wlan left and there was some errors.

@laf

This comment has been minimized.

Member

laf commented Jan 20, 2017

Your device isn't responding back to the snmp request with data so the sensor being removed is expected.

I don't think Mikrotik are known for there snmp implementation but this isn't something we can fix.

@wizzycom

This comment has been minimized.

wizzycom commented Jan 20, 2017

In the case of point to point links, this is working like a charm. In the case where you have multiple clients connected on an AP, then there will be issues

@wizzycom

This comment has been minimized.

wizzycom commented Jan 20, 2017

As @laf correctly said

@spinza

This comment has been minimized.

Contributor

spinza commented Jan 20, 2017

The bottom graph on my post above is my home wifi. So it does work with multiple clients. The others are point to point.

@spinza

This comment has been minimized.

Contributor

spinza commented Jan 20, 2017

I'm rolling this out today on a large mikrotik base.

@tomecat

This comment has been minimized.

tomecat commented Jan 20, 2017

@laf What a pity it's not fixable. But if it wasn’t polled as a sensor, but as a interface value it wouldn’t by vanished when wlan is down.
While device is being discovered ./discovery.php finds connected user OIDs, when ./poller.php works it's pooling those OIDs, when client is disconnected, OID can't be found and signal is 0dB. IMO - if it works that way there's no sense to polling that type of information (including @geordish work at #5509) except p2p configured interfaces. But still it should be assign to interface because it can be down, but not gone. I'm truly confused where to present rrd's, in ports section or wireless section. On the other hand it would be nice to know how many clients are connected to AP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment