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 the remote computer. However, firstly there is need to jump to elevated mode of the Netbackup appliance shell. Do you think that is it possible to manage such a solution and if so, how?

Many thanks for possible suggestions!

  • 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

9 Replies

  • Hi JimmyB2 

    If all you need to run are NetBackup commands then it is feasible. You should be able to do this after you create NetBackupCLI user (Main -> Manage -> NetBackupCLI

    This will allow you to run NetBackup commands. To run remotely you will need to use the sudo command and the full path to the binary (eg. ssh cli_user@appliance sudo /usr/openv/netbackup/bin/bpdbjobs -summary).

    To provide passwordless access to this user will require you to create an authorized_keys file in a folder /var/sshkeys/cli_user the folder will need to match the username. The authorized_keys files will need to be owned by the cli_user (with only rw permission for the user). 

    Otherwise - have a look at the AMS capability to remotely monitor a number of appliances from a central location. This can be setup on a virtual appliance and a free license key is provided for this purpose. 

    Cheers
    David

  • In case you're still looking at this issue, if you setup another Master as trusted by your appliance you can always run the command from there too.

    trustedmaster# bpdbjobs -M appliancename

     

    • JimmyB2's avatar
      JimmyB2
      Level 4

      Thank you davidmoline , quebek , jnardello very much for your help.

      Unfortunately, there is no possibility to set up Ops center or bind the Netbackup appliance with Master server.

      However, I would ask if it is feasible to use REST API for Netbackup Appliance Version 3.2 (
      NetBackup Version 8.2) ?

      I am asking because I am not sure if the API calls are usable only for standard Netbackup Master server.

      • davidmoline's avatar
        davidmoline
        Level 6

        Hi JimmyB2 

        You are correct - the API calls are only applicable to the master server - though it doesn't matter if the master is BYO or appliance (there are also some APIs related specifically to appliances, but I don't imagine you mean those). 

        What commands/monitoring from the appliance do you want that you can't also run from the master server itself? Or is the appliance the master?

        Another way to go if the appliance is the master (other than the API route), would be to install the NetBackup server components on a spare system use that - effectively add a media server that doesn't do anything except run commands. SImplest way would be to install it as a media server with the appliance as the master (that way the certificates get deployed etc.) and add this new "media" server to the SERVER list. You can then run those commands from there.

        David