본문 바로가기

logstash3

KST 한국 시간을 세계표준 UTC 및 ISO8601 형식으로 변환(Converter) 다양한 장비들의 로그를 통합하기 위하여 수집하다 보면 시간의 타임존 형태가 다양할 수 있는데 표준이 아닌 "2024-03-19 02:26:04" 형식의 시간이 수집되는 경우 KST 시간으로 인식하고, 이를 UTC 시간으로 변환하여 ISO8601 형태로 반환하는 코드를 작성했습니다. 변환된 결과는 "2024-03-18T17:26:04Z" 입니다.from datetime import datetime, timedeltaimport pytzdef convert_kst_to_utc(input_time_str): # KST 시간대 설정 kst = pytz.timezone('Asia/Seoul') # 입력 값 형식이 ISO8601 형식이 아니므로, 년-월-일 시:분:초 형태로 파싱 .. 2024. 4. 29.
Splunk 대체 Solution으로서의 ELK Stack Splunk는 모든 머신 데이터를 실시간으로 collecting하고 Indexing하고 Reporting하는 End-to-End Solution이다. 모든 머신 데이터를 제한 없이 처리 할수있다. 사용자가 원하는 데이터를 즉시 분석할수 있으며, 원하는 Reporter, Dashboard를 추가적인 개발없이 구성할수 있다. 또한 통계적 명령들을 조합하여 여러가지 Query문으로 Search가 가능하며 Query문의 자동완성 기능까지 갖추고 있어 사용하기 매우 편리하다. 하지만 상당히 높은 가격대의 Solution이라서 일반적인 중소기업이 사용하기에 경제적으로 어렵다. 그래서 보다 낮은 가격대의 편하게 이용가능한 Splunk의 대체 Solution을 조사하던 중, Elasticsearch 사이트에서 Splu.. 2015. 4. 23.
OSSEC Log Management with Elasticsearch Log Management System ArchitectureThe OSSEC log management system I’ll discuss here relies on three open source technologies, in addition to OSSEC:Logstash – Parses and stores syslog data to ElasticsearchElasticsearch - General purpose indexing and data storage systemKibana – User interface that comes with ElasticSearchLogstash is configured to receive OSSEC syslog output then parse it and forwa.. 2013. 11. 23.