====== (OBSOLETE) Telegram の統合 ====== [[:ja:quickguides:start|クイックガイド一覧に戻る]] ===== Telegram の統合 ===== [[https://en.wikipedia.org/wiki/Telegram|Telegram]] is an instant messaging platform through which you may receive alert messages from Pandora FMS. Get more information form our video tutorial «[[https://www.youtube.com/watch?v=T6v4Gwv7alA&t=2s|Notifications Telegram: Pandora FMS]]». In this video tutorial you will be able to put into practice the creation and configuration of all PFMS alert components in a guided way (from minute three). [[https://en.wikipedia.org/wiki/Telegram|Telegram]] は、Pandora FMS からアラート メッセージを受信できるインスタントメッセージングプラットフォームです。 詳細については、ビデオ チュートリアル «[[https://www.youtube.com/watch?v=T6v4Gwv7alA&t=2s|Notifications Telegram: Pandora FMS]]» を参照してください。 このビデオチュートリアルでは、ガイド付きの方法で (3 分目から)、Pandora FMS アラートのすべてのコンポーネントの作成と設定を実践できます。 This quick guide explains in summary the integration process, for more information please consult the [[http://pandorafms.com/library/telegram-bot-cli/|plugin documentation]]. このクイックガイドでは、統合プロセスの概要を説明しています。詳細については、[[http://pandorafms.com/library/telegram-bot-cli/|プラグインドキュメント]] を参照してください。 ==== Telegram 設定 ==== First you must [[http://core.telegram.org/bots/faq|create a bot in Telegram]]. From your Telegram account interact with the [[http://telegram.me/botfather|BotFather user]] using the ''/start''> command. まず、[[http://core.telegram.org/bots/faq|Telegram でボットを作成する]] 必要があります。 Telegram アカウントから、''/start''> コマンドを使用して [[http://telegram.me/botfather|BotFather ユーザ]] とやり取りします。 {{ :wiki:pfms_telegram_integration_10.png }} Then respond with the ''/newbot'' command and place a ending with the text string ''bot''>. 次に、''/newbot'' コマンドで応答し、テキスト文字列 ''bot''> で終わる を配置します。 {{ :wiki:pfms_telegram_integration_20.png }} **Take note** of the generated API token, save it in a safe place, it will be used later. Then add the newly created bot to a group (or create a new group), make sure the bot belongs to that group. **生成された API トークンをメモして**、安全な場所に保存します。後で使用します。 次に、新しく作成したボットをグループに追加(または新しいグループを作成) し、ボットがそのグループに属していることを確認します。 The next step is to add another bot called **[[http://t.me/getidsbot|GetIDs Bot]]** to the same group in order to get the group identifier. **Make a note of it**, it will be used later. 次のステップは、グループ ID を取得するために、**[[http://t.me/getidsbot|GetIDs Bot]]** という別のボットを同じグループに追加することです。 **メモしておきます**。後で使用します。 {{ :wiki:pfms_telegram_integration_30.png }} ==== Pandora FMS 設定 ==== From the [[http://pandorafms.com/library/telegram-bot-cli/|Pandora FMS Module library]] download and unzip in [[http://pandorafms.com/library/telegram-bot-cli/|Pandora FMS モジュールライブラリ]] からダウンロードし、以下に展開します。 /usr/share/pandora_server/util/pandora-telegram or in a location to which the Pandora FMS server always has access. Check if this last one is correct by executing it in the terminal window: もしくは Pandora FMS サーバが常にアクセスできる別の場所でも構いません。ターミナルから以下を実行して、正しく動作するかどうか確認します。 python3 pandora-telegram-cli.py Go to the **Alerts** → **Commands** menu and click **Create** to create a new command for alerts. **アラート(Alerts)** → **コマンド(Commands)** メニューへ行き、アラートの新規コマンドを作成するために **作成(Create)** をクリックします。 {{ :wiki:pfms_telegram_integration_40.png }} In the first custom field place the API token, in the second one place the group identifier and finally in the third field make [[:en:documentation:04_using:01_alerts#list_of_macros|use of macros]] to format the message to be displayed to the user. Finish by clicking on **Create** to save the alert command. 最初のカスタムフィールドに API トークン、2 番目のフィールドにグループ識別子、最後に 3 番目のフィールドに [[:ja:documentation:04_using:01_alerts#マクロ一覧|使用するマクロ]] を指定して、ユーザに表示されるメッセージをフォーマットします。 **作成(Create)** をクリックしてアラートコマンドを保存し終了します。 {{ :wiki:pfms_telegram_integration_50.png }} Go to the **Alerts** → **Actions** menu and click **Create** to create a new action for alerts. **アラート(Alerts)** → **アクション(Actions)** メニューへ行き、アラートの新たなアクションを作成するために **作成(Create)** をクリックします。 {{ :wiki:pfms_telegram_integration_60.png }} Name the alert action and select the alert command created earlier. The fields will be filled in automatically; you can add additional text in the alert trigger and alert retrieval events if you wish. アラートアクションに名前を付け、前に作成したアラートコマンドを選択します。 フィールドは自動的に入力されます。 必要に応じて、アラートトリガーおよびアラート取得イベントにテキストを追加できます。 {{ :wiki:pfms_telegram_integration_70.png }} Click on **Create**. Once you have created this alert action, it can be included in a [[:es:documentation:05_big_environments:02_policy|policy]], [[:en:documentation:04_using:03_templates_and_components|template]] or [[:en:documentation:04_using:01_alerts#configuring_an_alert_template|Module]]. **作成(Create)** をクリックします。アラートアクションを作成したら、[[:ja:documentation:05_big_environments:02_policy|ポリシー]]、[[:ja:documentation:04_using:03_templates_and_components|テンプレート]]、[[:ja:documentation:04_using:01_alerts#configuring_an_alert_template|モジュール]] に含めることができます。 If you require additional information download the [[http://pandorafms.com/library/telegram-bot-cli/|plugin documentation]] in PDF format. 追加情報が必要であれば、PDF の [[http://pandorafms.com/library/telegram-bot-cli/|プラグインドキュメント]] をダウンロードしてください。 [[:ja:quickguides:start|クイックガイド一覧に戻る]]