SevOne SDN Collector Set Log Rotation

This topic provides the guideline on how to set log rotation.



To set log rotation, execute the following steps.
  1. Using ssh, log in as support to SevOne NMS appliance you are linking SDN Controller with.
    ssh support@<SevOne NMS appliance IP address>
    Important: The commands below must be run from the host as root.
  2. Create file /etc/logrotate.d/SDN.
    
    touch /etc/logrotate.d/SDN
    
  3. Using a text editor of your choice, add the following to /etc/logrotate.d/SDN file and then, save it.
    
    /var/log/<site name provided when adding SDN device>/<v7.1.x>/*/*.log
    {
        daily
        missingok
        maxage 30
        rotate 30
        copytruncate
        compress
        delaycompress
        notifempty
    }
    
  4. Execute the following commands to provide read / write access to logrotate.
    
    sudo chown -R root:root /var/log/<site name provided when adding SDN device>/<v7.1.x>/
    
    sudo chmod -R 755 /var/log/<site name provided when adding SDN device>/<v7.1.x>/
    
    sudo find /var/log/<site name provided when adding SDN device>/<v7.1.x>/ -type f -exec chmod 644 {} \;
    
    sudo restorecon -Rv /var/log/<site name provided when adding SDN device>/<v7.1.x>/
    
    sudo restorecon -Rv /var/lib/logrotate/
    
    sudo touch /var/lib/logrotate/logrotate.status
    
    sudo chown root:root /var/lib/logrotate/logrotate.status
    
    sudo chmod 644 /var/lib/logrotate/logrotate.status