-
-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
/api/v2/status/logs does not query all log events #509
Comments
This doesn't look like a bug, both v1 and v2 only look at the most recent log file and don't attempt to decompress or look at log files that have already been rotated: pfsense-api/pfSense-pkg-API/files/etc/inc/api/models/APIStatusLogSystemRead.inc Lines 27 to 32 in 5db64cd
pfsense-api/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Models/SystemLog.inc Lines 28 to 39 in b21981d
In v1 this was intentionally done to prevent API calls from hanging when reading a large number of logs, but it's likely feasible to do this in v2 now that pagination is supported. I'll see if I can work it into v2.1.0. Thanks! |
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:
Affected Endpoints:
The text was updated successfully, but these errors were encountered: