Zabbix ログ解析方法. 2018/2/14 サイバートラスト株式会社 Linux/OSS 事業部技術統括部花島タケシ. Copyright Cybertrust Japan Co., Ltd. All rights reserved.

Similar documents
Unofficial Redmine Cooking - QA #782 yaml_db を使った DB のマイグレーションで失敗する

Yamaha Steinberg USB Driver V for Mac Release Notes

MySQL Cluster 7.3 リリース記念!! 5 分で作る MySQL Cluster 環境

Cloud Connector 徹底解説. 多様な基盤への展開を可能にするための Citrix Cloud のキーコンポーネント A-5 セールスエンジニアリング本部パートナー SE 部リードシステムズエンジニア. 哲司 (Satoshi Komiyama) Citrix

携帯電話の 吸収率 (SAR) について / Specific Absorption Rate (SAR) of Mobile Phones

API サーバの URL. <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE COMPLIANCE_SCAN SYSTEM "

携帯電話の 吸収率 (SAR) について / Specific Absorption Rate (SAR) of Mobile Phones

UB-U01III/U02III/U03II User s Manual

本書について... 7 本文中の表記について... 7 マークについて... 7 MTCE をインストールする前に... 7 ご注意... 7 推奨 PC 仕様... 8 MTCE をインストールする... 9 MTCE をアンインストールする... 11

Methods to Detect Malicious MS Document File using File Structure Inspection

Agilent. IO Libraries Suite 16.3/16.2 簡易取扱説明書. [ IO Libraries Suite 最新版 ]

A. 展開図とそこから折れる凸立体の研究 1. 複数の箱が折れる共通の展開図 2 通りの箱が折れる共通の展開図 3 通りの箱が折れる共通の展開図そして. 残された未解決問題たち 2. 正多面体の共通の展開図 3. 正多面体に近い立体と正 4 面体の共通の展開図 ( 予備 )

Introduction to Information and Communication Technology (a)

Yamaha Steinberg USB Driver V for Windows Release Notes

Androidプログラミング 2 回目 迫紀徳

Yamaha Steinberg USB Driver V for Windows Release Notes

今日の予定 1. 展開図の基礎的な知識 1. 正多面体の共通の展開図. 2. 複数の箱が折れる共通の展開図 :2 時間目 3. Rep-Cube: 最新の話題 4. 正多面体に近い立体と正 4 面体の共通の展開図 5. ペタル型の紙で折るピラミッド型 :2 時間目 ~3 時間目

Computer Programming I (Advanced)

サーブレットと Android との連携. Generated by Foxit PDF Creator Foxit Software For evaluation only.

~ ソフトウエア認証への取り組みと課題 ~

電脳梁山泊烏賊塾 構造体のサイズ. Visual Basic

Online Meetings with Zoom

J の Lab システムの舞台裏 - パワーポイントはいらない -

振込依頼書記入要領 Entry Guide for Direct Deposit Request Form

Snoop cache. AMANO, Hideharu, Keio University Textbook pp.40-60

DürrConnect the clever connection. The quick connection with the Click

WD/CD/DIS/FDIS stage

Googleの強みは ささえるのは世界一のインフラ. Google File System 2008年度後期 情報システム構成論2 第10回 クラウドと協調フィルタリング. 初期(1999年)の Googleクラスタ. 最近のデータセンタ Google Chrome Comicより

PSLT Adobe Typekit Service (2016v1.1)

Certificate of Accreditation

PRODUCT DESCRIPTIONS AND METRICS

サンプル. NI TestStand TM I: Introduction Course Manual

暗い Lena トーンマッピング とは? 明るい Lena. 元の Lena. tone mapped. image. original. image. tone mapped. tone mapped image. image. original image. original.

2. 集団の注目位置推定 提案手法では 複数の人物が同一の対象を注視している状況 置 を推定する手法を検討する この状況下では 図 1 のよう. 顔画像からそれぞれの注目位置を推定する ただし f は 1 枚 この仮説に基づいて 複数の人物を同時に撮影した低解像度顔

BMW Head Up Display (HUD) Teardown BMW ヘッドアップディスプレイティアダウン

楽天株式会社楽天技術研究所 Autumn The Seasar Foundation and the others all rights reserved.

PCIe SSD PACC EP P3700 Intel Solid-State Drive Data Center Tool

JASCO-HPLC Operating Manual. (Analytical HPLC)

Centralized (Indirect) switching networks. Computer Architecture AMANO, Hideharu

TOOLS for MR V1.7.7 for Mac Release Notes

フラクタル 1 ( ジュリア集合 ) 解説 : ジュリア集合 ( 自己平方フラクタル ) 入力パラメータの例 ( 小さな数値の変化で模様が大きく変化します. Ar や Ai の数値を少しずつ変化させて描画する. ) プログラムコード. 2010, AGU, M.

