Page 1 of 1

wireless signal strenght monitoring with mrtg

Posted: Mon Sep 06, 2004 9:34 pm
by dorijan
This is what I get when I print oid in interface wireless:

0 strength=.1.3.6.1.4.1.14988.1.1.1.2.1.3.0.13.136.147.64.217.2
tx-bytes=.1.3.6.1.4.1.14988.1.1.1.2.1.4.0.13.136.147.64.217.2
rx-bytes=.1.3.6.1.4.1.14988.1.1.1.2.1.5.0.13.136.147.64.217.2
tx-packets=.1.3.6.1.4.1.14988.1.1.1.2.1.6.0.13.136.147.64.217.2
rx-packets=.1.3.6.1.4.1.14988.1.1.1.2.1.7.0.13.136.147.64.217.2
tx-rate=.1.3.6.1.4.1.14988.1.1.1.2.1.8.0.13.136.147.64.217.2
rx-rate=.1.3.6.1.4.1.14988.1.1.1.2.1.9.0.13.136.147.64.217.2

1 strength=.1.3.6.1.4.1.14988.1.1.1.2.1.3.0.48.79.48.105.56.3 tx-bytes=.1.3.6.1.4.1.14988.1.1.1.2.1.4.0.48.79.48.105.56.3
rx-bytes=.1.3.6.1.4.1.14988.1.1.1.2.1.5.0.48.79.48.105.56.3
tx-packets=.1.3.6.1.4.1.14988.1.1.1.2.1.6.0.48.79.48.105.56.3
rx-packets=.1.3.6.1.4.1.14988.1.1.1.2.1.7.0.48.79.48.105.56.3
tx-rate=.1.3.6.1.4.1.14988.1.1.1.2.1.8.0.48.79.48.105.56.3 rx-rate=.1.3.6.1.4.1.14988.1.1.1.2.1.9.0.48.79.48.105.56.3

2 strength=.1.3.6.1.4.1.14988.1.1.1.2.1.3.0.13.136.147.64.224.4
tx-bytes=.1.3.6.1.4.1.14988.1.1.1.2.1.4.0.13.136.147.64.224.4
rx-bytes=.1.3.6.1.4.1.14988.1.1.1.2.1.5.0.13.136.147.64.224.4
tx-packets=.1.3.6.1.4.1.14988.1.1.1.2.1.6.0.13.136.147.64.224.4
rx-packets=.1.3.6.1.4.1.14988.1.1.1.2.1.7.0.13.136.147.64.224.4
tx-rate=.1.3.6.1.4.1.14988.1.1.1.2.1.8.0.13.136.147.64.224.4
rx-rate=.1.3.6.1.4.1.14988.1.1.1.2.1.9.0.13.136.147.64.224.4


and this is how I put in cfg of mrtg:



Target[mt-most.znet_w1]: 1.3.6.1.4.1.14988.1.1.1.2.1.3.0.13.136.147.64.217.2:mrezadd@mt-most.znet
MaxBytes[mt-most.znet_w1]: 100
Title[mt-most.znet_w1]: Signal strength for w1 most
PageTop[mt-most.znet_w1]: <H1>Signal strength for w1 most </H1>

Target[mt-most.znet_w2]: 1.3.6.1.4.1.14988.1.1.1.2.1.3.0.13.136.147.64.224.4:mrezadd@mt-most.znet
MaxBytes[mt-most.znet_w2]: 100
Title[mt-most.znet_w2]: Signal strength for w2 most
PageTop[mt-most.znet_w2]: <H1>Signal strength for w2 most </H1>

Target[mt-most.znet_w3]: 1.3.6.1.4.1.14988.1.1.1.2.1.3.0.48.79.48.105.56.3:mrezadd@mt-most.znet
MaxBytes[mt-most.znet_w3]: 100
Title[mt-most.znet_w3]: Signal strength for w3 most
PageTop[mt-most.znet_w3]: <H1>Signal strength for w3 most </H1>


And I got nothing...
any idea why?

Posted: Tue Sep 07, 2004 1:07 am
by dwright
If I remember correctly, it might be because of your max bits. Mikrotik reads the value as a negative number. Read the Mrtg documentation about - number values. I think there might be some more you have to do in your cfg.

Dan

