Project

General

Profile

Bug #24402

Improvements to SNMP MIB

Added by Mike Kelly over 1 year ago. Updated 12 months ago.

Status:
Resolved
Priority:
Nice to have
Assignee:
William Grzybowski
Category:
OS
Target version:
Seen in:
Sprint:
Severity:
New
Backlog Priority:
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
Yes
Needs Merging:
Yes
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

The FREENAS-MIB doesn't seem to be able to compile in OpenNMS until I made the attached updates.


I'd also suggest setting a custom sysObjectID, to more clearly differentiate FreeNAS / TrueNAS gear from generic FreeBSD gear.

A workaround for that seems to be to just add sysObjectID .1.3.6.1.4.1.25359 to the "Auxiliary parameters" section in the UI.


Related issues

Related to FreeNAS - Bug #25734: Expose zvol state through SNMPResolved2017-08-30
Related to FreeNAS - Bug #26295: More improvements to SNMP MIBResolved2017-10-20
Has duplicate FreeNAS - Feature #25822: zfs-snmp rewriteClosed: Duplicate2017-09-08

Associated revisions

Revision 380ee7cc (diff)
Added by vaibhav-rbs over 1 year ago

made API payload changes.

Ticket: #24402

Revision 7f32a6b8 (diff)
Added by vaibhav-rbs over 1 year ago

made API payload changes.

Ticket: #24402

Revision d8ccc578 (diff)
Added by Vladimir Vinogradenko about 1 year ago

feat(snmp): send SNMP traps for new alerts

Ticket: #24402

Revision 0c071044 (diff)
Added by Vladimir Vinogradenko about 1 year ago

feat(snmp): send SNMP traps for new alerts

Ticket: #24402

Revision c2a13620 (diff)
Added by Dru Lavigne 12 months ago

Mention SNMP improvements.
Ticket: #24402

History

#1 Updated by William Grzybowski over 1 year ago

  • Status changed from Unscreened to Screened
  • Priority changed from No priority to Nice to have
  • Target version set to 11.0

#2 Avatar?id=14398&size=24x24 Updated by Kris Moore over 1 year ago

  • Target version changed from 11.0 to 11.0-U1

#3 Updated by William Grzybowski over 1 year ago

  • Status changed from Screened to Unscreened
  • Assignee changed from William Grzybowski to Suraj Ravichandran

Suraj, you seem to have worked on SNMP before and know more about this, would you mind taking this?

#4 Updated by Mike Kelly over 1 year ago

The whole SNMP integration seems like it could stand a more complete rewrite.

First, it seems that you're using an enterprise number that's assigned to someone else: https://www.iana.org/assignments/enterprise-numbers/enterprise-numbers

25359
  Perspektiv Bredband AB
    Jakob Borg
      jakob&perspektivbredband.se

You should register your own one here: http://pen.iana.org/pen/PenApplication.page


Secondly, the whole thing seems to be built upon the pass command, meaning that just walking part of that OID can take minutes, each time spawning a separate instance of the zfs-snmp process.

Instead, that process should probably be more persistent, and built on the "agentx" functionality in Net-SNMP.


Thirdly, the structure of your MIB doesn't seem to follow the normal conventions for Tables, meaning you can't just do something like:

snmptable 10.1.2.3 FREENAS-MIB::zpool

And other tools that know how to make use of SNMP tables won't be of much use.


Finally, a "nice to have" feature would be the ability to send out traps. Presumably you'd have two types of traps, one corresponding to a new alert showing in the UI, and another to that alert being cleared, and you'd have some sort of unique alert identifier included in both to allow those alerts to be cleared automatically in whatever management system is being used.

#5 Updated by Suraj Ravichandran over 1 year ago

  • Status changed from Unscreened to Screened

#6 Updated by Vaibhav Chauhan over 1 year ago

  • Target version changed from 11.0-U1 to 11.0-U2

#7 Updated by Vaibhav Chauhan over 1 year ago

  • Target version changed from 11.0-U2 to 11.0-U3

#8 Avatar?id=14398&size=24x24 Updated by Kris Moore about 1 year ago

  • Status changed from Screened to 46

Suraj - Anything to update here?

#9 Updated by Suraj Ravichandran about 1 year ago

  • Status changed from 46 to Screened
  • Target version changed from 11.0-U3 to 11.1

Lemme try to get this in by U3.

#10 Updated by Fayçal NOUSHI about 1 year ago

Confirmed by using snmpwalk as well as on Zenoss. The latter rely on SNMP table views to automatically discover new volumes/pools... It's bugged with this version, on the volume part.

Agreed that FreeNAS alert translation to SNMP traps would be useful, too ! Right now, I'm using a scripted API call to extract it. But, it has the downside of needing a periodic polling (up to one polling cycle delay before notification). Here's the code:
https://github.com/N-faycal/ZenPacks.iXsystems.TrueNAS/blob/master/ZenPacks/iXsystems/TrueNAS/libexec/getTrueNASAlerts.py