Quick Install Guide. Adaptec SCSI RAID 2120S Controller

IPv6 関連 WG の状況 (6man, v6ops, softwire)

Quick Installation Manual

Studies of Large-Scale Data Visualization: EXTRAWING and Visual Data Mining

IRS16: 4 byte ASN. Version: 1.0 Date: April 22, 2008 Cisco Systems 2008 Cisco, Inc. All rights reserved. Cisco Systems Japan

Web Billing User Guide

Unified System Management Technology for Data Centres

Apollo-LakeタブレットにUbuntu17.10を Install Ubuntu17.10 on Apollo-Lake Tablet

Relaxed Consistency models and software distributed memory. Computer Architecture Textbook pp.79-83

Vehicle Calibration Techniques Established and Substantiated for Motorcycles

MathWorks Products and Prices Japan September 2016

Certificate of Accreditation

Industrial Solar Power PoE Switch

OPTICAL TALK SET 光トークセット MODEL 415/430/450/450XL INSTRUCTION MANUAL 取扱説明書

Infrared Data Association Trademark and Brand Guidelines

Lecture 4 Branch & cut algorithm

Interdomain Routing Security Workshop 21 BGP, 4 Bytes AS. Brocade Communications Systems, K.K.

Video Annotation and Retrieval Using Vague Shot Intervals


DSK8AD1DA. 8ch A/D & 1ch D/A for DSK/EVM.

Saki is a Japanese high school student who/ has just started to study/ in the US.//

UML. A Model Trasformation Environment for Embedded Control Software Design with Simulink Models and UML Models

User Guide. P6 Barcode Scanner. English 日本語

Operational Precaution

HPE Insight Control サーバープロビジョニング 7.6 ビルドプランリファレンスガイド

Chapter 1 Videos Lesson 61 Thrillers are scary ~Reading~

Rechargeable LED Work Light

The Secret Life of Components

