Skip to content

/api/v2/status/logs does not query all log events #509

@aeleus

Description

@aeleus

Describe the bug
I just upgraded to REST API v2.01 from 1.75. I can no longer query all system and firewall events.

To Reproduce
Steps to reproduce the behavior:
When querying https://pfsense.domain.tld/api/v2/status/logs/system (or firewall), the oldest event is always the first event in the current log file. Example:
Jul 13 15:08:00 pfSense newsyslog[83161]: logfile turned over due to size>500K

No events from the rotated log files are returned. If the query is run just after the log files are rotated, only a single result is returned.
Changing values for limit=0&offset=0 still only returns results from the current log file.

Expected behavior
The ability to query all log events like the UI does (https://pfsense.domain.tld/status_logs.php and https://pfsense.domain.tld/status_logs_filter.php)

pfSense Version & Package Version:

  • pfSense Version: 2.7.2-RELEASE
  • Package Version: 2.0_1

Affected Endpoints:

  • URL: /api/v2/status/logs/system
  • URL: /api/v2/status/logs/firewall

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementIssues or PRs that enhance existing features

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions