The config


The config section

The config section is composed of:

- smtp (Email settings for sending notification)
- scan (Paths used to find the file 'epazote.yml')

Example:

config:
    smtp:
        username: [email protected]
        password: password
        server: mail.example.com
        port: 587
        headers:
            from: [email protected]
            to: [email protected] [email protected] [email protected]
            subject: "[_name_, _because_]"
    scan:
        paths:
            - /arena/home/sites
            - /home/apps
        minutes: 5

config - smtp

Required to properly send alerts via email, all fields are required, the headers section can be extended with any desired key-pair values.

config - smtp - subject

The subject can be formed by using this keywords:

    _because_  _exit_ _name_ _output_ _status_ _url_

on the previous example, subject: [_name_, _status_] would transform to [my service - 500] the name has replaced by the service name, my service and status by the response status code 500 in this case.

config - scan

Paths to scan every N seconds, minutes or hours, a search for services specified in a file call epazote.yml is made.

The scan setting is optional however is very useful when doing Continues Deployments. for example if your code is automatically uploaded to the directory /arena/home/sites/application_1 and your scan paths contain /arena/home/sites, you could simple upload on your application directory a file named epazote.yml with the service rules, thus achieving the deployment of your application and the supervising at the same time.

config (optional)

As you may notice the config section contains mainly settings for sending alerts/notifications apart from the scan setting, therefore is totally optional, meaning that Epazote can still run and check your services without the need of the config section.

If you want to automatically update/load services you will need the config - scan setting.