Hi,

oana thx for the patch now ysnmp is working great! But I still have problems with the MIB

I've run smilint on the new MIB and there are some error. smilint has many debug levels as you can see

`0 Internal error, no recovery possible. Examples are memory allocation failures. Errors of this level usually cause the application to abort.`

1 Major SMI/SPPI error, recovery somehow possible but may lead to severe problems. Examples are lexically unexpected characters or unknown keywords. Errors of this kind usually lead to follow-on errors.

2 SMI/SPPI error which is probably tolerated by some implementations. Examples are MIB/PIB modules which mix constructs from different SMI/SPPI versions.

3 SMI/SPPI error which is likely tolerated by many implementations. Examples are misplaced SMIv2 MODULE-IDENTITY invocations or SMIv2 textual conventions derived from other textual conventions.

4 Something which is not strictly an error but which is recommended to be changed. Warnings of this level are usually considered during MIB reviews.

5 Something that is basically correct but might be problematic in certain environments or usage scenarios. Examples are warnings that identifiers only differ in case or that type definitions are not used within the defining module.

6 Messages of this level are auxiliary notices. Examples are messages that point to a previous definition in case of a redefinition.

So up to level 2 all errors are more or less critical for smilint

`sudo smilint -s -e -l 2 YATE-MIB.original.txt `

YATE-MIB.original.txt:302: [2] {identifier-redefined} redefinition of identifier `moduleInfo'

YATE-MIB.original.txt:394: [2] {sequence-type-mismatch} type of `callEntryDuration' in sequence and object type definition do not match

YATE-MIB.original.txt:911: [2] {subtype-illegal} subtyping not allowed

YATE-MIB.original.txt:912: [2] {subtype-illegal} subtyping not allowed

YATE-MIB.original.txt:913: [2] {subtype-illegal} subtyping not allowed

YATE-MIB.original.txt:914: [2] {subtype-illegal} subtyping not allowed

YATE-MIB.original.txt:996: [2] {subtype-illegal} subtyping not allowed

YATE-MIB.original.txt:997: [2] {subtype-illegal} subtyping not allowed

YATE-MIB.original.txt:998: [2] {subtype-illegal} subtyping not allowed

YATE-MIB.original.txt:1887: [1] {internal-other} syntax error, unexpected OBJECTS, expecting DESCRIPTION

YATE-MIB.original.txt:1888: [1] {internal-other} syntax error, unexpected DESCRIPTION

YATE-MIB.original.txt:112: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.original.txt:128: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.original.txt:263: [2] {row-index-missing} row `moduleEntry' lacks index definition

YATE-MIB.original.txt:329: [2] {row-index-missing} row `activeCallEntry' lacks index definition

YATE-MIB.original.txt:425: [2] {row-index-missing} row `trunkEntry' lacks index definition

YATE-MIB.original.txt:529: [2] {row-index-missing} row `linksetEntry' lacks index definition

YATE-MIB.original.txt:607: [2] {row-index-missing} row `linkEntry' lacks index definition

YATE-MIB.original.txt:693: [2] {row-index-missing} row `interfaceEntry' lacks index definition

YATE-MIB.original.txt:764: [2] {row-index-missing} row `accountEntry' lacks index definition

YATE-MIB.original.txt:870: [2] {row-index-missing} row `qosEntry' lacks index definition

YATE-MIB.original.txt:902: [2] {basetype-unknown} type `ASRData' of node `asrData' does not resolve to a known base type

YATE-MIB.original.txt:987: [2] {basetype-unknown} type `NERData' of node `nerData' does not resolve to a known base type

YATE-MIB.original.txt:1045: [2] {basetype-unknown} type `EndCauseCounters' of node `callEndCauseCounters' does not resolve to a known base type

YATE-MIB.original.txt:921: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.original.txt:929: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.original.txt:937: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.original.txt:946: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.original.txt:955: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.original.txt:963: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.original.txt:971: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.original.txt:979: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.original.txt:1003: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.original.txt:1011: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.original.txt:1020: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.original.txt:1029: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.original.txt:1037: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.original.txt:1076: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.original.txt:1084: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.original.txt:1092: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.original.txt:1100: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.original.txt:1108: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.original.txt:1116: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.original.txt:1124: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.original.txt:1132: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.original.txt:1140: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.original.txt:1148: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.original.txt:1156: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.original.txt:1164: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.original.txt:1172: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.original.txt:1180: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.original.txt:1188: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.original.txt:1196: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.original.txt:1204: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.original.txt:1212: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.original.txt:1220: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.original.txt:1228: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.original.txt:1259: [2] {row-index-missing} row `databaseEntry' lacks index definition

YATE-MIB.original.txt:1327: [2] {basetype-unknown} type `DatabaseAlarmCounters' of node `databaseAlarmCounters' does not resolve to a known base type