船舶保安システムのセルフチェックリスト. Record No. Name of Ship 船名 flag 国籍 Name of Company 会社名 Date 点検日 Place 場所 Checked by 担当者名. MS-SELF-CHK-SHIP-j (2012.

URL IO オブジェクト指向プログラミング特論 2018 年度只木進一 : 工学系研究科

Denso Lexus GS250 TCU Teardown

BraindumpStudy. BraindumpStudy Exam Dumps, High Pass Rate!

BABr11.5 for Linux のインストール 2007/12/21. You are running Linux on Kernel smp. Analyzing the environment

PNRGOV/Ver11.1/ 旅客氏名表予約情報報告 (PNR01)

MetaSMIL : A Description Language for Dynamic Integration of Multimedia Content

マルチビットアップセット耐性及びシングルビットアップセット耐性を備えた

Synchronization with shared memory. AMANO, Hideharu Textbook pp.60-68

HA8000V シリーズ. Service Pack for HA8000V (SPH) Version Readme. All Rights Reserved. Copyright (c) 2018 Hitachi, Ltd.

YAS530B MS-3E Magnetic Field Sensor Type 3E

Microchip 社ワイヤボンド変更のご案内

FUJITSU Software SystemcastWizard Professional V5.1 L30 ユーザーズガイド B7FW Z0(00) 2014 年 8 月

SteelEye Protection Suite for Linux

Extablished UNISON Acoustics Co., Ltd. UNISON 音響 ( 株 ) 設立 Receiver award of a million dollar exporting tower 輸出 US$500 万輸出塔受賞

プログラマ本体 I/F 回路図 -Programmer I/F Circuit Diagram-...2 FLASH2 内部 2 FLASHMATE5V1 内部 2

NI TB Introduction. Conventions INSTALLATION INSTRUCTIONS Wire Terminal Block for the NI PXI-2529

Preparing Information Design-Oriented. Posters. easy to. easy to. See! Understand! easy to. Convey!

Ritsu-Mate Registration Manual (for Undergraduate Programs)

PGroonga 2. Make PostgreSQL rich full text search system backend!

MySQL 最新動向と便利ツール MySQL Workbench

Introduction to Optical Prisms

Appliance Edition 入門ガイド

TestsDumps. Latest Test Dumps for IT Exam Certification

(Lexus GS250 用 ) ティアダウン

L3 SSG/SSD を使用している PPPoA クライアントで PC を設定すること

製 品 ガ イ ド NetShield for NetWare V E R S I O N 4. 6

Autodesk Maya 2013 Extension ( 拡張機能 )

Invitrogen Custom Primer Ordering Guide

和英対訳版. IEC Standard Template のユーザーガイド 備考 : 英語原文掲載 URL ( 一財 ) 日本規格協会

QuickTransit for Solaris/SPARC-to-Linux/Itanium 動作検証報告書 株式会社ネットワールドシステム基盤技術部プラットフォームソリューショングループ丸山真一

Transcription:

Zabbix ログ解析方法 2018/2/14 サイバートラスト株式会社 Linux/OSS 事業部技術統括部花島タケシ

Zabbix ログ解析方法 サイバートラスト株式会社 Linux/OSS 事業部技術統括部花島タケシ 2

自己紹介 MIRACLE ZBXサポート担当 Zabbixソースコード調査 ドキュメント作成 ( 当社ブログも執筆 ) ときどき新規機能追加もしたりします 4.0 へ向けての機能紹介等 ( ブログ ) 社内向のドキュメント 3

Zabbix って? Zabbix について多くの方が勘違いしています! 4

Zabbix は 監視に失敗したことを詳細に調査できるツールではありません 5

なぜか? というと 詳細の 99% がログに出力されません! 6

当社への問い合わせも結構ありますが 無理なものは無理です! 7

では どんなものなのでしょう? ( 失敗も含めて ) 監視により得られたデータからどうするか? を決める ( 考える ) ためのツールです 8

でも 解析とかバグ調査とかできないと困るよね ~ 9

なにはともあれ DebugLevel=4 のログを取得しないと始まりません 10

DebugLevel=4 の設定方法 zabbix_server.conf, zabbix_agentd.conf, zabbix_proxy.conf に設定する これだと全部のプロセスに影響が出てしまいます 11

局所的に DebugLevel=4 で取得するには? MIRACLE ZBX 2.2 までは? サービス起動後 設定ファイルに DebugLevel=4 と記述して下記を実行 # kill -HUP <PID> 各サービスの PID はログから判断する 注意 ) Windows ではできません 設定を戻すことを忘れないようにしましょう # /sbin/service zabbix_server reload とすると サービスを再起動することなく DebugLevel を変更できます 12

ログから PID の判別 30449:20180208:121535.686 Starting Zabbix Server. Zabbix 2.2.17-4 (revision 65977).... 30449:20180208:121535.686 using configuration file: /etc/zabbix/zabbix_server.conf 30449:20180208:121535.716 current database version (mandatory/optional): 02020000/02020001 30449:20180208:121535.716 required mandatory version: 02020000 30453:20180208:121535.783 server #2 started [db watchdog #1] 30452:20180208:121535.783 server #1 started [configuration syncer #1] 30460:20180208:121535.785 server #9 started [trapper #1] 30463:20180208:121535.795 server #10 started [trapper #2] 30464:20180208:121535.796 server #11 started [trapper #3] 30465:20180208:121535.796 server #12 started [trapper #4] 30469:20180208:121535.814 server #13 started [trapper #5] 30471:20180208:121535.820 server #15 started [alerter #1] 30470:20180208:121535.885 server #14 started [icmp pinger #1] 30474:20180208:121536.627 server #16 started [housekeeper #1] 30475:20180208:121536.632 server #17 started [timer #1] 30476:20180208:121536.632 server #18 started [http poller #1] 30478:20180208:121536.648 server #20 started [history syncer #1] 30479:20180208:121537.557 server #21 started [history syncer #2] 30482:20180208:121538.525 server #22 started [history syncer #3] 13

ログから PID の判別 ( その 2) $ ps ax grep zabbix_server 29343? S 0:00 /usr/sbin/zabbix_server -c /etc/zabbix/zabbix_server.conf 29348? S 0:53 /usr/sbin/zabbix_server: configuration syncer [synced configuration in 0.005622 sec, idle 60 sec] 29349? S 0:05 /usr/sbin/zabbix_server: alerter #1 [sent 0, failed 0 alerts, idle 51.232104 sec during 53.320830 sec] 29350? S 0:00 /usr/sbin/zabbix_server: alerter #2 [sent 0, failed 0 alerts, idle 27.074403 sec during 30.558192 sec] 29351? S 0:00 /usr/sbin/zabbix_server: alerter #3 [sent 0, failed 0 alerts, idle 12.399095 sec during 14.518400 sec] 29352? S 0:19 /usr/sbin/zabbix_server: housekeeper [deleted 0 hist/trends, 0 items/triggers, 0 events, 0 sessions, 0 alarms, 0 audit items in 0.038855 sec, idle for 1 hour(s)] 29353? S 0:31 /usr/sbin/zabbix_server: timer #1 [processed 1 triggers, 0 events in 0.000566 sec, 0 maintenances in 0.000496 sec, idle 29 sec] 29354? S 0:27 /usr/sbin/zabbix_server: http poller #1 [got 0 values in 0.000609 sec, idle 5 sec] 29355? S 0:27 /usr/sbin/zabbix_server: discoverer #1 [processed 0 rules in 0.000671 sec, idle 60 sec] 29356? S 1:03 /usr/sbin/zabbix_server: history syncer #1 [synced 0 items in 0.000001 sec, idle 1 sec] 14

MIRACLE ZBX 3.0 からは? Zabbix 標準の機能 (Runtime Control) で行える サービス起動後 -R log_level_increase を実行する デーモンに引数付シグナルが送られる $ /usr/sbin/zabbix_server --help -R --runtime-control runtime-option Perform administrative functions log_level_increase=target Increase log level, affects all processes if target is not specified log_level_decrease=target Decrease log level, affects all processes if target is not specified Log level control targets: pid Process identifier process-type All processes of specified type (e.g., poller) process-type,n Process type and number (e.g., poller,3) 15

デバッグログを取得しても 色々なプロセスのログがごちゃごちゃしてて解析が難しいです! 当社でプロセスごとにログを切り分けるツールを配布中! https://www.miraclelinux.com/tech-blog/ff5adp 16

デバッグログを取得しても 2273:20180213:123132.288 In zbx_preprocess_item_value() 2273:20180213:123132.288 End of zbx_preprocess_item_value() 2273:20180213:123132.288 In zbx_ipc_socket_write() 2273:20180213:123132.288 End of zbx_ipc_socket_write():succeed 2273:20180213:123132.288 End of get_values():1 2273:20180213:123132.288 zbx_zbx_setproctitle() title:'poller #5 [got 1 values in 0.000434 sec, idle 1 sec]' 2298:20180213:123132.288 End of zbx_ipc_service_recv():1 2298:20180213:123132.288 In preprocessor_add_request() 2298:20180213:123132.288 In preprocessor_sync_configuration() 2298:20180213:123132.288 In DCconfig_get_preprocessable_items() 2298:20180213:123132.288 End of DCconfig_get_preprocessable_items() items:40 2298:20180213:123132.288 End of preprocessor_sync_configuration() item config size: 40, history cache size: 3 2298:20180213:123132.288 In preprocessor_enqueue() itemid: 23252 2298:20180213:123132.288 In preprocessor_enqueue_dependent() itemid: 23252 2298:20180213:123132.288 End of preprocessor_enqueue_dependent() 2298:20180213:123132.288 End of preprocessor_enqueue() 17

デバッグログを取得した後は 現象とログをつき合わせる ソースコードと照らし合わせる DebugLevel=4のログは ほとんどが関数の出入りが記される src/zabbix_server 以下はプロセスごとにディレクトリが分かれている $ ls src/zabbix_server/ Makefile.am actions.h dbsyncer events.c httppoller pinger scripts.c server.c trapper Makefile.in alerter discoverer events.h operations.c poller scripts.h snmptrapper vmware actions.c dbconfig escalator housekeeper operations.h proxypoller selfmontimer watchdog 18

使用しているのは Zabbix だけど 問題解決には他の知識も必要です OS プロセスはどう動く? TCP/IP, UDP 通信はどのように? DB ロックとは? ライブラリ net-snmp libcurl 正規表現 19

DebugLevel=4 の問題点 当然ファイルへの出力が増えます ( 容量の問題 ) OS I/Oが増えます (CPUの問題) 解析する上で避けようがありません 能 出力される問題は以前解決しようとした 通常のログファイルとは別に 専用のストレージに書き出す機 20

いや ちょっと待て! それ本当に障害なの? まずはマニュアルを読みましょう Zabbix LLCのマニュアルには大抵書かれています 下記はちょっと https://www.zabbix.com/documentation/3.0/manual/config/triggers Trigger status (the expression) is recalculated every time Zabbix server receives a new value that is part of the expression. If time-based functions (nodata(), date(), dayofmonth(), dayofweek(), time(), now()) are used in the expression, the trigger is recalculated every 30 seconds by a Zabbix timer process. If both time-based and non-time-based functions are used in an expression, it is recalculated when a new value is received and every 30 seconds. 21

ここから余談です 22

よくある問い合わせ (1) ログが大量出力された アラートを止めたい Zabbix 標準の機能ではできません! データベースを直接操作する 4.0では特定のアラートを全て破棄する機能を開発しました 3.0にも実装しようかな~ 23

よくある問い合わせ (2) logrt[] キーに設定したログの読み返しが発生した 大体の原因は正規表現の誤りです 設定によりロックファイルを読み込みます サイズが変更されず mtime だけが変更されたときも該当します 24

信頼とともに ソフトバンク テクノロジーグループ ソフトバンク テクノロジーエムソリューションズフォントワークス環サイバートラストアソラテックリデンモードツー