Git Product home page Git Product logo

serverdoc-gpt's Introduction

Server Health Report

このスクリプトは、サーバーの健康状態をチェックし、それに基づいてOpenAI GPT-3.5-turboを使って日本語のレポートを生成します。問題がある場合は、設定されたメールアドレスに警告またはエラーメッセージを送信します。

使い方

  1. config.sh を編集して、サーバーの健康状態をチェックするためのコマンドとその説明を定義します。config-example.sh を参考にしてください。

  2. health_report.sh スクリプトにOpenAI APIキーを引数として渡して実行します。

./health_report.sh <your_api_key>

ファイル構成

  • config-example.sh: サーバーの健康状態をチェックするためのコマンドとその説明を定義するサンプルファイルです。
  • health_report.sh: サーバーの健康状態をチェックし、GPT-3.5-turboを使ってレポートを生成し、必要に応じてメールを送信するメインスクリプトです。

注意事項

  • スクリプトを実行する前に、jq コマンドがインストールされていることを確認してください。インストールされていない場合は、以下のコマンドを使ってインストールしてください。
sudo apt-get install jq
  • メール送信には、mail コマンドを使用しています。これはSMTP認証に対応していません。認証が必要なメールサービスを使用する場合は、msmtpsendmail などのSMTP認証に対応したメール送信ツールを使用してください。

  • GPT-3.5-turboを使うために、OpenAI APIキーが必要です。スクリプトの引数として渡してください。

ログファイル

スクリプトが生成したレポートは、ユーザーのホームディレクトリ内の ServerDoc-GPT_logs ディレクトリに保存されます。ログファイルの名前は、日付とレポートのタイトル(PASSED、WARNING、またはERROR)に基づいています。

Author

tettou771

serverdoc-gpt's People

Contributors

tettou771 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.