Hope it's ok to ask a MIB design question here, I couldn't find any more
suitable list for this... 

If not, just link me to the correct place!



In my MIB, I have a couple of tables:

$ smidump -f tree ./BAYOUR-COM-MIB.txt
[....]
     +--zfsPoolStatusTable(5)
     |  |
     |  +--zfsPoolStatusEntry(1) [zfsPoolStatusIndex]
     |     |
     |     +-- --- CounterIndex       zfsPoolStatusIndex(1)
     |     +-- r-n DisplayString      zfsPoolName(2)
     |     +-- r-n Integer32          zfsPoolSize(3)
     |     +-- r-n Integer32          zfsPoolAlloc(4)
     |     +-- r-n Integer32          zfsPoolFree(5)
     |     +-- r-n Integer32          zfsPoolCap(6)
     |     +-- r-n DisplayString      zfsPoolDedup(7)
     |     +-- r-n ZFSPoolStatusValue zfsPoolHealth(8)
     |     +-- r-n DisplayString      zfsPoolAltRoot(9)
     |     +-- r-n Integer32          zfsPoolUsedBySnaps(10)
     |     +-- r-n Integer32          zfsPoolUsed(11)
     [....]
     +--zfsVFSIOPSTable(8)
     |  |
     |  +--zfsVFSIOPSEntry(1) [zfsVFSIOPSIndex]
     |     |
     |     +-- --- CounterIndex  zfsVFSIOPSIndex(1)
     |     +-- r-n DisplayString zfsPoolNameVFSIOPS(2)
     |     +-- r-n Counter32     zfsOperReads(3)
     |     +-- r-n Counter32     zfsOperWrites(4)

Now, I'd like to "reuse" 'zfsPoolName' in 'zfsVFSIOPSTable', but if I just
add that there:

          ZFSVFSIOPSEntry             ::= SEQUENCE {
            zfsVFSIOPSIndex           CounterIndex,

            zfsPoolName               DisplayString,
            zfsOperReads              Counter32,
            zfsOperWrites             Counter32
          }

I get:

        BAYOUR-COM-MIB.txt:2213: SEQUENCE element #2 `zfsPoolName' is not a 
child node under `zfsVFSIOPSEntry'
        BAYOUR-COM-MIB.txt:2213: warning: SEQUENCE element #3 `zfsOperReads' 
does not match order of columnar objects under `zfsVFSIOPSEntry'

Which is why I had to name it something really ugly like 'zfsPoolNameVFSIOPS' 
(this
is not the only place I want/need to reuse it in)...

The error in itself is quite obvious, don't get me wrong! But how can I include
a defined ... 'node' from/in another 'parent'?


The (second) most obvious (I thought) would be to use

        zfsPoolStatusTable::zfsPoolStatusEntry::zfsPoolName

but that obviously didn't work....


The full MIB file can be found at

        https://github.com/FransUrbo/snmp-modules/blob/master/BAYOUR-COM-MIB.txt

if someone needs/want to look at it.



PS. I've tried a couple of google queries, but I don't even know what to
    search for, so no luck there :)
--
As soon as you find a product that you really like,
they will stop making it.
- Wilson's Law


------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to