{"id":21056940,"url":"https://github.com/fluent-plugins-nursery/fluent-plugin-zabbix-simple","last_synced_at":"2025-05-15T23:33:33.939Z","repository":{"id":6947255,"uuid":"8199033","full_name":"fluent-plugins-nursery/fluent-plugin-zabbix-simple","owner":"fluent-plugins-nursery","description":"fluent plugin zabbix_simple","archived":false,"fork":false,"pushed_at":"2021-01-08T04:33:55.000Z","size":26,"stargazers_count":4,"open_issues_count":2,"forks_count":6,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-29T03:58:33.591Z","etag":null,"topics":["fluent-plugin","fluentd","zabbix-server"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fluent-plugins-nursery.png","metadata":{"files":{"readme":"README-ja.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-02-14T12:27:49.000Z","updated_at":"2022-04-27T09:32:03.000Z","dependencies_parsed_at":"2022-07-29T00:09:09.343Z","dependency_job_id":null,"html_url":"https://github.com/fluent-plugins-nursery/fluent-plugin-zabbix-simple","commit_stats":null,"previous_names":["sunny4381/fluent-plugin-zabbix-simple"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluent-plugins-nursery%2Ffluent-plugin-zabbix-simple","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluent-plugins-nursery%2Ffluent-plugin-zabbix-simple/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluent-plugins-nursery%2Ffluent-plugin-zabbix-simple/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluent-plugins-nursery%2Ffluent-plugin-zabbix-simple/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fluent-plugins-nursery","download_url":"https://codeload.github.com/fluent-plugins-nursery/fluent-plugin-zabbix-simple/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254442429,"owners_count":22071864,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fluent-plugin","fluentd","zabbix-server"],"created_at":"2024-11-19T16:55:12.994Z","updated_at":"2025-05-15T23:33:28.908Z","avatar_url":"https://github.com/fluent-plugins-nursery.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fluent-plugin-zabbix-simple\n\n[![Build Status](https://travis-ci.org/fluent-plugins-nursery/fluent-plugin-zabbix-simple.svg?branch=master)](https://travis-ci.org/fluent-plugins-nursery/fluent-plugin-zabbix-simple)\n\n## 概要\n\n**fluent-plugin-zabbix-simple** は、[fluentd](http://fluentd.org/ \"fluentd\") output plugin で、[Zabbix](http://www.zabbix.com/ \"Zabbix\") Server に値を送ることができます。\n\nfluentd は、ログを JSON として収集します。\nfluent-plugin-zabbix-simple は、**fluentdのJSONキー** を **Zabbixキー** に変換し、_Zabbix キー_ とその値を Zabbix Server に送ります。\n\n* 変換するキーは複数個定義でき、個数に制限はありません。\n\n* **key-pattern** と **key-replacement** の両方に正規表現を使うことができます。\n\n  * **key-pattern**(単に **pattern** と呼ぶ)は、_fluentdのJSONキー_ と照合されるキーです。\n\n  * **key-replacement**(単に **replacement** と呼ぶ)は、_pattern_ と _fluentdのJSONキー_ との照合に成功した場合、Zabbix Server に送信されるキーです。\n\n## インストール要件\n\n| fluent-plugin-zabbix-simple | fluentd | ruby |\n|------------------------|---------|------|\n| \u003e= 2.0.0 | \u003e= v0.14.0 | \u003e= 2.1 |\n|  \u003c= 1.0.0 | \u003e= v0.12.0 | \u003e= 1.9 |\n\n## インストール方法\n\nコマンド `gem install` を実行します。\n\n    $ sudo gem install fluent-plugin-zabbix-simple\n\ntd-agent は専用の Ruby 処理系を持っています。\ntd-agent をインストールしている場合、td-agent 付属の gem コマンドを用いてインストールしなければならないかもしれません。\n\n    $ sudo /usr/lib64/fluent/ruby/bin/gem isntall fluent-plugin-zabbix-simple\n\n## 確認\n\n### Zabbix Server 設定\n\nあらかじめ Zabbix Server で次のようなアイテムを定義しておきます:\n\n    Key: httpd.status[2xx]\n    Type: Zabbix trapper\n    Type of information: Numeric(unsigned)\n\n    Key: httpd.status[3xx]\n    Type: Zabbix trapper\n    Type of information: Numeric(unsigned)\n\nこつは：\n\n* `Type` を `Zabbix trapper` にしなければなりません。\n\n* `Type of information` は適切な型を選択してください。\n\n### Plugin 設定\u0026テスト\n\nfluent-plugin-zabbix-simple をテストするため次のようなファイルを作成します。\n\n    \u003csource\u003e\n      type forward\n    \u003c/source\u003e\n    \u003cmatch httpd.access.status_count\u003e\n      type zabbix_simple\n      zabbix_server 192.168.0.1\n      map_key1 httpd.access_(...)_count httpd.status[\\1]\n    \u003c/match\u003e\n\nこのファイルを fluentd.conf として保存し、fluentd を実行してみましょう。\n\n    $ fluentd -c ./fluent.conf -vv\n\nもし td-agent をインストールしているなら、代わりに次のコマンドを実行します。\n\n    $ /usr/sbin/td-agent -c ./fluent.conf -vv\n\n別のターミナルを開き、fluentd サーバに、メッセージを送ってみます。\n\n    $ echo '{\"httpd.access_2xx_count\":321}' | fluent-cat httpd.access.status_count\n\n30 秒程度待って、Zabbix Server に 321 が記録されていることを確認します。\n\n## 設定\n\nname | type | description\n-----|------|------\ntype | string | plugin の type を指定します。fluent-plugin-zabbix-simple は、\"zabbix_simple\" を指定します。\nzabbix_server | string | Zabbix Server の IP address か hostname を指定します。\nport | integer | Zabbix Server が使用するポート番号を指定します(既定値は 10051)。\nhost | string | Zabbix Server にデータを送信しようとしているホスト名です(既定値は `Socket.gethostname`)。\nkey_size | integer | map_key のサイズ(既定値は 20)。\nmap_key[n] | string | スペースで分割された _pattern_ と _replacement。 0 番目の map_key として `map_key0` を使用することができます。\n\n\n## 多くのキーを使う\n\n既定では、20 番目のキーまで検索します。\nもし 20 個以上のキーを指定する場合、key_size を指定しなければなりません。\n\n    \u003cmatch httpd.access.status_count\u003e\n      type zabbix_simple\n      zabbix_server 192.168.0.1\n      key_size 25\n      map_key1  pattern1  replace1\n      map_key2  pattern2  replace2\n      map_key3  pattern3  replace3\n      map_key4  pattern4  replace4\n      map_key5  pattern5  replace5\n      map_key6  pattern6  replace6\n      map_key7  pattern7  replace7\n      map_key8  pattern8  replace8\n      map_key9  pattern9  replace9\n      map_key10 pattern10 replace10\n      map_key11 pattern11 replace11\n      map_key12 pattern12 replace12\n      map_key13 pattern13 replace13\n      map_key14 pattern14 replace14\n      map_key15 pattern15 replace15\n      map_key16 pattern16 replace16\n      map_key17 pattern17 replace17\n      map_key18 pattern18 replace18\n      map_key19 pattern19 replace19\n      map_key20 pattern20 replace20\n      map_key21 pattern21 replace21\n      map_key22 pattern22 replace22\n      map_key23 pattern23 replace23\n      map_key24 pattern24 replace24\n      map_key25 pattern25 replace25\n    \u003c/match\u003e\n\n## 照合の詳細\n\nfluent-plugin-zabbix-simple は、`map_key0` から照合を開始し、最初に照合に成功したキーを使用し、残りは無視します。\n\n## Legal Notification\n\n### Copyright\nCopyright (c) 2013 NAKANO Hideo\n\n### License\nApache License, Version 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffluent-plugins-nursery%2Ffluent-plugin-zabbix-simple","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffluent-plugins-nursery%2Ffluent-plugin-zabbix-simple","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffluent-plugins-nursery%2Ffluent-plugin-zabbix-simple/lists"}