Uploaded image for project: 'Observium'
  1. Observium
  2. OBS-2215

SNR Ethernet Remote Devices (Series 2 and 4)

    XMLWordPrintable

Details

    • Add New Device / OS
    • Resolution: Fixed
    • Trivial
    • None
    • None
    • Discovery, Poller

    Description

      I want to add new devices SNR ERD 2.x
      //(also add SNR ERD 4.x but only definitions without any sensors/statuses, TODO later)
      //(I don't have any SNR ERD 3.x)
      Tested on SNR-ERD-2.3-termo-out

      It is my first try to add os with more then just add some strings to includes/definitions/os.inc.php

      Definitions/os

      includes/definitions/os.inc.php

      // SNR (shop.nag.ru)
       
      $os = "snr-erd-2";
      $config['os'][$os]['text']                  = "SNR ERD-2";
      $config['os'][$os]['icon']                  = "snr";
      $config['os'][$os]['sysObjectID'][]         = ".1.3.6.1.4.1.40418.2.2";
      $config['os'][$os]['type']                  = "environment";
      $config['os'][$os]['sysDescr_regex'][]      = "/Fmv_(?<version>\d[\w\.]+)/";
      $config['os'][$os]['ports_skip_ifType']     = TRUE;
      $config['os'][$os]['remote_access']         = array('http');
      $config['os'][$os]['mibs'][]                = "SNR-ERD-2";
       
      $os = "snr-erd-4";
      $config['os'][$os]['text']                  = "SNR ERD-4";
      $config['os'][$os]['icon']                  = "snr";
      $config['os'][$os]['sysObjectID'][]         = ".1.3.6.1.4.1.40418.2.6";
      $config['os'][$os]['type']                  = "environment";
      $config['os'][$os]['remote_access']         = array('http');
      $config['os'][$os]['mibs'][]                = "SNR-ERD-4";

      Definitions/mibs _ status discovery

      includes/definitions/mibs.inc.php

      // SNR (shop.nag.ru)
      $os = "snr-erd-2";
      $config['os'][$os]['text']                  = "SNR ERD-2";
      $config['os'][$os]['icon']                  = "snr";
      $config['os'][$os]['sysObjectID'][]         = ".1.3.6.1.4.1.40418.2.2";
      $config['os'][$os]['type']                  = "environment";
      $config['os'][$os]['sysDescr_regex'][]      = "/Fmv_(?<version>\d[\w\.]+)/";
      $config['os'][$os]['ports_skip_ifType']     = TRUE;
      $config['os'][$os]['remote_access']         = array('http');
      $config['os'][$os]['mibs'][]                = "SNR-ERD-2";
       
      $os = "snr-erd-4";
      $config['os'][$os]['text']                  = "SNR ERD-4";
      $config['os'][$os]['icon']                  = "snr";
      $config['os'][$os]['sysObjectID'][]         = ".1.3.6.1.4.1.40418.2.6";
      $config['os'][$os]['type']                  = "environment";
      $config['os'][$os]['remote_access']         = array('http');
      $config['os'][$os]['mibs'][]                = "SNR-ERD-4";

      Sensor discovery

      includes/discovery/sensors/snr-erd-2.inc.php

      <?php
       
      $scale          = 1;
      $outlet_oid     = ".1.3.6.1.4.1.40418.2.2.4.1.0";
      $outlet_descr   = "Temperature Sensor";
      $outlet_current = snmp_get($device,"temperatureSensor.0", "-Ovq", "SNR-ERD-2");
       
      if ($outlet_current >= 0)
      {
        discover_sensor($valid['sensor'], 'temperature', $device, $outlet_oid, 0, 'snr-erd-2', $outlet_descr, $scale, $outlet_current, $limits);
      }
      // EOF

      MIBs

      $ mkdir /opt/observium/mibs/nag/

      [^SNR-ERD-2] [^SNR-ERD-4]

      Attachments

        Activity

          People

            landy Mike Stupalov
            mtivi Martyushev Tim
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: