Add a new virtual machine (VM) that makes REST calls to the VxFlex OS GW.
The root directory/file system has filled up. The root directory shows 100% full when the following command runs:
df -h
Alternately, use the following command to see the amount of storage a particular directory is using:
du -hs [subdirectory name]
In this case, it would be:
du -hs /opt/emc/scaleio/gateway/logs/
External products and programs to the VxFlex OS GW are making multiple REST calls to this VM causing large localhost_access.log files to be created.
Setup FlexOS Gateway Catalina localhost_access LogRotation
- Modify the server.xml file located here:
/opt/emc/scaleio/gateway/conf/server.xml
- Modify the end of the file, the localhost_access logger from:
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log" suffix=".log"
pattern="%h %l %u %t "%r" %s %b" />
- To:
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access" suffix=".log" rotatable="false"
pattern="%h %l %u %t "%r" %s %b" />
- Save the file.
- Stop and restart gateway service using:
systemctl stop scaleio-gateway
systemctl start scaleio-gateway
Create the LogRotate Configuration
- Go to
vi /etc/logrotate.d/scaleio-gateway
- Add the following to the file:
/opt/emc/scaleio/gateway/logs/localhost_access.log {
copytruncate
daily
rotate 7
compress
missingok
}
Clean up the old logs
- Go to
rm -rf /opt/emc/scaleio/gateway/logs/localhost_access_log.*.txt
- New logs are written to
/opt/emc/scaleio/gateway/logs/localhost_access.log
- New logs are rotated every day for 7 days with
localhost_access.log.1.gz to 7.gz