0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Difyでssh接続してみた

Last updated at Posted at 2025-07-30

概要

Difyでssh接続ができるようなので、接続サーバーのディスク容量を出力
その後AIで要約してメールを送信するようにしてみます。
※ こういったものはZabbixで良いと思っていますが、Difyの活用の参考として残します。

フロー

dify.png

SSH Command Execution

入力欄に応じて接続情報を入力して
接続できた時に実行するコマンド情報を入力
test1.png

コード実行

SSH接続後に「df -h」ディスク容量の結果の配列にアクセスして返すように

def main(arg1) -> dict:
    return {
        "result": arg1[0]["stdout"]
    }

LLM

プロンプトにこのような指示を投げる
llm.png

zapier mcp

zapierのmcpを使ってメールを送信

gmail.png

参考

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?