#11 Updated by Dru Lavigne about 1 year ago

  • Assignee changed from Suraj Ravichandran to William Grzybowski

William: please load balance between Vladimir and Nikola. Note that the IANA issue was resolved in another ticket.

#12 Updated by William Grzybowski about 1 year ago

  • Status changed from Screened to Unscreened
  • Assignee changed from William Grzybowski to Vladimir Vinogradenko

Vladimir, is this something you can tackle?

Thanks!

#13 Updated by Vladimir Vinogradenko about 1 year ago

I am not an SNMP expert, so for me it may take more time than usual, but I'll be glad to handle that.

#14 Updated by Vladimir Vinogradenko about 1 year ago

  • Status changed from Unscreened to Screened

#15 Updated by Vladimir Vinogradenko about 1 year ago

  • Status changed from Screened to Fix In Progress

#16 Updated by David Pilibosian about 1 year ago

I've rewritten the zfs-snmp module to take advantage of pass_persist. A full walk now takes ~5 seconds.
Forum post https://forums.freenas.org/index.php?threads/ive-rewritten-zfs-snmp-testers-wanted.57622/
feature post https://bugs.freenas.org/issues/25822

#17 Updated by Dru Lavigne about 1 year ago

#18 Updated by Vladimir Vinogradenko about 1 year ago

  • Status changed from Fix In Progress to Needs Developer Review
  • Assignee changed from Vladimir Vinogradenko to William Grzybowski
  • AgentX is now used instead of pass
  • MIB file was completely rewritten and now follows conventions for table
  • Alerts are sent as SNMP traps

#19 Updated by Dru Lavigne about 1 year ago

  • Related to Bug #25734: Expose zvol state through SNMP added

#20 Updated by Mike Kelly about 1 year ago

Vladimir Pustosmekhov wrote:

  • AgentX is now used instead of pass
  • MIB file was completely rewritten and now follows conventions for table
  • Alerts are sent as SNMP traps

Thanks, I can confirm the new MIB now passes smilint, at least.

The use of AgentX seems like it should be a good improvement as well.

Some feedback from my perusal of the new MIB:

  • It would be nice to have the alertLevel as an integer value, enumerating all of the possible levels (I imagine that's basically just "WARN, CRITICAL, NORMAL")
  • It would be very very nice to include some unique ID for an alert, so that we can correlate traps in upstream NMS systems.
  • With that, it would be awesome to have separate "clearing" alerts that come in, including the ID of the alert that is being cleared, when an alert is no longer active; that way, upstream NMS systems can automatically clear alerts on their own dashboards.
  • Similar to the alertLevel, the zpoolHealth should be an enumerated integer value, to make it easier for consumers to know all of the possible values, and to make it easier for upstream alerting systems to classify events.

#21 Updated by Dru Lavigne about 1 year ago

Vladimir/William: can these be added as well or should a separate ticket be made to address Mike's latest suggestions?

#22 Updated by William Grzybowski about 1 year ago

Mike Kelly wrote:

Vladimir Pustosmekhov wrote:

  • AgentX is now used instead of pass
  • MIB file was completely rewritten and now follows conventions for table
  • Alerts are sent as SNMP traps

Thanks, I can confirm the new MIB now passes smilint, at least.

The use of AgentX seems like it should be a good improvement as well.

Some feedback from my perusal of the new MIB:

  • It would be nice to have the alertLevel as an integer value, enumerating all of the possible levels (I imagine that's basically just "WARN, CRITICAL, NORMAL")
  • It would be very very nice to include some unique ID for an alert, so that we can correlate traps in upstream NMS systems.
  • With that, it would be awesome to have separate "clearing" alerts that come in, including the ID of the alert that is being cleared, when an alert is no longer active; that way, upstream NMS systems can automatically clear alerts on their own dashboards.
  • Similar to the alertLevel, the zpoolHealth should be an enumerated integer value, to make it easier for consumers to know all of the possible values, and to make it easier for upstream alerting systems to classify events.

Can you create a new ticket for these please?

#23 Updated by William Grzybowski about 1 year ago

  • Status changed from Needs Developer Review to Reviewed by Developer

#24 Updated by Dru Lavigne about 1 year ago

Mike: can you create that new feature request so that it is attributed to you?

#25 Updated by Dru Lavigne about 1 year ago

  • Subject changed from FREENAS-MIB is invalid to Improvements to SNMP MIB
  • Status changed from Reviewed by Developer to Ready For Release
  • Target version changed from 11.1 to 11.1-BETA1

#26 Updated by Dru Lavigne 12 months ago

  • Related to Bug #26295: More improvements to SNMP MIB added

#27 Updated by Dru Lavigne 12 months ago

  • Status changed from Ready For Release to Resolved

#28 Updated by Joe Maloney 12 months ago

  • Needs QA changed from Yes to No
  • QA Status deleted (Not Tested)

#29 Updated by Dru Lavigne 8 months ago

  • File deleted (FREENAS-MIB-fixed.txt)

Also available in: Atom PDF