Forum Discussion

JimmyB2's avatar
JimmyB2
Level 4
3 years ago

Netbackup appliance remote scripts execution for monitoring

Hi there, my question is if it is feasible to remotely monitor Netbackup appliance. The thing is that we need to remotely execute e.g. command ''bpdbjobs -summary'' on the Netbackup appliance from ...
  • davidmoline's avatar
    davidmoline
    3 years ago

    Hi JimmyB2 

    Here's an example of what someone else wrote to extract audit logs from NetBackup (obviously change the master server name, user etc as required) - this was run from a Linux host (jq is a json processor/formatter)

    First get and store the auth token:

    token=`curl -k -X POST https://nbmaster:1556/netbackup/login -H 'Content-Type: application/json' -d '{"domainType":"", "domainName":"", "userName":"root", "password":"XXXXXXXX"}' | jq --raw-output '.token'`

    Then use the token to get the audit logs:

    curl -k -X GET https://nbmaster:1556/netbackup/security/auditlogs -H 'Content-Type: application/json' -H "authorization:$token" | jq .

    David