YATE-MIB.original.txt:1383: [2] {basetype-unknown} type `DatabaseThresholds' of node `databaseThresholds' does not resolve to a known base type

YATE-MIB.original.txt:1343: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.original.txt:1351: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.original.txt:1359: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.original.txt:1367: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.original.txt:1375: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.original.txt:1398: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.original.txt:1406: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.original.txt:1414: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.original.txt:1422: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.original.txt:1452: [2] {row-index-missing} row `rtpEntry' lacks index definition

YATE-MIB.original.txt:1276: [2] {type-unknown} unknown type `DatabaseThresholds'

Additional descriptions of some error/warning messages:

Error: internal-other (level 1)

Message: %s

Description: An unspecified error occured. Please submit a detailed bug report

to the libsmi maintainer or the libsmi mailing list at

<libsmi@ibr.cs.tu-bs.de>.

Error: subtype-illegal (level 2)

Message: subtyping not allowed

Description: The types OBJECT IDENTIFIER, IpAddress, Counter32, Counter64,

and TimeTicks, and any types in a SEQUENCE clause must not be

sub-typed (RFC 2578, Sections 7.1.12 and 9).

As you can see we have some erros. I guess the errors on level [1] are all related to smilint parsing(and may bee some other snmp agents) and can easy be fixed. This should have no side effects as we just change the order, not any OIDs/Names

`@@ -1883,8 +1883,8 @@`

genericAlarms OBJECT IDENTIFIER ::= { alarms 7 }

genericAlarm NOTIFICATION-TYPE

- STATUS current

OBJECTS { alarmSource, alarmLevel, alarmText }

+ STATUS current

DESCRIPTION

"A generic YATE alarm."

::= { genericAlarms 1 }

Then we have some errors on level [2], most important for smilint is the use of subtypes in SEQUENCE which violates the RFC.

See

https://tools.ietf.org/html/rfc2578 on 7.1.12, 9 and 11. This also can bee fixed pretty easy with no side effects and any changes to the OIDs

`@@ -908,10 +908,10 @@`

::= { qosEntry 3 }

ASRData ::= SEQUENCE {

- lowASRThreshold INTEGER (-1..100),

- highASRThreshold INTEGER (-1..100),

- currentASR INTEGER (-1..100),

- overallASR INTEGER (-1..100),

+ lowASRThreshold INTEGER,

+ highASRThreshold INTEGER,

+ currentASR INTEGER,

+ overallASR INTEGER,

currentLowASRAlarmCount Counter32,

currentHighASRAlarmCount Counter32,

overallLowASRAlarmCount Counter32,

@@ -993,15 +993,15 @@

::= { qosEntry 4 }

NERData ::= SEQUENCE {

- lowNERThreshold INTEGER (-1..100),

- currentNER INTEGER (-1..100),

- overallNER INTEGER (-1..100),

+ lowNERThreshold INTEGER,

+ currentNER INTEGER,

+ overallNER INTEGER,

currentLowNERAlarmCount Counter32,

overallLowNERAlarmCount Counter32

}

And there is a type miss-match for callEntryDuration. In the SEQUENCE we have type Counter32, in the key definition we have DisplayString, also in snmp_mib.conf So I've fixed that in the SEQUENCE in DisplayString also.

`@@ -340,7 +340,7 @@`

callEntryStatus DisplayString,

callEntryCaller DisplayString,

callEntryCalled DisplayString,

- callEntryDuration Counter32,

+ callEntryDuration DisplayString,

callEntryPeerChan DisplayString

}

And we have moduleInfo defined two times one as a section name and one as a cell, this can also cause errors. I've changed the section name from moduleInfo to moduleInfos

All errors like "{row-index-missing} row `moduleEntry' lacks index definition" are easy to fix as the only need INDEX {...}parameter, no side effects.

Like

https://tools.ietf.org/html/rfc2578#section-7.11Tables Rows:

* moduleEntry

* activeCallEntry

* trunkEntry

* linksetEntry

* linkEntry

* interfaceEntry

* accountEntry

* qosEntry

