Skip to content

Software Punt module for remote monitoring and customer service utilities

Notifications You must be signed in to change notification settings

SoftwarePunt/PhoneHome

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PhoneHome

Software Punt module for remote monitoring and customer service utilities.

This library provides "phone home" functionality for Software Punt projects. It is intended for managed services and SLA customers.

🪟 This project is open-source so we can be transparent about what data is collected and sent to our servers for monitoring purposes.

✉️ If you have any questions, contact us at support@softwarepunt.nl.

Installation

Install the package using Composer:

composer require softwarepunt/phonehome

This package is compatible with PHP 8.3+.

Usage

Use the PhoneHome client to send a ping to the receiving API:

use SoftwarePunt\PhoneHome\PhoneHome;

$response = (new PhoneHome())
    ->setApiBaseUrl("https://sample.api.com/")
    ->setToken("set_api_token")
    ->setTimeout(30)
    ->send();

if ($response?->sla?->active)
    echo "Have active SLA!";

The server response will include SLA details if applicable to the caller.

A ping should be sent every minute or so for monitoring purposes. This is typically performed by a background task or cronjob.

Standalone installation

You can set up PhoneHome as a standalone application without integrating it into existing software.

To do so, install it as a global composer package:

composer global require softwarepunt/phonehome --prefer-install=source

Then set up a cron job to run every minute (crontab example):

* * * * * (cd /root/.config/composer/vendor/softwarepunt/phonehome; TOKEN=SET_ME /root/.config/composer/vendor/bin/sp-phone-home)

Providers

The following information is currently collected and sent:

Environment

  • Server hostname
  • OS type and version (e.g. Ubuntu 20.04.5 LTS (Focal Fossa) (Linux 4.15.0-184-generic x86_64))
  • PHP version
  • Working directory
  • Reboot required flag

Network

  • Public (WAN) address
  • Private address

Git version

  • Commit hash
  • Commit date/time

Installed software versions

  • nginx
  • MySQL Server (mysqld)
  • Redis Server (redis-server)
  • .NET Runtime / SDK (dotnet)
  • Python (python)
  • Node.JS (node)
  • Composer (composer)
  • OpenSSL (openssl)

About

Software Punt module for remote monitoring and customer service utilities

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages