Project

General

Profile

Bug #24051

Add SNMP log level and default to LOG_ERR

Added by Ash Gokhale over 1 year ago. Updated about 1 year ago.

Status:
Resolved
Priority:
No priority
Assignee:
William Grzybowski
Category:
Middleware
Target version:
Seen in:
Severity:
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:

tn z

ChangeLog Required:
No

Description

Snmpd notices warning blowing up logs; the default should be less chatty; as seen internally elsewhere;

 
#dmesg -a | tail                                                                                            :root:~/ash:8:00:46:527ixbackup-b
May 18 08:00:04 snmpd[2971]: error on subcontainer 'swrun container' insert (-1)
May 18 08:00:04 snmpd[2971]: error on subcontainer 'swrun container' insert (-1)
May 18 08:00:04 snmpd[2971]: error on subcontainer 'swrun container' insert (-1)

from /etc/rc.conf.local:
snmpd_flags=\"-Ls5d\  <<<-- too chatty

from snmpcmd(5)

      For -LF and -LS the priority specification comes before the file or
       facility token.  The priorities recognised are:

              0 or !  for LOG_EMERG,
              1 or a for LOG_ALERT,
              2 or c for LOG_CRIT,
              3 or e for LOG_ERR,
              4 or w for LOG_WARNING,
              5 or n for LOG_NOTICE,
              6 or i for LOG_INFO, and
              7 or d for LOG_DEBUG.

Setting it to alert by default and allowing configuration to jack it up again would be best; alternately - an auxprop or flags control field would.


Related issues

Is duplicate of FreeNAS - Bug #24249: iXsystems support request (John Sanderson)Closed: Duplicate2017-05-31
Is duplicate of FreeNAS - Bug #25298: SNMP dtrace logClosed: Duplicate2017-07-25

Associated revisions

Revision 53615d2c (diff)
Added by William Grzybowski over 1 year ago

feat(snmp): add log level and change default to LOG_ERR

Ticket: #24051

Revision 857e6264 (diff)
Added by William Grzybowski over 1 year ago

feat(snmp): add log level and change default to LOG_ERR

Ticket: #24051

Revision b939a695 (diff)
Added by William Grzybowski over 1 year ago

feat(snmp): add log level and change default to LOG_ERR

Ticket: #24051

Revision 3dab8139 (diff)
Added by Dru Lavigne about 1 year ago

Add new Log Level field to SNMP.
Ticket: #24051

Revision 0cea4442 (diff)
Added by William Grzybowski about 1 year ago

feat(snmp): add log level and change default to LOG_ERR

Ticket: #24051

Revision 04e39933 (diff)
Added by Kris Moore about 1 year ago

feat(snmp): add log level and change default to LOG_ERR (#405)

  • feat(snmp): add log level and change default to LOG_ERR

Ticket: #24051

  • Add missing migrations for this fix branch to work

History

#1 Updated by William Grzybowski over 1 year ago

  • Status changed from Unscreened to Screened

#2 Updated by Ash Gokhale over 1 year ago

It might also that the async loop is throwing some exception here:

github_src/freenas/gui/tools/freenas-snmpd.py: unmodified, readonly:
line 195 of 35

class Loop_Sockserver(threading.Thread):
    def __init__(self):
        super(Loop_Sockserver, self).__init__()
        self.daemon = True
        self.obj = SockSelect()

    def run(self):
        try:
            asyncore.loop()
        except Exception as e:
            syslog(LOG_ALERT, str(e)) <---- another possible leak to syslog 
        finally:

This blows up the logs with this sort of output:

Jun  1 13:43:52 TNC2 snmpd[3217]: params 1017/1024  -n 
#pragma D option quiet
 inline int OPT_time = 0;
 inline int OPT_txg = 0;
 inline int OPT_pool = 0;
 inline int OPT_mega = 0;
 inline int INTERVAL = 1;
 inline int LINES = -1;
 inline int COUNTER = 1;
 inline int FILTER = 0;
 inline string POOL = "";
 dtrace:::BEGIN
 {
    /* starting values */
    MEGA = 1000000;
    counts = COUNTER;
    secs = INTERVAL;
    interval = INTERVAL;
    interval == 0 ? interval++ : 1;
    line = 0;
    last_event[""] = 0;
    nused=0;
    nused_max_per_sec=0;
    nused_per_sec=0;
    size=0;
    size_max_per_sec=0;
    size_per_sec=0;
    syncops=0;
    size_4k=0;
    size_4k_32k=0;
    size_32k=0;
    OPT_txg ? printf("waiting for txg commit...\n") : 1;
 }

 /*
  * collect info when zil_lwb_write_start fires
  */
fbt::zil_lwb_write_start:entry
/OPT_pool == 0 || POOL == args[0]->zl_dmu_pool->dp_spa->spa_name/
{
     nused += args[1]->lwb_nused;
     nused_per_sec += args[1]->lwb_nused;
     size += args[1]->lwb_sz;
     size_per_sec += args[1]->lwb_sz;
     syncops+
 ....
....

#3 Updated by Ash Gokhale over 1 year ago

  • Tracker changed from Feature to Bug
  • Priority changed from Nice to have to Expected
  • Seen in set to 9.10.2-U3
  • Hardware Configuration updated (diff)
  • Migration Needed set to No

This feature is getting bugified because it elides logs required for field support - XYZ-920-81636.

#4 Updated by Ash Gokhale over 1 year ago

  • Subject changed from add snmpd log level control to add snmpd log level control - lower log volume
  • Category changed from 2 to 55

#5 Updated by William Grzybowski over 1 year ago

  • Status changed from Screened to Ready For Release

#6 Updated by William Grzybowski over 1 year ago

  • Is duplicate of Bug #24249: iXsystems support request (John Sanderson) added

#7 Updated by William Grzybowski over 1 year ago

  • Is duplicate of Bug #25298: SNMP dtrace log added

#8 Updated by Dru Lavigne over 1 year ago

  • Subject changed from add snmpd log level control - lower log volume to Add SNMP log and default to LOG_ERR

#9 Updated by Dru Lavigne over 1 year ago

  • Subject changed from Add SNMP log and default to LOG_ERR to Add SNMP log level and default to LOG_ERR

#10 Updated by Dru Lavigne about 1 year ago

  • Target version changed from 11.1 to 11.1-BETA1

#11 Updated by Dru Lavigne about 1 year ago

  • Status changed from Ready For Release to Resolved

#12 Updated by Nick Wolff about 1 year ago

  • QA Status Test Passes FreeNAS added
  • QA Status deleted (Not Tested)

#13 Updated by Joe Maloney about 1 year ago

  • Needs QA changed from Yes to No

Also available in: Atom PDF