-
Notifications
You must be signed in to change notification settings - Fork 0
Limit number of logs collected #7
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
base: stackhpc
Are you sure you want to change the base?
Conversation
This query is extremely slow, so limit to 10 logs. Elasticsearch is better for long term storage.
@jovial suggested extending this to make the number of logs collected configurable via a scrape parameter. Marking as draft. |
I did implement this, but it 2025/03/17 09:01:55 error error getting log entries from log service Manager=iDRAC.Embedded.1 app=redfish_exporter collector=ManagerCollector error=failed to retrieve some items: [{"link":"/redfish/v1/Managers/iDRAC.Embedded.1/LogServices/FaultList/Entries?$top=10","error":"501: {\n "error": {\n "code": "Base.1.0.GeneralError",\n "message": "A general error has occurred. See ExtendedInfo for more information.",\n "@Message.ExtendedInfo": [\n {\n "@odata.type" : "#Message.v1_0_0.Message",\n "MessageId": "Base.1.0.InternalError",\n "Message": "not supported, Query parameter top not supported"\n }\n some log services don't support the query parameter:
|
Split out here: #8. |
targetLoggerCtx.WithError(err).Error("error parsing collectlogs query parameter as a boolean") | ||
return | ||
} | ||
collectionCtx, err := common.NewCollectionContext(r, target, hostConfig, targetLoggerCtx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the addition of the context. From a quick glance, it now means that the redfish session is long lived? I.e. persists across scrapes. In that case, we need to handle re-authentication if the session expires / is deleted etc, or have I missed something?
Uh oh!
There was an error while loading. Please reload this page.