Posted: Tue Sep 07, 2004 4:03 am
by dorijan
I looked around on the net, and the problem is that mrtg cannot draw negative numbers..
So I tried putting - in front but that didnt change a thing...
Maybe the right way it would be to get SNR(signal to noise ratio) but dont know how to do that...

Posted: Tue Sep 07, 2004 4:12 am
by dwright
As far as I know, MT does not report snr values. Look into rrdtool. I know that it will do negative numbers. I believe you just port your cfg's from mrtg and allow rrdtool to read them and output your graphs.

Dan

Posted: Mon Sep 13, 2004 12:47 pm
by TIM
If I remember correctly, it might be because of your max bits. Mikrotik reads the value as a negative number. Read the Mrtg documentation about - number values. I think there might be some more you have to do in your cfg.

Dan
There could be more to this.

I'm trying to graph CPU utilization on my MT and getting all zeros as well. Not sure why. Open to suggestions.

TIM

Posted: Wed Sep 15, 2004 4:18 pm
by nhalachev

There could be more to this.

I'm trying to graph CPU utilization on my MT and getting all zeros as well. Not sure why. Open to suggestions.

TIM
More to this :
Try this - log on to your MT, issue following command : /system resource monitor
Wait a while - 15 min for axample and then look at your graphics ..
Strange - without console CPU monitoring - no SNMP monitoring !!!

Posted: Fri Oct 08, 2004 5:47 pm
by n3wwn
Hi there!

With MRTG, you need to specify two variables:

-----------------------------------------------------------------------------------
Explicit OIDs
You can also explicitly define which OID to query by using the following syntax 'OID_1&OID_2:community@router' The following example will retrieve error counts for input and output on interface 1. MRTG needs to graph two variables, so you need to specify two OID's such as temperature and humidity or error input and error output.

Example:

Target[myrouter]: 1.3.6.1.2.1.2.2.1.14.1&1.3.6.1.2.1.2.2.1.20.1:public@myrouter

-----------------------------------------------------------------------------------

This info is from:
http://people.ee.ethz.ch/~oetiker/webto ... rence.html

If you want to only graph one variable, then poll the same oid for both and use Options[interface]: noo

More info can be found about noo (and noi) in the docs linked above.

Good luck!

-Rich

Posted: Wed Oct 13, 2004 7:38 pm
by [ASM]
I've made a little walkaraund.

Step 1. set register_argv_argc = On in your php.ini
Step 2. Save the code above in some file:
<?
error_reporting(E_ALL);
$host = $_SERVER["argv"][1];
$comunity = $_SERVER["argv"][2];
$oid = $_SERVER["argv"][3];

$lines = array();
exec('/usr/local/bin/snmpwalk -v 1 -c ' . $comunity . ' ' . $host . ' ' . $oid, $lines);

$a = split(" = ", $lines[0]);
$b = split(": ", $a[1]);
$c = intval($b[1])*-1;

print $c."\n";
print $c."\n";
print " \n";
?>
Where /usr/local/bin/snmpwalk is the path to snmpwalk

Step 3. Make mrtg config file like this:
WorkDir: /var/www/htdocs/mrtg/
Options[_]: growright,bits,avgpeak
EnableIPv6: no
#################################################

Target[signal]: `/usr/bin/php -q /etc/mrtg/negative.php 10.0.0.1 public .1.3.6.1.4.1.14988.1.1.1.2.1.3.0.5.93.138.252.215.135`
AbsMax[signal]: 100
MaxBytes[signal]: 100
Options[signal]: gauge,growright,nopercent, noo
ShortLegend[signal]: -dBm
LegendI[signal]: Signal Strenght (-dBm)
YLegend[signal]: Signal Strenght
XSize[signal]: 350
YSize[signal]: 100
Title[signal]: Signal Strenght
PageTop[signal]: <H1>Signal Strenght
Where /etc/mrtg/negative.php is the saved file
10.0.0.1 is the host
public is the community on router
.1.3.6.1.4.1.14988.1.1.1.2.1.3.0.5.93.138.252.215.135 is the OID from /interface wireless registration-table print oid
/usr/bin/php is path to php binary

Step 4. Add a crontab for MRTG

P.S.: no support by me :)

Posted: Wed Oct 13, 2004 7:39 pm
by [ASM]
btw.... lower values are better :)

