Skip to content
Ilyas Salikhov edited this page Mar 18, 2014 · 19 revisions

All settings are in config/parameters.yml.

Database settings

db:
    host: localhost
    port: 3306
    name: pinba
    user: user
    pass: password

In section db you must define database connection settings. Pinboard connects to the same database as Pinba.

Logging

Pinboard can keep a log of slow and heavy requests which displays in sections "Request time" and "Memory peak usage" for each monitoring site.

logging:
    # in seconds
    long_request_time:
        global: 1.0
        "supersite1.com": 0.8
        "superfastsite2.com": 0.3
    # max memory usage in kB
    heavy_request:
        global: 30000
        "coolsite.ru": 5000
        "heavysite.ru": 30000

Parameters global are used as default for all monitoring sites. For example above all requests with execution time more than 1 second and used memory more than 30000 kB will saved in log.

For any site you can define personal settings by adding corresponding parameters in sections long_request_time and heavy_request.

If no settings in section logging Pinboard uses following parameters:

long_request_time: 1.0
heavy_request: 30000

Pagination

pagination:
    row_per_page: 50

In section pagination you can define number of records per page in sections "Request time", "Memory peak usage" and "Error statuses".

If no settings in section pagination Pinboard uses following parameter:

row_per_page: 50

Data cleaning

records_lifetime: P1M

You can define how long Pinboard will save hosts statistic. Default period is a one month. Period defines in ISO8601 format (see ISO8601 on Wikipedia).

Old data cleaning occurs when you run a command ./console aggregate on crontab.

Security

In section "Security" you can define settings for user authentication and authorization.

secure:
    enable: true
    users:
        username1:
            password: my_sha512_password
        username2:
            password: my_sha512_password
            hosts: 'mysite\.com$'

Parameter enable switch on/off the authentication and the authorization on site.

In section users define who has the access to the site.

In password need to define user password, the encrypted algorithm is sha512 with 5000 iterations and encode to base64 the password hash.

In hosts define a regular expression which controls the access to hosts information. By default, the user has the access to all hosts.

Use special console command for user adding. Details in Security.

Email notifications

Pinboard can send e-mail messages for pages with HTTP status code 5xx.

notification:
    enable: true
    ignore:
        - (foo|otp)\.example\.com$
        - second-example\.ru$
    sender: [email protected]
    global_email: [email protected]
    list:
        - { hosts: 'example\.com$', email: [[email protected], [email protected]] }
        - { hosts: 'forum\.example\.(com|org)$', email: [email protected] }

If section notification is not specified, notification will not be sent.

Parameter enable switch on and off notification sending.

In section ignore you can specify a list of sites which are ignored when sending a notifications. If a site matches any specified regular expression, notification will not be sent.

Parameter sender - this email address will be used as the sender of notifications.

Parameter global_email defines email for all error status messages. If the parameter is not specified, will use only emails listed below.

In section list you can list the correspondence between the sites and email. If the error occurs at a site that equal to regexp expression hosts, notification will be sent to email. You can define multiple emails for one site.

Sending transport

By default all email sended throw mail() function. You can define sending throw SMTP server.

smtp:
    server: localhost
    port: 25
    username: [email protected]
    password: my_password
    encryption: null
    auth_mode: null

In section smtp you can define parameters of your smtp server - server adress, port, username, password, encryption type (null, ssl, tls), authentication mode.

Clone this wiki locally