Skip to content

Commit

Permalink
Merge pull request #194 from jrjohnson/service-docs
Browse files Browse the repository at this point in the history
[Doc] Add information on creating and configuring checks
  • Loading branch information
lsmith77 committed Nov 7, 2018
2 parents c6a8631 + c59aa37 commit e8c9bbc
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.md
Expand Up @@ -84,6 +84,9 @@ liip_monitor:

## Adding Health Checks ##

See [Writing Custom Checks](https://docs.zendframework.com/zend-diagnostics/custom-checks/) for instructions
on creating a custom check.

Once you implemented the class then it's time to register the check service with our service container:

```yml
Expand All @@ -103,6 +106,9 @@ as long as the service is properly tagged. The ``alias`` is optional and will th
define the ``id`` used when running health checks individually, otherwise the full service
id must be used in this case.

If your app's service definition is using `autoconfigure` to discover services then classes
which implement `ZendDiagnostics\Check\CheckInterface` will be tagged automatically.

## Available Built-in Health Checks ##

See "Full Default Config" below for a list of all built-in checks and their configuration.
Expand Down Expand Up @@ -226,6 +232,17 @@ services:
- { name: liip_monitor.check, alias: php_extensions, group: app_server }
```

`autoconfigure` will place checks into the default group. You must add `autoconfigure: false` to the service
definition to change the group:

```yml
services:
Acme\HelloBundle\Check\PhpExtensionsCheck:
autoconfigure: false
tags:
- { name: liip_monitor.check, group: app_server }
```

### Specify group for CLI commands

Both CLI commands have a `--group=...` option. If it is not given, the default group is used.
Expand Down

0 comments on commit e8c9bbc

Please sign in to comment.