wrklst/pulse-remote-server 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

wrklst/pulse-remote-server

最新稳定版本:v0.2.6

Composer 安装命令:

composer require wrklst/pulse-remote-server

包简介

A Laravel Pulse Recorder for Remote Servers

README 文档

README

Enhance your server stats by adding remote Linux servers to the mix. This feature is designed to incorporate remote servers to Laravel Pulse that do not execute PHP, such as database or cache servers. Servers running PHP are recommended to install their own instance of Laravel Pulse instead.

Installation

Begin by installing the package via Composer:

composer require wrklst/pulse-remote-server

Authentication

Ensure SSH key authentication is set up for accessing the remote server. The Remote Server package assumes the remote server is running Linux. It is compatible with both Mac and Linux servers for your local Larvel Pulse installation.

Register the Recorder

In your pulse.php configuration file, incorporate the \WrkLst\Pulse\RemoteServer\Recorders\RemoteServers class with the desired settings:

return [
    // Other configurations...

    'recorders' => [
        \WrkLst\Pulse\RemoteServer\Recorders\RemoteServers::class => [
            [
                'server_name' => "database-server-1",
                'server_ssh' => "ssh forge@1.2.3.4",
                'query_interval' => 15,
                'directories' => explode(':', env('PULSE_SERVER_DIRECTORIES', '/')),
            ],
            [
                'server_name' => "cache-server-1",
                'server_ssh' => "ssh forge@1.2.3.5",
                'query_interval' => 15,
                'directories' => explode(':', env('PULSE_SERVER_DIRECTORIES', '/')),
            ]
        ],
    ]
]

Don't forget to run the pulse:check command to start recording.

Configuration Notes

  • server_name: Specify the name of the server as it should appear in the server stats.
  • server_ssh: Enter the SSH command to connect to the server (ssh user@ipaddress). You can also include options like -p 2222 for non-standard ports.
  • query_interval: Define the interval for querying the remote server's stats, in seconds.
  • directories: Specify the directories to check for used and available disk capacity. By default, this is set to "/", but you can add multiple directories or change the directory. Note that altering this configuration might impact query performance. For specialized setups, consider forking the repository and adjusting the shell script accordingly.

And that's all there is to it!

统计信息

  • 总下载量: 12.3k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 13
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 13
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-02-19