Logging & Webhooks
hyperglass supports multiple types of logging, for both application troubleshooting and general reporting.
#
File LoggingBy default, hyperglass writes all log messages to a log file located at /tmp/hyperglass.log
. This behavior and other file logging parameters may be overridden if needed:
Parameter | Type | Default | Description |
---|---|---|---|
directory | String | '/tmp' | Valid directory where the log file can be written. |
format | String | 'text' | Log format - may be either 'text' or 'json' . |
max_size | String | '50MB' | Maximum log file size before logs are rotated. |
The logging
subsection contains additional subsections of its own for configuring other logging methods:
Section | Description | All Options |
---|---|---|
syslog | Syslog settings | ➡️ |
http | HTTP webhook settings | ➡️ |
note
You do not have to set enable: false
to disable syslogging or webhooks - if there is no configuration under the syslog
or http
subsections, it the option is disabled by default. The enable
option exists for easy toggling without having to delete the other settings.
#
SyslogIf syslogging is enabled, all of the same log messages written to the file and/or stdout will be forwarded to the syslog server.
Parameter | Type | Default | Description |
---|---|---|---|
enable | Boolean | true | Optionally disable syslogging even if configured. |
host | String | Syslog target IP address or hostname. | |
port | Integer | 514 | Syslog target UDP port number. |
#
WebhooksIf http logging is enabled, an HTTP POST will be sent to the configured target every time a query is submitted, after it is validated.
Parameter | Type | Default | Description |
---|---|---|---|
enable | Boolean | true | Optionally disable webhooks even if configured. |
host | String | HTTP URL to webhook target. | |
headers | Mapping | Any arbitrary mappings, which will be sent as HTTP headers. | |
params | Mapping | Any arbitrary mappings, which will be sent as URL parameters (e.g. http://example.com/log?param=value ). | |
verify_ssl | Boolean | true | Verify SSL certificate of target. |
timeout | Integer | 5 | Time in seconds before request times out. |
provider | String | 'generic' | Webhook provider. |
#
Supported ProvidersProvider | Parameter Value |
---|---|
Generic | 'generic' |
Microsoft Teams | 'msteams' |
Slack | 'slack' |
#
AuthenticationBasic and API key authentication are supported.
Parameter | Type | Default | Description |
---|---|---|---|
mode | String | 'basic' | Authentication mode. Must be 'basic' or 'api_key' |
username | String | Username for basic authentication. | |
password | String | Password for basic authentication, or API Key for API key authentication. |
important
If api_key
is used, the header X-API-Key: {key}
is added to the request, where {key}
is the password.
#
Webhook Data StructureIf the provider
field is set to 'generic'
, the webhook will POST JSON data in the following format: