Author Topic: SNMP and Database  (Read 18849 times)

vankooch

  • Administrator
  • Newbie
  • *****
  • Posts: 49
    • View Profile
SNMP and Database
« on: November 05, 2012, 06:54:09 AM »
Hi,

I've setup the ysnmp and monitoring module. It work as expected, but I still have a problem when displaying the Database table.
It looks like the MIBs file is outdated. I've build Yate from SVN checked out on Revision: 5312 and I'm using the MIBS file in version: 201204242240Z

Code: [Select]
snmptable -v 2c -c public yate1.server YATE-MIB::databaseTable
SNMP table: YATE-MIB::databaseTable

 databaseIndex databaseAccount queriesCount failedQueries errorQueries queryExecTime
             1          dbone            0             0            0 0 miliseconds
 YATE-MIB::databaseTable: WARNING: More columns on agent than in MIB

Other tables work without any problems:

Code: [Select]
snmptable -v 2c -c public yate1.server YATE-MIB::activeCallsTable
SNMP table: YATE-MIB::activeCallsTable

 callEntryIndex callEntryID callEntryStatus callEntryCaller    callEntryCalled callEntryDuration callEntryPeerChan
              1    sip/8005        answered        XXXX                   XXXX      3917 seconds          sip/8006
              2    sip/8006        answered        XXXX                   XXXX      3917 seconds          sip/8005
              3    sip/8424        answered        XXXX                   XXXX      2904 seconds          sip/8425
........

When I snmpwalk through the database table I get this:

Code: [Select]
snmpwalk -v 2c -c public yate1.server YATE-MIB::databaseTable
YATE-MIB::databaseIndex.1 = Counter32: 1
YATE-MIB::databaseAccount.1 = STRING: dbone
YATE-MIB::queriesCount.1 = Counter32: 0
YATE-MIB::failedQueries.1 = Counter32: 0
YATE-MIB::errorQueries.1 = Counter32: 0
YATE-MIB::queryExecTime.1 = INTEGER: 0 miliseconds
YATE-MIB::tooManyQueriesAlarms.1 = Counter32: 0
YATE-MIB::tooManyFailedQueriesAlarms.1 = Counter32: 0
YATE-MIB::tooManyErrorQueriesAlarms.1 = Counter32: 0
YATE-MIB::queryExecTooLongAlarms.1 = Counter32: 0
YATE-MIB::noConnectionAlarms.1 = Counter32: 0
YATE-MIB::queriesCountThreshold.1 = Counter32: 1000
YATE-MIB::failedQueriesThreshold.1 = Counter32: 500
YATE-MIB::errorQueriesThreshold.1 = Counter32: 500
YATE-MIB::queryExecTimeThreshold.1 = Counter32: 30000 miliseconds

So I get much more informations than cols on the table. If I try to display the MIB, it looks like if there where groups nested in the YATE-MIB::databaseTable table. I guess we should ungroup YATE-MIB::databaseAlarmCounters and YATE-MIB::databaseThresholds.
In the MIB file we have on line 1251
Code: [Select]
DatabaseEntry ::= SEQUENCE {
databaseIndex Counter32,
databaseAccount DisplayString,
queriesCount Counter32,
failedQueries Counter32,
errorQueries Counter32,
queryExecTime INTEGER,
databaseAlarmCounters DatabaseAlarmCounters,
databaseThresholds DatabaseThresholds
}

I guess when removing the groups and add them as simple column it should work. The MIBS file could look like this, but I guess the ysnmp/monitoring module needs an update, too?

Code: [Select]
DatabaseEntry ::= SEQUENCE {
databaseIndex Counter32,
databaseAccount DisplayString,
queriesCount Counter32,
failedQueries Counter32,
errorQueries Counter32,
queryExecTime INTEGER,
tooManyQueriesAlarms Counter32,
tooManyFailedQueriesAlarms Counter32,
tooManyErrorQueriesAlarms Counter32,
queryExecTooLongAlarms Counter32,
noConnectionAlarms                 Counter32,
        queriesCountThreshold Counter32,
failedQueriesThreshold Counter32,
errorQueriesThreshold Counter32,
queryExecTimeThreshold Counter32
}

