科研信息化技术与应用
科研信息化技術與應用
과연신식화기술여응용
E-science Technology & Application
2015年
2期
19-27
,共9页
周康%李觊%董科军%南凯
週康%李覬%董科軍%南凱
주강%리기%동과군%남개
PaaS平台%日志服务%Thrift远程过程调用%MongoDB数据库%Docker容器
PaaS平檯%日誌服務%Thrift遠程過程調用%MongoDB數據庫%Docker容器
PaaS평태%일지복무%Thrift원정과정조용%MongoDB수거고%Docker용기
PaaS%log Service%Thrift remote procedure call%MongoDB%Docker
传统的方式是将日志记录到本地日志文件中,然后使用日志分析程序进行分析.而 PaaS平台运行着由不同编程语言和开发框架编写的应用,其记录日志的方式不尽相同,使日志分析程序的通用性不佳;一个应用又会有多个实例在运行,导致同一个应用的日志分散在多个地方,不便于管理.本文设计了一种简单灵活的日志格式,使用 Thrift作为远程调用框架,支持多种编程语言调用服务,将日志数据统一在 MongoDB中进行存取和查询.开发者还可以指定字段进行统计,直接生成图表.系统部署则采用 Docker容器的方式,可以方便地进行水平扩展.实际运行表明,运用相关技术构建的日志收集分析系统易于使用,功能丰富,能够灵活扩展,很好地满足了 PaaS平台的需求.
傳統的方式是將日誌記錄到本地日誌文件中,然後使用日誌分析程序進行分析.而 PaaS平檯運行著由不同編程語言和開髮框架編寫的應用,其記錄日誌的方式不儘相同,使日誌分析程序的通用性不佳;一箇應用又會有多箇實例在運行,導緻同一箇應用的日誌分散在多箇地方,不便于管理.本文設計瞭一種簡單靈活的日誌格式,使用 Thrift作為遠程調用框架,支持多種編程語言調用服務,將日誌數據統一在 MongoDB中進行存取和查詢.開髮者還可以指定字段進行統計,直接生成圖錶.繫統部署則採用 Docker容器的方式,可以方便地進行水平擴展.實際運行錶明,運用相關技術構建的日誌收集分析繫統易于使用,功能豐富,能夠靈活擴展,很好地滿足瞭 PaaS平檯的需求.
전통적방식시장일지기록도본지일지문건중,연후사용일지분석정서진행분석.이 PaaS평태운행착유불동편정어언화개발광가편사적응용,기기록일지적방식불진상동,사일지분석정서적통용성불가;일개응용우회유다개실례재운행,도치동일개응용적일지분산재다개지방,불편우관리.본문설계료일충간단령활적일지격식,사용 Thrift작위원정조용광가,지지다충편정어언조용복무,장일지수거통일재 MongoDB중진행존취화사순.개발자환가이지정자단진행통계,직접생성도표.계통부서칙채용 Docker용기적방식,가이방편지진행수평확전.실제운행표명,운용상관기술구건적일지수집분석계통역우사용,공능봉부,능구령활확전,흔호지만족료 PaaS평태적수구.
Logging the records to local files and analyzing them with analysis programs are the traditional way. However, on PaaS, the diversity of log records the applications developed with varies programming languages makes the log analysis programs losing the generality. At the same time, the instances of each application generate log files in different machines, which increases the complexity of management. The log collection and analysis system supports for multiple languages to invocate the log service over Thrift remote procedure call with a flexible log format. Log data are stored in MongoDB. Developers can generate charts and graphs directly with the specified fields. The system can easily scaled out deploying with Docker containers. The experiment indicates that with these techniques, the log collection and analysis system is easy to use, feature-rich, flexible to expand, satisfying the needs of PaaS well.