Include system errors in health report (#12776)

Some examples of system errors:

- audit is enabled
- updatedb is installed
This commit is contained in:
Shireesh Anjal
2021-07-30 11:35:34 +05:30
committed by GitHub
parent 7281e86d9e
commit 56097dfca8
5 changed files with 76 additions and 0 deletions

View File

@@ -400,6 +400,17 @@ func (client *peerRESTClient) GetOSInfo(ctx context.Context) (info madmin.OSInfo
return info, err
}
// GetSysErrors - fetch memory information for a remote node.
func (client *peerRESTClient) GetSysErrors(ctx context.Context) (info madmin.SysErrors, err error) {
respBody, err := client.callWithContext(ctx, peerRESTMethodSysErrors, nil, nil, -1)
if err != nil {
return
}
defer http.DrainBody(respBody)
err = gob.NewDecoder(respBody).Decode(&info)
return info, err
}
// GetMemInfo - fetch memory information for a remote node.
func (client *peerRESTClient) GetMemInfo(ctx context.Context) (info madmin.MemInfo, err error) {
respBody, err := client.callWithContext(ctx, peerRESTMethodMemInfo, nil, nil, -1)