I need to export all audit logs of Netbrain into a file or database on monthly basis. How to export "audit logs" from "System Management" to a csv file ?
Page 1 / 1
Hi Rakesh,
First of all you need Highest level privilege access to do that. From the NetBrain REST API (NetBrain-REST-API-R10), you can use the API Server URL : “http(s)://NetBrain-WebAPI-IP/ServicesAPI/API/V1/CMDB/AuditLogs”. Here you have an option to filter the audit logs based on the time frame, tenant id, domain id etc. The output will be in JSON format sorted from the latest to earliest.
Sample output:
{
"auditLogs":i
{
"time":"2020-05-26T14:18:22.785Z",
"userName":"ui.user1",
"tenantName":"Initial Tenant",
"domainName":"Initial Domain",
"machineName":"pool-96-237-64-80",
"ipAddress":"96.237.64.81",
"userAgent":"Chrome",
"module":"System Advanced Settings",
"message":"Enable Audit Log",
"status":0
},
{
"time":"2020-05-26T14:18:42.536Z",
"userName":"api.user1",
"tenantName":"",
"domainName":"",
"machineName":"pat-149-96-5-12",
"ipAddress":"149.96.5.12",
"userAgent":"Unknown",
"module":"Login",
"message":"Log in to get an authentication token with username api.user.",
"status":0
}
],
"statusCode": 790200,
"statusDescription":"Success."
}
For more info in API documentation please follow below link:
Thanks
Reply
Login to the community
No account yet? Create an account
Sign in with SSO
Login via NetBrain Universityor
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.