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

SNR Ethernet Remote Devices (Series 2 and 4)

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

          [OBS-2215] SNR Ethernet Remote Devices (Series 2 and 4)

          fixed in r11340 and r11341

          mtivi Martyushev Tim added a comment - fixed in r11340 and r11341

          Current sensors discovery for UPS-MIB (includes/discovery/sensors/ups-mib.inc.php) doesn't discover all sensors from ERD-4.

          For debug purpose I add

          Index: includes/discovery/sensors/ups-mib.inc.php
          ===================================================================
          --- includes/discovery/sensors/ups-mib.inc.php	(revision 11338)
          +++ includes/discovery/sensors/ups-mib.inc.php	(working copy)
          @@ -66,6 +66,12 @@
             }
           }
           
          +if ($device['os'] === 'snr-erd')
          +{
          +  $indexes = array(0, 1);
          +  print_r($ups_array);
          +}
          +
          


          And all sesnors from UPS-MIB are discovered.

          Array $ups_array:

          Array
          (
              [1] => Array
                  (
                      [upsInputLineIndex] => 1
                      [upsInputFrequency] => 50
                      [upsInputVoltage] => 231
                      [upsOutputLineIndex] => 1
                      [upsOutputVoltage] => 231
                      [upsOutputCurrent] => 0
                      [upsOutputPower] => 0
                      [upsOutputPercentLoad] => 14
                  )
           
              [0] => Array
                  (
                      [upsOutputSource] => normal
                  )
           
          )

          please help to improve discovery

          mtivi Martyushev Tim added a comment - Current sensors discovery for UPS-MIB (includes/discovery/sensors/ups-mib.inc.php) doesn't discover all sensors from ERD-4. For debug purpose I add Index: includes/discovery/sensors/ups-mib.inc.php =================================================================== --- includes/discovery/sensors/ups-mib.inc.php (revision 11338) +++ includes/discovery/sensors/ups-mib.inc.php (working copy) @@ -66,6 +66,12 @@ } } +if ($device['os'] === 'snr-erd') +{ + $indexes = array(0, 1); + print_r($ups_array); +} + And all sesnors from UPS-MIB are discovered. Array $ups_array: Array ( [1] => Array ( [upsInputLineIndex] => 1 [upsInputFrequency] => 50 [upsInputVoltage] => 231 [upsOutputLineIndex] => 1 [upsOutputVoltage] => 231 [upsOutputCurrent] => 0 [upsOutputPower] => 0 [upsOutputPercentLoad] => 14 )   [0] => Array ( [upsOutputSource] => normal )   ) please help to improve discovery

          Added (with small changes) in r11336.

          landy Mike Stupalov added a comment - Added (with small changes) in r11336.

          I attached patch for ERD-2.3 / ERD-2, ERD-3 and ERD-4.
          snr-erd.patch

          landy You have an access to SNMP on EDR-4

          Also attached snmpwalk for ERD-2.3 / ERD-2, ERD-3.
          [^erd-2.3.snmpwalk] [^erd-2.snmpwalk] [^erd-3.snmpwalk]

          mtivi Martyushev Tim added a comment - I attached patch for ERD-2.3 / ERD-2, ERD-3 and ERD-4. snr-erd.patch landy You have an access to SNMP on EDR-4 Also attached snmpwalk for ERD-2.3 / ERD-2, ERD-3. [^erd-2.3.snmpwalk] [^erd-2.snmpwalk] [^erd-3.snmpwalk]

          I am working with vendor for fix MIB.
          I already have patch for ERD-2.3, ERD-3.0 and ERD-4.
          I need some more time for testing.

          mtivi Martyushev Tim added a comment - I am working with vendor for fix MIB. I already have patch for ERD-2.3, ERD-3.0 and ERD-4. I need some more time for testing.

          Please make snmp dumps for devices (you know how).
          Or give me snmp access (you know where).

          landy Mike Stupalov added a comment - Please make snmp dumps for devices (you know how). Or give me snmp access (you know where).

          please add access from omega.memetic.org so i can test

          adama Adam Armstrong added a comment - please add access from omega.memetic.org so i can test

          The sensor discovery is probably better done as an array entry, you can see examples in includes/definitions/mibs.inc.php

          This is easier to create and maintain than the old code method.

          adam.

          adama Adam Armstrong added a comment - The sensor discovery is probably better done as an array entry, you can see examples in includes/definitions/mibs.inc.php This is easier to create and maintain than the old code method. adam.

          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)
          $mib = 'SNR-ERD-2';
          $config['mibs'][$mib]['enable'] = 1;
          $config['mibs'][$mib]['identity_num'] = '.1.3.6.1.4.1.40418.2.2';
          $config['mibs'][$mib]['mib_dir'] = 'nag';
          $config['mibs'][$mib]['descr'] = 'SNR Ethernet Remote Device v2';
           
          // Statuses
          //FIXME: descr for monitorAlarmSignalContact3 must be <snmpget SNR-ERD-2::alarmSenseName.0 (iso.3.6.1.4.1.40418.2.2.5.3.0)> ; now use default value that can be changed by user
          $config['mibs'][$mib]['status']['monitorAlarmSignalContact3']['indexes'][0] = array('descr' => 'ALARM ', 'measured' => 'other', 'type' => 'monitorAlarmSignalContact', 'oid_num' => '.1.3.6.1.4.1.40418.2.2.3.1.0');
          //FIXME: descr for monitorAnySensorSignal1contact4 must be <snmpget SNR-ERD-2::userSense1Name.0 (iso.3.6.1.4.1.40418.2.2.5.5.0)> ; now use default value that can be changed by user
          $config['mibs'][$mib]['status']['monitorAnySensorSignal1contact4']['indexes'][0] = array('descr' => '1st sensor', 'measured' => 'other', 'type' => 'monitorAnySensorSignalcontact', 'oid_num' => '.1.3.6.1.4.1.40418.2.2.3.3.0');
          //FIXME: descr for monitorAnySensorSignal2contact7 must be <snmpget SNR-ERD-2::userSense2Name.0 (iso.3.6.1.4.1.40418.2.2.5.6.0)> ; now use default value that can be changed by user
          $config['mibs'][$mib]['status']['monitorAnySensorSignal2contact7']['indexes'][0] = array('descr' => '2nd sensor', 'measured' => 'other', 'type' => 'monitorAnySensorSignalcontact', 'oid_num' => '.1.3.6.1.4.1.40418.2.2.3.4.0');
          //FIXME: descr for monitorAnySensorSignal3contact9 must be <snmpget SNR-ERD-2::userSense3Name.0 (iso.3.6.1.4.1.40418.2.2.5.7.0)> ; now use default value that can be changed by user
          $config['mibs'][$mib]['status']['monitorAnySensorSignal3contact9']['indexes'][0] = array('descr' => '3rd sensor', 'measured' => 'other', 'type' => 'monitorAnySensorSignalcontact', 'oid_num' => '.1.3.6.1.4.1.40418.2.2.3.5.0');
          $config['mibs'][$mib]['status']['monitorVoltageSignal']['indexes'][0] = array('descr' => 'voltage on sensor', 'measured' => 'power', 'type' => 'monitorVoltageSignal', 'oid_num' => '.1.3.6.1.4.1.40418.2.2.3.6.0');
          $config['mibs'][$mib]['status']['remoteControlContact8']['indexes'][0] = array('descr' => 'SMART switch', 'measured' => 'other', 'type' => 'remoteControlContact', 'oid_num' => '.1.3.6.1.4.1.40418.2.2.2.3.0');
           
          $type = 'monitorAlarmSignalContact';
          $config['mibs'][$mib]['states'][$type][0] = array('name' => 'sensorOff', 'event' => 'ignore');
          $config['mibs'][$mib]['states'][$type][1] = array('name' => 'doorIsClose', 'event' => 'ok');
          $config['mibs'][$mib]['states'][$type][2] = array('name' => 'doorIsOpen', 'event' => 'alert');
          $config['mibs'][$mib]['states'][$type][3] = array('name' => 'sensorOn', 'event' => 'ignore');
          $type = 'monitorAnySensorSignalcontact';
          $config['mibs'][$mib]['states'][$type][0] = array('name' => 'sensorOff', 'event' => 'ignore');
          $config['mibs'][$mib]['states'][$type][1] = array('name' => 'sensorIs0', 'event' => 'alert');
          $config['mibs'][$mib]['states'][$type][2] = array('name' => 'sensorIs1', 'event' => 'ok');
          $config['mibs'][$mib]['states'][$type][3] = array('name' => 'sensorOn', 'event' => 'ignore');
          $type = 'monitorVoltageSignal';
          $config['mibs'][$mib]['states'][$type][0] = array('name' => 'sensorOff', 'event' => 'ignore');
          $config['mibs'][$mib]['states'][$type][1] = array('name' => 'voltageIsNo', 'event' => 'alert');
          $config['mibs'][$mib]['states'][$type][2] = array('name' => 'voltageIsYes', 'event' => 'ok');
          $config['mibs'][$mib]['states'][$type][3] = array('name' => 'sensorOn', 'event' => 'ignore');
          $type = 'remoteControlContact';
          $config['mibs'][$mib]['states'][$type][0] = array('name' => 'manON', 'event' => 'ok');
          $config['mibs'][$mib]['states'][$type][1] = array('name' => 'manOFF', 'event' => 'ok');
          $config['mibs'][$mib]['states'][$type][2] = array('name' => 'manualSetON', 'event' => 'ok');
          $config['mibs'][$mib]['states'][$type][3] = array('name' => 'termostatSetON', 'event' => 'warning');
          $config['mibs'][$mib]['states'][$type][4] = array('name' => 'switch', 'event' => 'warning');
          $config['mibs'][$mib]['states'][$type][5] = array('name' => 'autoON', 'event' => 'ok');
          $config['mibs'][$mib]['states'][$type][6] = array('name' => 'autoOFF', 'event' => 'ok');
           
          $mib = 'SNR-ERD-4';
          $config['mibs'][$mib]['enable'] = 1;
          $config['mibs'][$mib]['identity_num'] = '.1.3.6.1.4.1.40418.2.6';
          $config['mibs'][$mib]['mib_dir'] = 'nag';
          $config['mibs'][$mib]['descr'] = 'SNR Ethernet Remote Device v4';
          

          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);
          }
           
          $scale = 0.01;
          $outlet_oid = ".1.3.6.1.4.1.40418.2.2.4.2.0";
          $outlet_descr = "Voltage Sensor";
          //limit_high and limit_low from device specification
          $limits = array('limit_high' => 70,
          'limit_low' => 0,
          'limit_low_warn' => snmp_get($device,"sysVoltageAlarm", "-Ovq", "SNR-ERD-2") * $scale);
          $outlet_current = snmp_get($device,"voltageSensorContact10", "-Ovq", "SNR-ERD-2");
           
          if ($outlet_current >= 0)
          {
          discover_sensor($valid['sensor'], 'voltage', $device, $outlet_oid, 0, 'snr-erd-2', $outlet_descr, $scale, $outlet_current, $limits);
          }
           
          // EOF
          

          mtivi Martyushev Tim added a comment - 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) $mib = 'SNR-ERD-2' ; $config[ 'mibs' ][$mib][ 'enable' ] = 1 ; $config[ 'mibs' ][$mib][ 'identity_num' ] = '.1.3.6.1.4.1.40418.2.2' ; $config[ 'mibs' ][$mib][ 'mib_dir' ] = 'nag' ; $config[ 'mibs' ][$mib][ 'descr' ] = 'SNR Ethernet Remote Device v2' ;   // Statuses //FIXME: descr for monitorAlarmSignalContact3 must be <snmpget SNR-ERD-2::alarmSenseName.0 (iso.3.6.1.4.1.40418.2.2.5.3.0)> ; now use default value that can be changed by user $config[ 'mibs' ][$mib][ 'status' ][ 'monitorAlarmSignalContact3' ][ 'indexes' ][ 0 ] = array( 'descr' => 'ALARM ' , 'measured' => 'other' , 'type' => 'monitorAlarmSignalContact' , 'oid_num' => '.1.3.6.1.4.1.40418.2.2.3.1.0' ); //FIXME: descr for monitorAnySensorSignal1contact4 must be <snmpget SNR-ERD-2::userSense1Name.0 (iso.3.6.1.4.1.40418.2.2.5.5.0)> ; now use default value that can be changed by user $config[ 'mibs' ][$mib][ 'status' ][ 'monitorAnySensorSignal1contact4' ][ 'indexes' ][ 0 ] = array( 'descr' => '1st sensor' , 'measured' => 'other' , 'type' => 'monitorAnySensorSignalcontact' , 'oid_num' => '.1.3.6.1.4.1.40418.2.2.3.3.0' ); //FIXME: descr for monitorAnySensorSignal2contact7 must be <snmpget SNR-ERD-2::userSense2Name.0 (iso.3.6.1.4.1.40418.2.2.5.6.0)> ; now use default value that can be changed by user $config[ 'mibs' ][$mib][ 'status' ][ 'monitorAnySensorSignal2contact7' ][ 'indexes' ][ 0 ] = array( 'descr' => '2nd sensor' , 'measured' => 'other' , 'type' => 'monitorAnySensorSignalcontact' , 'oid_num' => '.1.3.6.1.4.1.40418.2.2.3.4.0' ); //FIXME: descr for monitorAnySensorSignal3contact9 must be <snmpget SNR-ERD-2::userSense3Name.0 (iso.3.6.1.4.1.40418.2.2.5.7.0)> ; now use default value that can be changed by user $config[ 'mibs' ][$mib][ 'status' ][ 'monitorAnySensorSignal3contact9' ][ 'indexes' ][ 0 ] = array( 'descr' => '3rd sensor' , 'measured' => 'other' , 'type' => 'monitorAnySensorSignalcontact' , 'oid_num' => '.1.3.6.1.4.1.40418.2.2.3.5.0' ); $config[ 'mibs' ][$mib][ 'status' ][ 'monitorVoltageSignal' ][ 'indexes' ][ 0 ] = array( 'descr' => 'voltage on sensor' , 'measured' => 'power' , 'type' => 'monitorVoltageSignal' , 'oid_num' => '.1.3.6.1.4.1.40418.2.2.3.6.0' ); $config[ 'mibs' ][$mib][ 'status' ][ 'remoteControlContact8' ][ 'indexes' ][ 0 ] = array( 'descr' => 'SMART switch' , 'measured' => 'other' , 'type' => 'remoteControlContact' , 'oid_num' => '.1.3.6.1.4.1.40418.2.2.2.3.0' );   $type = 'monitorAlarmSignalContact' ; $config[ 'mibs' ][$mib][ 'states' ][$type][ 0 ] = array( 'name' => 'sensorOff' , 'event' => 'ignore' ); $config[ 'mibs' ][$mib][ 'states' ][$type][ 1 ] = array( 'name' => 'doorIsClose' , 'event' => 'ok' ); $config[ 'mibs' ][$mib][ 'states' ][$type][ 2 ] = array( 'name' => 'doorIsOpen' , 'event' => 'alert' ); $config[ 'mibs' ][$mib][ 'states' ][$type][ 3 ] = array( 'name' => 'sensorOn' , 'event' => 'ignore' ); $type = 'monitorAnySensorSignalcontact' ; $config[ 'mibs' ][$mib][ 'states' ][$type][ 0 ] = array( 'name' => 'sensorOff' , 'event' => 'ignore' ); $config[ 'mibs' ][$mib][ 'states' ][$type][ 1 ] = array( 'name' => 'sensorIs0' , 'event' => 'alert' ); $config[ 'mibs' ][$mib][ 'states' ][$type][ 2 ] = array( 'name' => 'sensorIs1' , 'event' => 'ok' ); $config[ 'mibs' ][$mib][ 'states' ][$type][ 3 ] = array( 'name' => 'sensorOn' , 'event' => 'ignore' ); $type = 'monitorVoltageSignal' ; $config[ 'mibs' ][$mib][ 'states' ][$type][ 0 ] = array( 'name' => 'sensorOff' , 'event' => 'ignore' ); $config[ 'mibs' ][$mib][ 'states' ][$type][ 1 ] = array( 'name' => 'voltageIsNo' , 'event' => 'alert' ); $config[ 'mibs' ][$mib][ 'states' ][$type][ 2 ] = array( 'name' => 'voltageIsYes' , 'event' => 'ok' ); $config[ 'mibs' ][$mib][ 'states' ][$type][ 3 ] = array( 'name' => 'sensorOn' , 'event' => 'ignore' ); $type = 'remoteControlContact' ; $config[ 'mibs' ][$mib][ 'states' ][$type][ 0 ] = array( 'name' => 'manON' , 'event' => 'ok' ); $config[ 'mibs' ][$mib][ 'states' ][$type][ 1 ] = array( 'name' => 'manOFF' , 'event' => 'ok' ); $config[ 'mibs' ][$mib][ 'states' ][$type][ 2 ] = array( 'name' => 'manualSetON' , 'event' => 'ok' ); $config[ 'mibs' ][$mib][ 'states' ][$type][ 3 ] = array( 'name' => 'termostatSetON' , 'event' => 'warning' ); $config[ 'mibs' ][$mib][ 'states' ][$type][ 4 ] = array( 'name' => 'switch' , 'event' => 'warning' ); $config[ 'mibs' ][$mib][ 'states' ][$type][ 5 ] = array( 'name' => 'autoON' , 'event' => 'ok' ); $config[ 'mibs' ][$mib][ 'states' ][$type][ 6 ] = array( 'name' => 'autoOFF' , 'event' => 'ok' );   $mib = 'SNR-ERD-4' ; $config[ 'mibs' ][$mib][ 'enable' ] = 1 ; $config[ 'mibs' ][$mib][ 'identity_num' ] = '.1.3.6.1.4.1.40418.2.6' ; $config[ 'mibs' ][$mib][ 'mib_dir' ] = 'nag' ; $config[ 'mibs' ][$mib][ 'descr' ] = 'SNR Ethernet Remote Device v4' ; 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); }   $scale = 0.01 ; $outlet_oid = ".1.3.6.1.4.1.40418.2.2.4.2.0" ; $outlet_descr = "Voltage Sensor" ; //limit_high and limit_low from device specification $limits = array( 'limit_high' => 70 , 'limit_low' => 0 , 'limit_low_warn' => snmp_get($device, "sysVoltageAlarm" , "-Ovq" , "SNR-ERD-2" ) * $scale); $outlet_current = snmp_get($device, "voltageSensorContact10" , "-Ovq" , "SNR-ERD-2" );   if ($outlet_current >= 0 ) { discover_sensor($valid[ 'sensor' ], 'voltage' , $device, $outlet_oid, 0 , 'snr-erd-2' , $outlet_descr, $scale, $outlet_current, $limits); }   // EOF

          I can permit access for my test device via SNMP from your Observium (need your IP/FQDN).

          mtivi Martyushev Tim added a comment - I can permit access for my test device via SNMP from your Observium (need your IP/FQDN).

          People

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

            Dates

              Created:
              Updated:
              Resolved: