2017 © Pedro Peláez
 

library process-monitoring-bundle

A simple monitoring service to check state of Process

image

kinulab/process-monitoring-bundle

A simple monitoring service to check state of Process

  • Tuesday, March 27, 2018
  • by nykopol
  • Repository
  • 2 Watchers
  • 1 Stars
  • 452 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 5 Versions
  • 15 % Grown

The README.md

Monitoring process Bundle

Build Status Coverage Status, (*1)

This bundle try to solve the following problem, (*2)

How to be sure that a given service is running from 7am to 7pm ?
If the service fall it must be restarted. And how do be sure that
a service is NOT running from 7pm to 7am ? If the service is
running it must be stopped.

We can do it with cron but that need a few lines :, (*3)

  • to start the service,
  • stop it at the end of day,
  • check every minute from 7am to 7pm that the service is running,
  • then check every minutes from 7pm to 7am that the service is not running.

If there is only one service like that, it's ok. But when there is more, it become hard to maintain., (*4)

Installation

composer require kinulab/process-monitoring-bundle:^1.0

add in your app/AppKernel.php :, (*5)

    public function registerBundles()
    {
        $bundles = [
            // ...
            new Kinulab\ProcessMonitoringBundle\KinulabProcessMonitoringBundle(),
        ];
    }

How to use it ?

Register a symfony service that implements the Kinulab\ProcessMonitoringBundle\Service\ServiceDescriptorInterface., (*6)

Tag this service as monitored.service., (*7)

Then ensure yourself that the bin/console monitor:services command is constantly running. For that, you can use cron, monit, supervisord or whatever you prefer to use., (*8)

Usage

Events

During the monitoring, some event are dispatched :, (*9)

Event Description
monitoring.services.starting When the monitor has been requested to start, but still did nothing
monitoring.services.started When the monitor has checked for the first time each services for planification
monitoring.services.stopping When the monitor has been requested to stop, but still did nothing
monitoring.services.stopped When the monitor has stopped every services

The Versions

27/03 2018

dev-master

9999999-dev

A simple monitoring service to check state of Process

  Sources   Download

MIT

The Requires

 

The Development Requires

by Johan DESMYTER

27/03 2018

dev-compatibility_sf4

dev-compatibility_sf4

A simple monitoring service to check state of Process

  Sources   Download

MIT

The Requires

 

The Development Requires

by Johan DESMYTER

22/01 2018

dev-0.1-beta

dev-0.1-beta

A simple monitoring service to check state of Process

  Sources   Download

MIT

The Requires

 

The Development Requires

by Johan DESMYTER

18/01 2018

dev-0.2-beta

dev-0.2-beta

A simple monitoring service to check state of Process

  Sources   Download

MIT

The Requires

 

The Development Requires

by Johan DESMYTER

17/01 2018

dev-taskDescriptor

dev-taskDescriptor

A simple monitoring service to check state of Process

  Sources   Download

MIT

The Requires

 

The Development Requires

by Johan DESMYTER