
Hello,
I try to add a new os and a new mib in my Observium. The device is a TBOX from Ovarro. The device is old so the bulk mode does not work.
I managed to add custom OID.
I managed to get metadata but sensors and status do not work because ". SNMP line 'prgrun = 1' not have index part"
Is there a way to make it work?
$os = "semaphore-tbox-os"; $config['os'][$os]['sysObjectID'][] = ".1.3.6.1.4.1.27982"; $config['os'][$os]['sysDescr'][] = "Configuration Energie-Annexes"; $config['os'][$os]['snmp']['nobulk'] = TRUE; $config['os'][$os]['snmp']['max-rep'] = 0; $config['os'][$os]['type'] = "power"; $config['os_group'][$os_group]['mib_blacklist'] = $config['os_group']['default']['mibs']; $config['os'][$os]['mibs'][] = "SEMAPHORE-RTU-MIB";
$mib = 'SEMAPHORE-RTU-MIB'; $config['mibs'][$mib]['enable'] = 1; $config['mibs'][$mib]['mib_dir'] = 'semaphore'; $config['mibs'][$mib]['identity_num'] = '.1.3.6.1.4.1.27982'; $config['mibs'][$mib]['descr'] = 'Semaphore RTU MIB.'; $config['mibs'][$mib]['sysname'][] = array('oid' => '.1.3.6.1.4.1.27982.1.7.2.23.0'); $config['mibs'][$mib]['version'][] = array('oid' => '.1.3.6.1.4.1.27982.1.7.2.26.0'); $config['mibs'][$mib]['sysdescr'][] = array('oid' => '.1.3.6.1.4.1.27982.1.7.2.23.0'); $config['mibs'][$mib]['syslocation'][] = array('oid' => '.1.3.6.1.4.1.27982.1.7.2.24.0'); $config['mibs'][$mib]['sensor'][] = array('oid' => 'prgrun', 'class' => 'gauge', 'descr' => 'prgrun', 'oid_num' => '.1.3.6.1.4.1.27982.1.7.1.28161'); $config['mibs'][$mib]['status'][] = array( 'oid_num' => '.1.3.6.1.4.1.27982.1.7.1.20519', 'oid' => 'presbat', 'descr' => 'presbat', 'measured' => 'presbat', 'type' => '0ok'); $type = '0ok'; $config['mibs'][$mib]['states'][$type][0] = array('name' => '0', 'event' => 'ok'); $config['mibs'][$mib]['states'][$type][1] = array('name' => '1', 'event' => 'alert');
The debug :
] prgrun [ CMD[/usr/bin/snmptranslate -On -Pu -m SEMAPHORE-RTU-MIB -M /opt/observium/mibs/rfc:/opt/observium/mibs/net-snmp:/opt/observium/mibs/semaphore 'SEMAPHORE-RTU-MIB::prgrun']
CMD EXITCODE[0] CMD RUNTIME[0.0094s] STDOUT[ .1.3.6.1.4.1.27982.1.7.1.28161 ] SNMP TRANSLATE (CMD): 'SEMAPHORE-RTU-MIB::prgrun' -> '.1.3.6.1.4.1.27982.1.7.1.28161' OS-specific no-bulk definition.
CMD[/usr/bin/snmpwalk -v2c -c *** -Pud -Ih -OQUsb -m SEMAPHORE-RTU-MIB -M /opt/observium/mibs/rfc:/opt/observium/mibs/net-snmp:/opt/observium/mibs/semaphore 'udp':'fth-arch-tbox01-yvfi':'161' prgrun]
CMD EXITCODE[0] CMD RUNTIME[0.0153s] STDOUT[ prgrun = 1 ] SNMP STATUS[TRUE] Warning. SNMP line 'prgrun = 1' not have index part ] o SEMAPHORE-RTU-MIB presbat [OS-specific no-bulk definition.
CMD[/usr/bin/snmpwalk -v2c -c *** -Pud -Ih -OQUsb -m SEMAPHORE-RTU-MIB -M /opt/observium/mibs/rfc:/opt/observium/mibs/net-snmp:/opt/observium/mibs/semaphore 'udp':'fth-arch-tbox01-yvfi':'161' presbat]
CMD EXITCODE[0] CMD RUNTIME[0.0146s] STDOUT[ presbat = 0 ] SNMP STATUS[TRUE] Warning. SNMP line 'presbat = 0' not have index part ] disjdepartbt [OS-specific no-bulk definition.
CMD[/usr/bin/snmpwalk -v2c -c *** -Pud -Ih -OQUsb -m SEMAPHORE-RTU-MIB -M /opt/observium/mibs/rfc:/opt/observium/mibs/net-snmp:/opt/observium/mibs/semaphore 'udp':'fth-arch-tbox01-yvfi':'161' disjdepartbt]
CMD EXITCODE[0] CMD RUNTIME[0.0144s] STDOUT[ disjdepartbt = 0 ] SNMP STATUS[TRUE] Warning. SNMP line 'disjdepartbt = 0' not have index part ]
Thanks in advance.
Thomas