ja:quickguides:integracion_con_telegram

(OBSOLETE) Telegram の統合

Telegram is an instant messaging platform through which you may receive alert messages from Pandora FMS. Get more information form our video tutorial «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).

Telegram は、Pandora FMS からアラート メッセージを受信できるインスタントメッセージングプラットフォームです。 詳細については、ビデオ チュートリアル «Notifications Telegram: Pandora FMS» を参照してください。 このビデオチュートリアルでは、ガイド付きの方法で (3 分目から)、Pandora FMS アラートのすべてのコンポーネントの作成と設定を実践できます。

This quick guide explains in summary the integration process, for more information please consult the plugin documentation.

このクイックガイドでは、統合プロセスの概要を説明しています。詳細については、プラグインドキュメント を参照してください。

First you must create a bot in Telegram. From your Telegram account interact with the BotFather user using the /start> command.

まず、Telegram でボットを作成する 必要があります。 Telegram アカウントから、/start> コマンドを使用して BotFather ユーザ とやり取りします。

Then respond with the /newbot command and place a <bot_name> ending with the text string bot>.

次に、/newbot コマンドで応答し、テキスト文字列 bot> で終わる <bot_name> を配置します。

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 GetIDs Bot to the same group in order to get the group identifier. Make a note of it, it will be used later.

次のステップは、グループ ID を取得するために、GetIDs Bot という別のボットを同じグループに追加することです。 メモしておきます。後で使用します。

From the Pandora FMS Module library download and unzip in

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 AlertsCommands menu and click Create to create a new command for alerts.

アラート(Alerts)コマンド(Commands) メニューへ行き、アラートの新規コマンドを作成するために 作成(Create) をクリックします。

In the first custom field place the API token, in the second one place the group identifier and finally in the third field make 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 番目のフィールドに 使用するマクロ を指定して、ユーザに表示されるメッセージをフォーマットします。 作成(Create) をクリックしてアラートコマンドを保存し終了します。

Go to the AlertsActions menu and click Create to create a new action for alerts.

アラート(Alerts)アクション(Actions) メニューへ行き、アラートの新たなアクションを作成するために 作成(Create) をクリックします。

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.

アラートアクションに名前を付け、前に作成したアラートコマンドを選択します。 フィールドは自動的に入力されます。 必要に応じて、アラートトリガーおよびアラート取得イベントにテキストを追加できます。

Click on Create. Once you have created this alert action, it can be included in a policy, template or Module.

作成(Create) をクリックします。アラートアクションを作成したら、ポリシーテンプレートモジュール に含めることができます。

If you require additional information download the plugin documentation in PDF format.

追加情報が必要であれば、PDF の プラグインドキュメント をダウンロードしてください。

クイックガイド一覧に戻る

  • ja/quickguides/integracion_con_telegram.txt
  • 最終更新: 2023/06/22 05:36
  • by junichi