biffbangpow/silverstripe-monitoring-client

Monitoring client

v1.1 2023-10-19 13:43 UTC

This package is auto-updated.

Last update: 2024-10-19 16:23:52 UTC


README

Scrutinizer Code Quality

Client library

This module is built to work alongside the monitoring server system. It will, however, operate as a standalone information page on the site where it is installed.
With no configuration, a simple reporting screen is added to the site config, so that the values from the included modules can be viewed in the CMS.

Monitoring system integration

By adding the following environment variables, the system can be integrated into the monitoring server system to provide centralised reporting (see the server repository for further information):

MONITORING_ENC_SECRET
MONITORING_ENC_SALT
MONITORING_API_KEY
MONITORING_VALID_IP

With the exception of the valid IP value, all the above variables will be generated by the server system when a client is added. These ensure that communications between the client and server are encrypted.

If set, the valid IP variable will restrict access to the monitoring system to those specified addresses. IPs can be specified by a single address or a CIDR notation.

The monitoring client implements rate-limiting on incoming requests to the reporting route, to help mitigate brute-force or DoS attacks. A maximum of 1 request per minute is permitted to the client software.

Included reporting modules

The system comes with a set of default reporting modules:

Silverstripe configuration

This module lists various parameters of the Silverstripe installation, including:

  • Site Name
  • Environment type
  • Base URL
  • Presence of default admin credentials

System information

This module lists information about the server environment, including:

  • PHP version
  • Host IP address
  • File upload limit
  • Script max execution time
  • Database engine
  • Database version
  • Database name

The module will attempt to discover the public IP address of the client usign the ipify service. This can be disabled via a yml config, eg:

---
Name: bbp-client-monitor
---

BiffBangPow\SSMonitor\Client\Module\SystemInfo:
  discover_public_ip: false

In addition, the module can report on the value of environment variables which have been set. These can be specified by adding a yml configuration to your project, eg:

---
Name: bbp-client-monitor
---

BiffBangPow\SSMonitor\Client\Module\SystemInfo:
  env_variables:
    - APP_SMTP_USERNAME
    - APP_SMTP_PASSWORD
    - CAPTCHA_SITE_KEY
    - CAPTCHA_SECRET_KEY

Core package versions

This module reports on the installed versions of a set of core packages. The packages included in this report are configured in a default yml file, bundled with the module, but can be overridden as required, eg:

BiffBangPow\SSMonitor\Client\Module\CorePackageVersions:
  included_modules:
    - 'silverstripe/framework'
    - 'silverstripe/cms'
    - 'dnadesign/silverstripe-elemental'
    - 'biffbangpow/silverstripe-monitoring-client'

All package versions

This module lists all the composer-managed packages which are installed on the system.