Posted: Fri Oct 22, 2004 9:04 pm
by isptlan
And what about this ? :-)

Target[wifi_sig]: .1.3.6.1.4.1.14988.1.1.1.2.1.3.0.144.75.4.115.142.27&.1.3.6.1.4.1.14988.1.1.1.2.1.3.0.144.75.4.115.142.27:public@x.x.x.x * -1

I am used this without any others scripts, but only signal on graph isnt -87 dBm and is 87dbm :-)

/Tomi

Posted: Sat Oct 23, 2004 2:47 pm
by [ASM]
I'didnt test that ;)

Now I make some script queryes for cacti... I'll post them soon

MAC Address

Posted: Fri Dec 17, 2004 1:18 am
by arormoser
How do you match the OID with the MAC Address of the client connected? I could not find any way to match Wireless Signal Strength OID with MAC Address. Anyone?

Thanks in advance, AR

mac and oid

Posted: Fri Dec 17, 2004 8:25 pm
by uphi
the oid reports the mac address and the number into the table
example: .1.3.6.1.4.1.14988.1.1.1.2.1.3.0.13.136.147.64.224.4
the .0.13.136.147.64.224 of the oid is the mac address in desimal form. just convert to hex. 0=0 13 =D 136=88 147=93 64=40 224=E0
so the mac address is 00:0D:88:93:40:E0
the first 3 sets of numbers indicate the manufactuer. the last 3 sets are the id of the radio.
Ex: 00:0d:88 is mfg by D-Link Systems
Hope this helps
Earl - UpHi.net
ps here is a link to the txt document for all mfgs. http://standards.ieee.org/regauth/oui/oui.txt

Any easy way?

Posted: Sat Dec 18, 2004 2:22 pm
by arormoser
Thank you very much!!

One more question. Now i programming a script witch made an snmpwalk of .1.3.6.1.4.1.14988.1.1.1.2.1.3 takes all the MAC in decimal formats, creates a new entry for each of them in a .cfg file for MRTG.

Any easy way to do this?

Posted: Sat Dec 18, 2004 5:58 pm
by uphi
Well I can write cfg scripts for mrtg, I can find my way around winbox and the command line for MT OS, but scripts I haven't done yet. I need to study more and at my age (60) it is sometimes hard to grasp a new idea.
BTW I am the author for the .pl and cfg scripts that are on Smartbridges site. I had to learn perl in a few days.
Earl - UpHi.net
see me at http://12.10.166.76

I made it!

Posted: Sat Dec 18, 2004 7:14 pm
by arormoser
I made an script that automatically retrieves the oid with snmp walk and then creates a .cfg files for all the MAC and translates the mac to Hex format. If someone want it just ask for it. (is a vbscript)

Now i have to found a way to match pppoe user with MAC and put the descripcion in that script

Thanks, AR

Posted: Fri Dec 24, 2004 10:42 pm
by UniKyrn
How did you match them up?

I ended up throwing each radio into the access list and adding a comment to each entry that was the customers name. Made it easier to tell them apart when looking at the registration table, and allowed me to write an Expect script on our logging system that could log in, retrieve the table complete with comments, and then break them apart so that mrtg could graph each customer (and reverse the number so it was positive the way mrtg demands). I'm also graphing what the MT claims its xmit rate for that client is into the same graph.

Between the two, we're now getting a history that we can refer to when a customer is having problems and can compare customers on the same AP to see AP related issues.

PPPoe Match

Posted: Fri Dec 24, 2004 10:54 pm
by arormoser
Nice!!! I'm matching the MAC Address with a SQL Table of the main application of our company where we have each customer MAC and put the client name in the description of each MAC MRTG Graph.

What is the last number of the oid?

Posted: Mon Dec 27, 2004 2:47 am
by arormoser
when you do a print oid you get for example:
.1.3.6.1.4.1.14988.1.1.1.2.1.3.0.13.136.147.64.224.4
the .0.13.136.147.64.224 of the oid is the mac address in desimal form. But what is the last number in the oid (4) ?? sometimes i get a 4 and sometimes a 3.

Thanks, AR

Posted: Thu Dec 30, 2004 12:58 am
by uphi
I watch RSSI with PRTG like this : http://12.10.166.70 look at Moriarty RSSI.
Earl - UpHi.net