System Integration Challenge: Ensuring Lossless Log Collection During MySQL Log Rotation with FluentBit
·
DevOps
OutlineOne concern I had while setting up logrotate was that although it was confirmed that logs could be received without loss through logrotate, the question was how fluentbit would recognize the newly created log files through logrotate.Since fluentbit also recognizes files registered to fd once based on inode, I had to notify fluentbit about the newly created files through logrotate.Therefor..
System-level Analysis of Lossless Log Rotation in MySQL: An strace-based Investigation of logrotate Mechanisms
·
데이터베이스/MySQL
What happens when you FLUSH LOGS and the RELOAD permissionI thought that the log file for MySQL would be continuously growing, making it difficult to check the logs later when analyzing the problem.So I thought of a way to store the logs in segments by dividing them by date.I looked into MySQL and found that you can restart the entire log file using the SQL Statement called FLUSH LOGS.https://de..
Deep Dive into MySQL Health Check Mechanisms: From Access Denied Analysis to Privilege Minimization
·
데이터베이스/MySQL
While checking MySQL's general log, I noticed that the message Connect Access denied for user 'root'@'localhost' (using password: NO) was added every 10 seconds.I clearly set the password through the environment variable MYSQL_ROOT_PASSWORD provided by the MYSQL Docker image, and when I checked the SQL statement in another General log, it didn't seem to be a problem caused by an incorrect root a..
Redis를 컨테이너 환경에서 실행할 때 deamonize을 키면 안되는 이유
·
데이터베이스/Redis
Redis의 deamonize 옵션은 기본적으로 꺼져 있는데, 이를 키게 되면 Redis를 데몬 프로세스로 실행하게 된다.데몬은 사용자가 제어하는 것이 아닌 백그라운드에서 돌면서 여러 작업을 하는 프로그램을 말한다. 일반적으로 데몬은 프로세스로 실행하지만, 부모 프로세스를 가지지 않으며 보통 포크를 통해 자식 프로세스가 만들어지고 이후 부모 프로세스를 죽이는 과정을 통해 자식 프로세스가 부모 프로세스가 되는 과정을 거치도록 한다. 이러한 방법을 fork off and die라고 한다.시스템은 시동할 때 데몬을 시작하는 경우가 많으며, 이러한 데몬들은 네트워크 요청, 하드웨어 동작, 여타 프로그램에 반응하는 기능을 담당하게 된다.데몬을 만드려면 보통 다음과 같은 과정을 거친다.프로세스를 제어하고 있는 터미..
umask란 무엇인가
·
궁금했던 거
umask - 위키백과, 우리 모두의 백과사전위키백과, 우리 모두의 백과사전. umask는 컴퓨팅에서 새로 만들어진 파일에 파일 권한을 어떻게 설정할지를 제어하는 마스크 설정을 결정하는 명령어이다. mask, umask 명령어와 umask 함수는 원래ko.wikipedia.org Linux_umaskumask : 리눅스에서 새로 만들어진 파일에 권한을 어떻게 설정할지 마스크를 결정하는 명령어. umask 명령은 mask 매개변수가 지정되지 않는 경우 현재 쉘 환경의 파일 모드 작성 마스크를 표준 출력proengineer.tistory.com umask는 앞으로 생길 파일/디렉토리의 권한을 설정하는 명령어이다.umask에서 파일은 기본적으로 666로 시작하고 디렉토리는 777으로 시작해서 계산한다.디렉토리..
MySQL 로깅 분할 방식에 대한 고찰
·
데이터베이스/MySQL
FLUSH LOGS 시 발생하는 일과 RELOAD 권한MySQL에 대한 로그 파일이 지속적으로 커져 추후 로그를 보며 문제를 분석할 때 확인하기 어려울 거 같다는 생각이 들었다.때문에 날짜별로 로그를 나눠서 저장함으로써 로그를 분할 저장하는 방식을 생각했다.MySQL을 찾아보니 FLUSH LOGS라는 SQL Statement를 사용해서 전반적인 로그 파일을 재시작시킬 수 있다고 한다. MySQL :: MySQL 8.4 Reference Manual :: 15.7.8.3 FLUSH Statement15.7.8.3 FLUSH Statement FLUSH [NO_WRITE_TO_BINLOG | LOCAL] { flush_option [, flush_option] ... | tables_option } flus..