Get Logger
Retrieves information of a specified logger.
Required Permissions
Requires the ADMIN role or higher.
HTTP Request
GET /api/sonar/loggers/:guid
cURL Example
curl -H "Authorization: Bearer <API_KEY>" \
https://HOSTNAME/api/sonar/loggers/b90ea540-4f47-4bcf-b708-af610a649c50
Request Parameter
| Key | Required | Type | Description | Note |
|---|---|---|---|---|
| guid | O | String | Logger identifier | 36-characters GUID |
Success Response
{
"logger": {
"id": 1,
"guid": "b90ea540-4f47-4bcf-b708-af610a649c50",
"name": "WTMP",
"description": "",
"table_name": "WTMP",
"interval": 5000,
"cron_schedule": null,
"enabled": true,
"status": "running",
"failure": null,
"is_passive": false,
"model_guid": "cd09ae6f-fbc3-11ed-9320-02d178f999a6",
"model_name": "WTMP",
"group_guid": null,
"group_name": null,
"node_pair_guid": "27102ae5-3698-44d4-aad5-4f2def80f275",
"node_pair_name": "control",
"sentry_guid": null,
"asset_guid": null,
"asset_ip": null,
"hostname": null,
"log_count": 892,
"log_volume": 97531,
"drop_count": 0,
"drop_volume": 0,
"configs": {
"path": "/var/log/wtmp",
"server": null,
"regex_filter_target_field": null,
"regex_filter_pattern": null,
"regex_filter_negate": "false",
"dst_ip": null
},
"created": "2023-10-01 23:59:22+0900",
"updated": "2023-10-01 23:59:39+0900"
}
}
- logger (Map): Logger
- id (32-bit integer): Logger ID
- guid (String): Logger GUID
- name (String): Logger name
- description (String): Logger description
- table_name (String): Name of the logger table on which the collected logs are stored
- interval (32-bit integer): Logger interval (Unit: milliseconds)
- cron_schedule (String): Logger schedule in CRON schedule expression. E.g.
0 4 * * *indicates to execute a task at 4:00 AM daily. - enabled (Boolean): Whether the logger is enabled
- status (String): Running status. Either
runningorstopped(even if a logger is enabled, it may stop due to an error.) - failure (String): Last failure reason. E.g. an SFTP logger may encounter an
Auth failerror. - is_passive (Boolean): Whether the logger runs regardless of interval or schedule settings; a passive logger.
- model_guid (String): Logger model GUID
- model_name (String): Logger model name
- site_guid (String): Site GUID
- site_name (String): Site name
- node_pair_guid (String): Node pair GUID
- node_pair_name (String): Node pair name
- sentry_guid (String): Sentry GUID
- asset_guid (String): Asset IP address GUID
- asset_ip (String): Asset IP address
- hostname (String): Asset IP hostname
- log_count (64-bit integer): Total number of the collected logs. Excluding the logs filtered and dropped by a regular expression filter.
- log_volume (64-bit integer): Total volume (in bytes) of the collected logs. Excluding the logs filtered and dropped by a regular expression filter.
- drop_count (64-bit integer): Number of the logs filtered and dropped by a regular expression filter.
- drop_volume (64-bit integer): Volume (in bytes) of the logs filtered and dropped by a regular expression filter.
- configs (Map): Logger configuration key/value pairs. Settings vary depending on the logger model or logger factory.
- created (String): Creation date and time (
yyyy-MM-dd HH:mm:ssZ) - updated (String): Last modification date and time (
yyyy-MM-dd HH:mm:ssZ)
offset or limit value is not an integer
HTTP status code 400
{
"error_code": "invalid-argument",
"error_msg": "'offset' parameter should be int type"
}
offset or limit value is negative
HTTP status code 400
{
"error_code": "invalid-argument",
"error_msg": "'offset' must be greater than or equal to 0."
}