Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse
Brand Logo

NetXMS Forum

R

rhodri

@rhodri.ross
Unfollow Follow
About
Posts
6
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Instance Discovery Filter Script - and display name
    R rhodri
    Support

    right after a bit of digging and feeling like a total tit.. 

    It turns out I was missing a . from the Concatenation operator simple mistake so this now seems to work

    getoid = ".1.3.6.1.4.1.14988.1.1.19.1.1.2.";
    instance = $1;
    walk = $node.createSNMPTransport()?.getValue(getoid .. instance);
    if(walk == NULL) {
    walk = $1;
    }
    return [true, instance, walk];
    

    and this now effects the {instance-name} as intended.

    hope it helps someone in the future!


  • Instance Discovery Filter Script - and display name
    R rhodri
    Support

    hi guys and girls,
    bit of a question I have about setting the display name based of another SNMP query the data is as follows 

    1.3.6.1.4.1.14988.1.1.19.1.1.2.11 [STRING] = sfp11
    1.3.6.1.4.1.14988.1.1.19.1.1.2.12 [STRING] = sfp12
    1.3.6.1.4.1.14988.1.1.19.1.1.3.11 [INTEGER] = 0
    1.3.6.1.4.1.14988.1.1.19.1.1.3.12 [INTEGER] = 1
    1.3.6.1.4.1.14988.1.1.19.1.1.4.11 [INTEGER] = 0
    1.3.6.1.4.1.14988.1.1.19.1.1.4.12 [INTEGER] = 0
    1.3.6.1.4.1.14988.1.1.19.1.1.5.11 [GAUGE32] = 131000
    1.3.6.1.4.1.14988.1.1.19.1.1.5.12 [GAUGE32] = 85000
    1.3.6.1.4.1.14988.1.1.19.1.1.6.11 [GAUGE32] = 30
    1.3.6.1.4.1.14988.1.1.19.1.1.6.12 [GAUGE32] = 41
    1.3.6.1.4.1.14988.1.1.19.1.1.7.11 [GAUGE32] = 3290
    1.3.6.1.4.1.14988.1.1.19.1.1.7.12 [GAUGE32] = 3256
    1.3.6.1.4.1.14988.1.1.19.1.1.8.11 [GAUGE32] = 17
    1.3.6.1.4.1.14988.1.1.19.1.1.8.12 [GAUGE32] = 4
    1.3.6.1.4.1.14988.1.1.19.1.1.9.11 [INTEGER] = -5468
    1.3.6.1.4.1.14988.1.1.19.1.1.9.12 [INTEGER] = -6800
    1.3.6.1.4.1.14988.1.1.19.1.1.10.11 [INTEGER] = -1407
    1.3.6.1.4.1.14988.1.1.19.1.1.10.12 [INTEGER] = 0
    

    I have tried this to get something but all I get is an error: Minor netxms1 SYS_SCRIPT_ERROR Script (DCI::TheDevice::8963::InstanceFilter) execution error: Error 15 in line 1: Unknown object's attribute 

    dd = $node.createSNMPTransport()?.getValue(".1.3.6.1.4.1.14988.1.1.19.1.1.2.".$1);
    if(dd!=NULL) {
    return [true, $1, dd];
    }
    
    return [true, $1, $1];
    

    if I try getting the data via a seperate script and replace $node with the device it works any help would be great im new to Netxms and Scripting.

    Thanks 
    Rhodri


    Screenshot 2024-12-29 102311.png

    Screenshot 2024-12-29 102404.png


  • Geo Location Scripting Issue
    R rhodri
    Support

    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
    

  • Geo Location Scripting Issue
    R rhodri
    Support

    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


  • odd issue with nxsnmpwalk yet snmpwalk works fine..
    R rhodri
    Support

    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!


  • odd issue with nxsnmpwalk yet snmpwalk works fine..
    R rhodri
    Support

    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?

  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups