Logging
Console, file, HTTP, and/or syslog logging configuration.
| Parameter | Type | Default Value | Description | 
|---|---|---|---|
| directory | String | /tmp | Path to directory where logs will be created. | 
| format | String | text | Log text format, must be textorjson. | 
| max_size | String | 50MB | Maximum log file size before being overwritten. | 
Syslog
| Parameter | Type | Default Value | Description | 
|---|---|---|---|
| host | String | Syslog target host. | |
| port | Number | 514 | Syslog target UDP port. | 
Syslog Example
config.yaml
logging:
    syslog:
        host: log.example.com
        port: 514HTTP Logging
If enabled, logs will be sent by HTTP POST method.
| Parameter | Type | Default Value | Description | 
|---|---|---|---|
| provider | String | generic | Must be generic,msteams, orslack. | 
| host | String | URL | |
| headers | Map | ||
| params | Map | ||
| verify_ssl | Boolean | true | Enable or disable SSL certificate verification. | 
| timeout | Number | 5 | HTTP connection timeout in seconds. | 
Authentication
Authentication is supported using HTTP basic authentication or an API key.
| Parameter | Type | Default Value | Description | 
|---|---|---|---|
| http.authentication.mode | String | basic | Must be basicorapi_key. | 
| http.authentication.username | String | Basic authentication username if modeis set tobasic. | |
| http.authentication.password | String | Basic authentication password if modeis set tobasic, or API key value ifmodeis set toapi_key. | |
| http.authentication.header | String | X-API-Key | Header name if modeis set toapi_key. | 
Examples
Generic
config.yaml
logging:
    http:
        provider: generic
        host: https://httpbin.org
        headers:
            x-special-header: super special header value
        params:
            source: hyperglass
        verify_ssl: true
        timeout: 5
        authentication:
            mode: basic
            username: your username
            password: super secret passwordIn the above example, hyperglass will send a POST request to https://httpbin.org?source=hyperglass with Basic Authentication headers set.
Microsoft Teams Webhook
config.yaml
logging:
    http:
        provider: msteams
        host: <MS Teams webhook URL>Slack
config.yaml
logging:
    http:
        provider: slack
        host: <Slack webhook URL>