* databaseEntry

* rtpEntry

This error "[2] {type-unknown} unknown type `DatabaseThresholds'" is because of a copy and past bug I guess

On line 1391 the SEQUENCE DatabaseAlarmCounters should be DatabaseThresholds to match. DatabaseAlarmCounters was defined twice.

After those changes smilint is more friendly

`sudo smilint -s -e -l 2 YATE-MIB.new.txt`

YATE-MIB.new.txt:112: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.new.txt:128: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.new.txt:910: [2] {basetype-unknown} type `ASRData' of node `asrData' does not resolve to a known base type

YATE-MIB.new.txt:995: [2] {basetype-unknown} type `NERData' of node `nerData' does not resolve to a known base type

YATE-MIB.new.txt:1053: [2] {basetype-unknown} type `EndCauseCounters' of node `callEndCauseCounters' does not resolve to a known base type

YATE-MIB.new.txt:929: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.new.txt:937: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.new.txt:945: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.new.txt:954: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.new.txt:963: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.new.txt:971: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.new.txt:979: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.new.txt:987: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.new.txt:1011: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.new.txt:1019: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.new.txt:1028: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.new.txt:1037: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.new.txt:1045: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.new.txt:1084: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.new.txt:1092: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.new.txt:1100: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.new.txt:1108: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.new.txt:1116: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.new.txt:1124: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.new.txt:1132: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.new.txt:1140: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.new.txt:1148: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.new.txt:1156: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.new.txt:1164: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.new.txt:1172: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.new.txt:1180: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.new.txt:1188: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.new.txt:1196: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.new.txt:1204: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.new.txt:1212: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.new.txt:1220: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.new.txt:1228: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.new.txt:1236: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.new.txt:1336: [2] {basetype-unknown} type `DatabaseAlarmCounters' of node `databaseAlarmCounters' does not resolve to a known base type

YATE-MIB.new.txt:1392: [2] {basetype-unknown} type `DatabaseThresholds' of node `databaseThresholds' does not resolve to a known base type

YATE-MIB.new.txt:1352: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.new.txt:1360: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.new.txt:1368: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.new.txt:1376: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.new.txt:1384: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.new.txt:1407: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.new.txt:1415: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.new.txt:1423: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.new.txt:1431: [2] {parent-scalar} scalar's parent node must be simple node

Ok we still have errors... as I mentioned before nesting SEQUENCES / Tables is wrong.

[11:50pm] vankooch: can a sequence be an element from an other sequence, nested sequence, in a mib file?

[11:50pm] rstory-work: nope.. you use multiple tables, each of which adds and additional index..

[11:51pm] vankooch: so nested tables work?

[11:51pm] rstory-work: no, you can't nest.. you aproximate with multiple tables...

[11:51pm] rstory-work: see http://stackoverflow.com/questions/2510211/snmp-asn-1-mib-definitions-referencing-a-table-within-a-table

Have look at

hereSo I've removed the nested SEQUENCES and have created child tables instead, this comes along with changes in OIDs and names.

But now we have only two errors left..which is great

`sudo smilint -s -e -l 2 YATE-MIB.new.txt `

YATE-MIB.new.txt:112: [2] {parent-scalar} scalar's parent node must be simple node

YATE-MIB.new.txt:128: [2] {parent-scalar} scalar's parent node must be simple node

And this errors are similar to the nested SEQUENCES stuff. It is also wrong to fork OBJECT-TYPE with OBJECT-TYPE. OBJECT-TYPE can only have parents like OBJECT IDENTIFIER. So I have changed that also.

Now we have no error up to level 3....we still have some errors on level 4 and 5 which are mostly related to Conformance Statements

see

https://tools.ietf.org/html/rfc2580, but this is an other story

**Update 1**Ok I've tried that out... everything works great now, tables, walks, get, get next. I need to check the traps and alarms later

I also would recommend to search and replace all INTERGER with Interger32. INTERGER is snmpv1 and Interger32 is snmpv2, which the mib uses and imports from SNMPv2-SMI.

I've attached some patches. The first one only have the changes which do not affect any OID only one section name moduleInfo -> moduleInfos

The full patches have all changes so far..

There is also a svg with a overview of the fixed mibs... could not create on for the original

**Update 2**I've created a simple Zabbix Template for Yate. It works with the fully fixed mib. You just need to import it and assign the {$SNMP_COMMUNITY} macro.

It has most information imported, trap and alarms are missing.