OS definition problems

Hi!

I have a case to add some Eltex devices e.g. MES23xx and MES21xx and cannot define OS.
I haven’t find prepared .yaml files for this, so I made my one like in instruction (https://docs.librenms.org/Developing/os/Initial-Detection/)

Here is file I’ve created (both of them “eltex-mes2324p.yaml”):
at includes/definitions/:

os: eltex-mes2324p
type: network
icon: eltex
over:
    - { graph: device_bits, text: 'Device Traffic' }
    - { graph: device_processor, text: 'CPU Usage' }
    - { graph: device_mempool, text: 'Memory Usage' }
mib_dir: eltex
bad_ifXEntry:
    - 'Eltex 2324P'
discovery:
    - sysObjectID:
        - .1.3.6.1.4.1.35265.1.92
    - sysDescr
        -  'MES2324'

and at includes/definitions/discovery/:

mib: RADLAN-DEVICEPARAMS-MIB
modules:
    os:
        version:
            - 1.3.6.1.4.1.89.2.4
        serial:
            - .1.3.6.1.4.1.89.2.11.1

So, it not working:) If I call ./discovery.php -d -h -m ‘os’ I see

| MES2324P AC 28-port 1G/10G Managed Switch with 24 POE+ ports | .1.3.6.1.4.1.35265.1.92 |  
SNMP['/usr/bin/snmpget' '-v3' '-l' 'authPriv' '-n' "" '-a' 'SHA' '-A' 'PASSWORD' '-u' 'USER' '-x' 'DES' '-X' 'PASSWORD' '-Oqv' '-M' '/opt/librenms/mibs:/opt/librenms/mibs/eltex:/opt/librenms/mibs/arris' 'udp:HOSTNAME:161' '.1.3.6.1.4.1.1166.1.621.14.2.0']
No Such Object available on this agent at this OID  
  
SNMP['/usr/bin/snmpget' '-v3' '-l' 'authPriv' '-n' "" '-a' 'SHA' '-A' 'PASSWORD' '-u' 'USER' '-x' 'DES' '-X' 'PASSWORD' '-Oqv' '-M' '/opt/librenms/mibs:/opt/librenms/mibs/eltex' 'udp:HOSTNAME:161' '.1.3.6.1.4.1.8072.1.3.2.3.1.2.6.100.105.115.116.114.111']
No Such Object available on this agent at this OID  
  
Attempting to initialize OS: eltex-mes2324p  
OS initialized as Generic  
OS:  (eltex-mes2324p)

What should I do to solve this porblem?

Looks correct. Some minor issues:

  1. your version oid needs to start with a .
  2. you did not specify a display text for your OS
  3. your detection means .1.3.6.1.4.1.35265.1.92 OR MES2324 You don’t need the second sysDescr check and may actually cause false detection.

Thank you for your reply!

Yes, I removed line “text: ‘Eltex’” from includes/definitions/eltex-mes2324p.yaml and added sysDescr while tried solve the problem.
Also, added dot in oil, still not working even after rm -f cache/os_defs.cache

Can you give me some advice? Maybe it should be solved only with .php?

Unlikely you need php.

If you create a pull request on github, I would be happy to take a look. https://docs.librenms.org/Developing/Using-Git/

I’ve created issue at GitHub