Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - rhodri.ross

#1
General Support / Re: Geo Location Scripting Issue
July 04, 2021, 06:52:57 PM

after creating a transformation script to test to see if its an issue with the script from before I mean its quite simple...

return replace("  232   "," ","");

I get this as an error
Error 11 in line 1: Function not found
#2
General Support / Geo Location Scripting Issue
July 04, 2021, 03:09:05 AM
right very simple one for one of you scripting gods lol

firstly I'm using Mikrotik router boards and I have a a GPS fitted to a few of them and for a bit of a mess about was thinking on using them to track a few assets mainly out of interest. I saw a script which I guess would do the job but..


transport = CreateSNMPTransport($node);
if (transport == null) {
  return null;
}

lat = SNMPGetValue(transport, ".1.3.6.1.4.1.14988.1.1.12.3.0");
long = SNMPGetValue(transport, ".1.3.6.1.4.1.14988.1.1.12.2.0");

if (lat == null || long == null) {
  return null;
}
println lat;
println long;

geoLoc =new GeoLocation(lat, long, 1);
$node->setGeoLocation(geoLoc);
return 0;



but I get this as an error. which seems a little odd I suspect its the '' at the end so tried to use the replace function but that doesn't work and I get Function not found as a returned error


N 00 00' 0.000''
W 0 00' 0.000''
Error 4 in line 15: Bad arithmetic conversion


I also tried to strip the chars with no real effect.. oddly enough if I copy and paste the returned values (not including the '') into the geo location on the device properties it works fine but I really want to automate this process to be fair.

Thanks
Rhodri
#3
well well well.. this i never expected it seemed to be a NAT related issue not sure why but the old snmpwalk works fine yet the nxsnmpwalk would be stopped by the the firewall it was something very odd indeed but hay ho!

p.s love the software ;) keep up the good work!
#4
right a really odd issue, I have about 14 crs112 switches and a few ubnt radios in the the network plus a butt load of mikrotik routers and other kit ccr1009's no issue even the rb2011 add on fine but the CRS112, and UBNT radios just won't find the interfaces. I tried first by command line

nxsnmpwalk -v 1 -c public [ip] .1.3.6.1.2.1.2.2.1.2 and would get -> SNMP Error: Request timed out

on the same server using..

snmpwalk -v 1 -c public [ip] .1.3.6.1.2.1.2.2.1.2
iso.3.6.1.2.1.2.2.1.2.1 = STRING: "lo"
iso.3.6.1.2.1.2.2.1.2.2 = STRING: "eth0"
iso.3.6.1.2.1.2.2.1.2.3 = STRING: "eth1"
iso.3.6.1.2.1.2.2.1.2.4 = STRING: "wifi0"
iso.3.6.1.2.1.2.2.1.2.5 = STRING: "ath0"
iso.3.6.1.2.1.2.2.1.2.6 = STRING: "eth0.100"
iso.3.6.1.2.1.2.2.1.2.7 = STRING: "ath0.100"
iso.3.6.1.2.1.2.2.1.2.8 = STRING: "eth0.1000"
iso.3.6.1.2.1.2.2.1.2.9 = STRING: "ath0.1000"
iso.3.6.1.2.1.2.2.1.2.10 = STRING: "ath0.400"
iso.3.6.1.2.1.2.2.1.2.11 = STRING: "eth0.400"
iso.3.6.1.2.1.2.2.1.2.12 = STRING: "eth0.10"
iso.3.6.1.2.1.2.2.1.2.13 = STRING: "ath0.10"
iso.3.6.1.2.1.2.2.1.2.14 = STRING: "br0"
iso.3.6.1.2.1.2.2.1.2.15 = STRING: "br1"
iso.3.6.1.2.1.2.2.1.2.16 = STRING: "br2"
iso.3.6.1.2.1.2.2.1.2.17 = STRING: "br3"
iso.3.6.1.2.1.2.2.1.2.18 = STRING: "br4"

i suspect its a naming issue of some description but I have no real clue where to start?