/log

Provides access to various logs. Since logs may contain sensitive information, this service is available only to users with the save privilege (see /auth/rights).

Get kernel log

Get the kernel log. It has a fixed size and consists of a sequence of prioritized and time-stamped entries. When the log fills up, older entries are replaced.

SecurityApiKey
Request
query Parameters
after
number

Limits the output to messages with a timestamp that is newer than the value specified by this parameter. The value must be a decimal number and may include a fractional part. The number is interpreted as seconds since the epoch. For most logs, the epoch is the Unix epoch (i.e., seconds since the start of Jan 1, 1970 UTC). However, for the kernel log, the epoch is the time the meter was powered up (booted).

Example: after=6.9801816
Responses
200

Kernel log response.

401

Unauthorized response.

get/log/kernel
Request samples
Response samples
application/json
{
  • "log": [
    ],
  • "error": "Error message (present if an error occurred)."
}

Get a Lua log

Get a Lua log. Each log has a fixed size and consists of a sequence of time-stamped entries. When the log fills up, older entries are replaced.

SecurityApiKey
Request
path Parameters
name
required
string

The name of a Lua log. This may be one of:

  • alertd: The log for scripts that are executed when checking for and generating alerts.

  • ctrld: The log for control scripts.

  • teamd: The log for scripts executed while evaluating formula scripts and for calculating costs (tariff script).

Enum: "alertd" "ctrld" "teamd"
query Parameters
after
number

Limits the output to messages with a timestamp that is newer than the value specified by this parameter. The value must be a decimal number and may include a fractional part. The number is interpreted as seconds since the epoch. For most logs, the epoch is the Unix epoch (i.e., seconds since the start of Jan 1, 1970 UTC). However, for the kernel log, the epoch is the time the meter was powered up (booted).

Example: after=6.9801816
Responses
200

Lua log response.

401

Unauthorized response.

get/log/lua/{name}
Request samples
Response samples
application/json
{
  • "log": [
    ]
}

Get system log

Get the system log. It has a fixed size and consists of a sequence of messages. When the log fills up, older messages are replaced. The size of this log can be configured with /config/log/system/size.

SecurityApiKey
Responses
200

System log response.

401

Unauthorized response.

get/log/system
Request samples
Response samples
application/json
{
  • "log": [
    ]
}