Update:

I've edit the YATE-MIB.txt and snmp_mib.conf to match the new table layout and now it works. I have attached the patch files.

Code: [Select]
% snmptable -v 2c -c public  yate1.server YATE-MIB::databaseTable
SNMP table: YATE-MIB::databaseTable

 databaseIndex databaseAccount queriesCount failedQueries errorQueries  queryExecTime tooManyQueriesAlarms tooManyFailedQueriesAlarms tooManyErrorQueriesAlarms queryExecTooLongAlarms noConnectionAlarms queriesCountThreshold failedQueriesThreshold errorQueriesThreshold queryExecTimeThreshold
             1          dbone           22             0            0 2 milliseconds                    0                          0                         0                      0                  0                  1000                    500                   500     30000 milliseconds




« Last Edit: November 05, 2012, 05:54:03 PM by vankooch »

Ioana Stanciu

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
Re: SNMP and Database
« Reply #1 on: November 06, 2012, 06:25:34 AM »
Hi,

We cannot accept the patch as this seems to be a limitation of the snmptable application.  Capturing the  SNMP packets shows that Yate returns the appropriate data, only that they are on a level below in the MIB tree. snmptable ignores all those responses.

snmpwalk seems to be the appropriate tool for this case as it can deal with the layout of the table data.

Regards,
Oana

vankooch

  • Administrator
  • Newbie
  • *****
  • Posts: 49
    • View Profile
Re: SNMP and Database
« Reply #2 on: November 07, 2012, 02:07:56 PM »
Hi,

thx for the review. I'm not really getting your point. Are there any downsides? Snmptable is part of net-snmp which is the open source reference implementation of SNMP, can't deal with it and many other os and tools relay on that. So it would be great to have that function. It would be also possible not to use a table at all, and just use snmpwalk, but I think table do a better work. The main reason for me is that I'm currently creating a zabbix template for yate which does not work fully, because of that.

Diana Cionoiu

  • Administrator
  • Jr. Member
  • *****
  • Posts: 71
    • View Profile
Re: SNMP and Database
« Reply #3 on: November 15, 2012, 05:36:25 PM »
@vankooch: The point is that the tool that you are trying to use has a problem. And we are just saying that you should use another tool.

vankooch

  • Administrator
  • Newbie
  • *****
  • Posts: 49
    • View Profile
Re: SNMP and Database
« Reply #4 on: November 27, 2012, 12:47:30 PM »
Ok I've discussed it with the guys from net-snmp and they told me that having to bug at all, net-snmp works as it should...
Then finally one guy in the #net-snmp chan told me that having a sequence within a table is wrong.
Quote
[7:14pm]vankooch: Hi, I'm building a MIB for a application.. I want to know if it is possible to have sequence to be part of a table?
...
[7:37pm] rstory-work: vankooch: no, you can't have a sequence inside a sequence..
[7:37pm] rstory-work: you have to have a second table with the same index as the first plus a secondary index..
[7:38pm] vankooch: ok so I'll have two tables?
[7:38pm] rstory-work: yes

...

Ioana Stanciu

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
Re: SNMP and Database
« Reply #5 on: January 23, 2013, 06:31:45 AM »
The solution seems to be to deprecate the entries that cause the problem and add new ones which are valid for snmptable (either by including the data currently in a sequence in the table columns, either by defining 2 tables linked by index).

My question is what happens when you interrogate for a deprecated OID. Maybe you could help me with that?

vankooch

  • Administrator
  • Newbie
  • *****
  • Posts: 49
    • View Profile
Re: SNMP and Database
« Reply #6 on: July 24, 2013, 01:50:27 PM »
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

Code: [Select]
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

Code: [Select]
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

Code: [Select]
@@ -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

Code: [Select]
@@ -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.

Code: [Select]
@@ -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.11
Tables 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

Code: [Select]
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.
Quote
[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 here

So 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 :))

Code: [Select]
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.

« Last Edit: July 27, 2013, 07:39:07 PM by vankooch »