VPLEX: /var/log/ filling up due to net-snmpd.log not rotating properly

           

   Article Number:     502100                                   Article Version: 4     Article Type:    Break Fix 
   

 


Product:

 

VPLEX GeoSynchrony,VPLEX Local,VPLEX Metro,VPLEX VS2,VPLEX VS6,VPLEX GeoSynchrony 5.5 Service Pack 1 Patch 2,VPLEX GeoSynchrony 5.5 Service Pack 2 Patch 1,VPLEX GeoSynchrony 5.5 Service Pack 2 Patch 2,VPLEX GeoSynchrony 5.5 Service Pack 2 Patch 3

 

Issue:

 

 

The /var/log/ folder on the management server fills to 100% due to net-snmpd.log not rotating properly.     
     
      The net-snmpd.log does not rotate and zip causing /var/log/ to fill to 100% and making it inaccessible. 
                                                           

 

 

Cause:

 

 

The logrotate configuration file for net-snmp (/etc/logrotate.d/net-snmp) is set to 'reload' instead of 'try-restart':        
          
   

        service@cluster-1:~> cat /etc/logrotate.d/net-snmp          
            /var/log/net-snmpd.log {          
               compress          
               dateext          
               maxage 365          
               rotate 10          
               size=+2048k          
               notifempty          
               missingok          
               create 644 root root          
               sharedscripts          
               postrotate          
                   /etc/init.d/snmpd reload||: <<--- this is set to "reload" instead of "try-restart"         
               endscript 
   
   
    This results in multiple signals being sent to the snmpd process to reload the configuration.       
       
        The production contents of the logrotate configuration, performs a try-restart, not a reload. 
                                                           

 

 

Change:

 

 

A change is made to the  /etc/logrotate.d/net-snmp file                                                           

 

 

Resolution:

 

 

WORKAROUND:        
       
        1. Log into to VPlex in service account       
        2. CD to /etc/logrotate.d/        
        3. Use  an editor such as VI or WinSCP  to edit net-snmp file change 'reload' to 'try-restart' , See below example 
   
        

      /var/log/net-snmpd.log {          
             compress          
             dateext          
             maxage 365          
             rotate 10          
             size=+2048k          
             notifempty          
             missingok          
             create 644 root root          
             sharedscripts          
             postrotate          
                 /etc/init.d/snmpd try-reload ||:  << -- Change "reload" to "try-restart"            
               
endscript          
          } 
   
   
    4. Log into vplexcli and restart the snmp agent as follows:   
        
      VPlexcli:/> snmp-agent stop                                                                                      
          SNMP agent has been stopped.          
         
          VPlexcli:/> snmp-agent start   
   
   
    5. If after following the steps above the issue persists please refer to KB 519579, "VPLEX: multiple errors in /var/log/net-snmpd.log file".   
   
    6. If after following the actions in KB 519579 the issue still persists please contact VPLEX Customer Service and mention   
        both articles. Collect-diagnostics will be needed for support to investigate this matter.