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

  1. Home
  2. Support
  3. SNMP get temperature

SNMP get temperature

Scheduled Pinned Locked Moved Support
2 Posts 2 Posters 13.0k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N
    N
    NickDoro
    wrote on last edited by
    #1

    Hello,

    I need some help with netxms bluecoat configuration , so i have 5 different proxys and all of them are on one template , but they are using 2 different versions of bluecoat , so one of them uses this .1.3.6.1.4.1.3417.2.1.1.1.1.1.5.5 oid to monitor CPU temp and others this .1.3.6.1.4.1.3417.2.1.1.1.1.1.5.20 oid to monitor CPU temperature.

    I want to add object which determines what proxy it is , and then add oid which one is needed.

    Here is what i did:

    Created new object that is looking for proxy name (for example: proxy1.dmd.lv, proxy2.dmd.lv and so on).
    Then i added few lines in object -> proporties -> transformation

    if ($1 == proxy1.dmd.lv)
    {
        value = SNMPGetValue(CPU temperature, ".1.3.6.1.4.1.3417.2.1.1.1.1.1.5.5");
        return (value);
    }
    else
    {
        value = SNMPGetValue(CPU temperature, ".1.3.6.1.4.1.3417.2.1.1.1.1.1.5.20");
        return (value);
    }

    but this script wasnt working for me , so could someone help me fix it?

    1 Reply Last reply
    0
    • T
      T
      Tursiops
      wrote on last edited by
      #2

      Hi,

      Based on what I can see at http://www.oidview.com/mibs/3417/SENSOR-MIB.html, the value you are trying to poll is part of a table.
      That means you should probably create a single template using Instance Discovery using .1.3.6.1.4.1.3417.2.1.1.1.1.1.1 as Base SNMP OID, instead of creating two different templates. You could probably also poll 1.3.6.1.4.1.3417.2.1.1.1.1.1.9 as part of your Instance Discovery script to return the name of the sensor for the DCI.

      The filter script would look similar to this:

      transport = CreateSNMPTransport($node);
      if (transport == null) return null;
      sensorName = SNMPGetValue(transport, ".1.3.6.1.4.1.3417.2.1.1.1.1.1.9." . $1);
      if (sensorName == null) return false;
      return %(true,$1,sensorName);
      

      I have no idea if the sensor name will always exist on this device or not. The code above will not create a DCI if a name does not exist. In fact, it will remove it if it can't find a name.

      You can then reference the sensor name in your DCI description as {instance-name} and the instance itself in the DCI parameter as {instance}.
      The parameter should therefore look like this:

      .1.3.6.1.4.1.3417.2.1.1.1.1.1.5.{instance}
      

      The description could be this:

      Bluecoat Temperature Sensor ({instance-name})
      

      Cheers

      1 Reply Last reply
      0

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • 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