Active IQ Unified Manager Discussions

Report on Protection Manager policy schedules for backups and replication

MIP_GMT01
12,193 Views

I am trying to report on protection policies backup and replication schedules and retention. Is there an easy way of doing this? I have tried dfpm command and operations manager report but not able to get what I want. There is a command "dfpm policy schedule" but it only works for application policies. I am using version 5.0.1.7864 (5.0.1). Would appreciate any help. Thanks

1 ACCEPTED SOLUTION

ppavagad
12,170 Views

Hi Muhammad/ Neil Holmes,

Please find attached the Script Plugin with name: PM_Extractor.zip.

This script plugin should help you in extracting schedule and retention information related to all the datasets to which a policy has been assigned.

The final output will be a consolidated CSV file.

The instructions to install the script and to view the output are in a file inside the archive titled, ReadMe.doc.

Also, do note that it is a primitive version of the Script Plugin. If you find any errors, please do report it back to us and we will try to help.

Thanks & Regards,

Pavan

Edit: Updated ReadMe.doc in the ScriptPlugin.

View solution in original post

22 REPLIES 22

adaikkap
11,397 Views

Hi Muhammad,

     Unfortunately there is no canned report or catalog with this details. The easiest way to get this is via script using the dfpm policy schedule and connection cli.

Can you give me a temple report on what and how you want the report to be ? Is it just based on

  • Each realtionship ?
  • Each Dataset ?
  • Each Protection Policy ?

If you can send us a simple report with column names and value that you are expecting then we can quickly get you a script plugin to generate this report. The same can later be scheduled, emailed and exported in various forms as well.

Regards

adai

MIP_GMT01
11,399 Views

Hi Adai,

Thank you for reply.

We have all windows based infrastructure so it will be good to get a power shell based script. Below is what I am looking for.

I also tried to get a report of all members of all DataSets. I know you can get members for one DS with "dfpm dataset list -m" but there is no command to get members of all dataset?

DatasetPolicyNodePrimary Backup SchedPrimary BP RetentionSV Backup schedSV BP retentionmirror sched
DS_CIFS_PROD_ENOM.Gold OnTap : Primary 00 Onsite Backup 05 Offsite Mirror 303Hourly = Every hour, starting 00:00Hourly = 1Day (24 BP)Every hour, starting 00:05Hourly = 1Day (24 BP)
Daily = 32Days (32 BP)
Every hour, starting 00:30

Many Thanks,

Muhammad

adaikkap
10,999 Views

Hi Muhammad,

     Thanks for the sample/ template of the report that you are looking for. But unfortunately we will not create it in powershell, instead in perl to make the script OS agnostic.

We will post a working script some time later mid next week.

Regards

adai

NEILHOLMES
10,999 Views

Hi adai,

this sounds exactly what I am after as well. Did you manage to produce a script for Muhammad?. If so, could you link me to it please. I'm new to navigating the community forum.

Many thanks.

Neil.

ppavagad
12,171 Views

Hi Muhammad/ Neil Holmes,

Please find attached the Script Plugin with name: PM_Extractor.zip.

This script plugin should help you in extracting schedule and retention information related to all the datasets to which a policy has been assigned.

The final output will be a consolidated CSV file.

The instructions to install the script and to view the output are in a file inside the archive titled, ReadMe.doc.

Also, do note that it is a primitive version of the Script Plugin. If you find any errors, please do report it back to us and we will try to help.

Thanks & Regards,

Pavan

Edit: Updated ReadMe.doc in the ScriptPlugin.

adaikkap
11,395 Views

Hi Muhammad & Niel,

                 The output would be stored in the following location. If the its a default installation.

C:\Program Files\NetApp\DataFabric Manager\DFM\script-plugins\PM_Extractor\ScriptOutput.csv

To generalise, in both windows or linux, you can find the output in the following location.

<installdir>/DFM/script-plugins\PM_Extractor\ScriptOutput.csv

Regards

adai

NEILHOLMES
11,396 Views

Many thanks to you all for the reply. Excellent script.

adaikkap
11,396 Views

Hi Neil,

     Happy that its really helping you and find it useful. Let us know if you have any ideas or improvements needed in the script.

Regards

adai

MIP_GMT01
11,397 Views

Thank you for script. For some reason I keep getting following error message when scheduled from dfm. I installed ActivePerl and path variable for perl exist in system environment variable.  I can also manually browse to .pl script. Any idea?

C:\Perl64\bin\perl.exe "C:\Program Files (x86)\NetApp\DataFabric Manager\DFM\script-plugins\PM_Extractor\PM_Extractor.pl" failed.

Reason: The system cannot find the file specified

ppavagad
10,740 Views

Hi Muhammad,

Thanks for your reply.

PM_Extractor.zip is a script plugin which needs to be installed via the Operations Manager. The detailed installation procedure for the same has been mentioned in the ReadMe.doc file inside the archive. Posting it again here for your convenience:

  • Operations Manager (Ops-Mgr) can be reached by via your browser by typing http://< DFM Server IP Address>:8080/dfm/
  • In your Ops-Mgr Go to Control Center => Management => Scripts
  • You will get to the “Scripts” Page. Where you will find two options.
  • Select the option “Path to ZIP file on your computer:” and point it to the zip file(PM_Extractor.zip).Then click the button “Add “ you will get to the “Scripts - Confirm Adding a Script” page and press “Add” again.
  • Now you have successfully added the script to the script plug-in infrastructure of Ops-Mgr.
  • To assign a schedule, if you wish to run this periodically then follows the steps below.
  • In the “Scripts” page you will find under the scripts heading “PM_Extractor”
  • Click on the like which will take you to “Script - Script Details” page. In that click on the link
  • Named “none” against schedules.
  • Which will take you to “Scripts - Add a Schedule”
  • Give a name to the schedule, select the group, for which you want this to be run,
  • The schedule type namely “Hourly, Daily, Weekly”
  • Finally say “Add schedule”. Now you have successfully added a schedule to the script.

Once the Perl script has been executed on the DFM server, the information is collated into a CSV file named, ‘ScriptOutput.csv’. The output file can be located on the DFM Server in the following location:

  • Windows: <installation directory>\NetApp\DataFabric Manager\DFM\script-plugins\PM_Extractor\ScriptOutput.csv

  Default Location: C:\Program Files\NetApp\DataFabric Manager\DFM\script-plugins\PM_Extractor\ScriptOutput.csv

  • Linux: <installation directory>/NTAPdfm/script-plugins/PM_Extractor/ScriptOutput.csv

Default Location: /opt/NTAPdfm/script-plugins/PM_Extractor/ScriptOutput.csv

Please follow this procedure and let us know if you still have the issue.

Thanks & Regards,

Pavan

adaikkap
9,510 Views

Hi Muhammad,

     I tried to reproduce this and only time I was able to do was when perl was not installed.  I got the same error as you.

Execution of 'perl C:\Program Files (x86)\Netapp\DataFabric Manager\DFM\script-plugins\PM_Extractor\PM_Extractor.pl' failed.

Reason: The system cannot find the file specified

Once I installed perl, this error went away. Also couple of things I noticed which you can try and confirm if that helps.

  1. The path should only be till bin and the .exe part
  2. Since you installed perl after dfm/ocum can you stop and start dfm service and check if you still get this error.

After trying the 2 things if you still hit the issue pls let us know.

Regards

adai

NEILHOLMES
10,739 Views

Hello Adai,

I'm afraid Mohammed has a point with regards the execution of the script. I too get the following message:

Execution of 'perl C:\Program Files (x86)\NetApp\DataFabric Manager\DFM\script-plugins\PM_Extractor\PM_Extractor.pl' failed.

Reason: The system cannot find the file specified

I believe I know why, I'm just not sure where to rectify it. When ran at a cmd window (as admin), the following two syntax fail:

'perl C:\Program Files (x86)\NetApp\DataFabric Manager\DFM\script-plugins\PM_Extractor\PM_Extractor.pl'

perl 'C:\Program Files (x86)\NetApp\DataFabric Manager\DFM\script-plugins\PM_Extractor\PM_Extractor.pl'

whereas this syntax runs:

perl "C:\Program Files (x86)\NetApp\DataFabric Manager\DFM\script-plugins\PM_Extractor\PM_Extractor.pl'"

Based on other forum posts, it seems the failures are caused by the spaces in the path which the double quotes rectifies.

I got the ScriptOutput.csv created running it this way, but it would be nice to know what to change so that Ops Mgr schedules the file creation.

ppavagad
10,739 Views

Hi Neil,

Are you extracting the .pl file from the archive and later executing the PM_Extractor.pl file?

You could directly schedule it from the Operations Manager as a script-plugin.

Thanks & Regards,

Pavan

NEILHOLMES
10,739 Views

Hi Pavan,

Sorry, I should have been clearer. It is when the script is added into Operations Manager as a script that the problem occurs. Adding, scheduling and executing the script works fine. A jobs folder is created and a <job>.out file created when the job runs as scheduled.

The message previously mentioned is what the <job>.out file contains. Needless to say, a ScriptOutput.csv file is not created.

When I bypass Operations Manager and run the perl script manually in a cmd window, I can get it to work.

Regards,

Neil.

ppavagad
10,739 Views

Hi Neil,


Thanks for your reply and your inputs.

Could you please run dfm about command on your DFM server and post the output here? I will try to investigate the same and will get back to you.

Thanks & Regards,

Pavan

NEILHOLMES
10,739 Views

Pavan,

find attached the requested information. I have only changed the company system details to 'confidential' for security reasons.

By way of reference, here are some other reports of similar issues:

https://communities.netapp.com/thread/15270

https://communities.netapp.com/thread/27220

Regards,

Neil.

ppavagad
9,509 Views

Hi Neil,

Thank you for sharing your environment details.

This could happen when the name of the script and the name in the package.xml doesn't match.

Please use the PM_Extractor.zip script-plugin archive attached with this post as-it-is, without modifying the archive-file-name.

Also, another work-around could be changing the location of the default script-plugin directory.

This can be done by using the scriptDir option of the dfm option command as follows:

X:\Program Files (x86)\NetApp\DataFabric Manager\DFM\script-plugins\PM_Extractor>mkdir x:\script-plugins

X:\Program Files (x86)\NetApp\DataFabric Manager\DFM\script-plugins\PM_Extractor>dfm script option set scriptDir="X:\script-plugins"
Changed script directory to X:\script-plugins.
NOTE: You must first move all of the data in X:/Program Files (x86)/NetApp/DataFabric Manager/DFM/script-plugins to the current directory X:\script-plugins.

You must now restart the server service:
dfm service stop server
dfm service start server 

You must now restart the scheduler service:
dfm service stop scheduler
dfm service start scheduler 

Could you please try this out and let me know if this works for you?

Thanks & Regards,

Pavan

NEILHOLMES
9,509 Views

Hi Pavan,

thanks. I removed the old script and installed your new script but the same issue occurs. I cannot change the ScriptDir at this moment as it is used by another script, namely the popular Efficiency Dashboard. The fact that this is working fine seems strange.

By way of reference, this extract from the last log for the Efficiency Dashboard shows it making a successful call of the executable:

Path init paht C:/Program Files (x86)/NetApp/DataFabric Manager/DFM/script-plugins/dfmeff/dfmeff.exe

Creating system-efficiency.csv ...

Creating group-efficiency.csv ...

Creating global-efficiency.csv ...

Creating xml files for groups ...

Creating xml files for storage systems ...

Done !

Maybe it is a quirk of the perl execution that is different to the Efficiency Dashboard execution.

Regards,

Neil.

adaikkap
9,266 Views

Hi Niels

        Is perl installed on your DFM/OCUM server ?  I tried to recreate the eror but the only time I could do this was when perl was not installed.

The reason why SED is working is because its a exe and doesn't need an interpreter, unlike the script plugin that we gave which is written in perl.

Once I installed perl, this error went away. Also couple of things I noticed which you can try and confirm if that helps.

  1. The path should only be till bin and the .exe part
  2. Since you installed perl after dfm/ocum can you stop and start dfm service and check if you still get this error.

Regards

adai

adaikkap
9,509 Views

Hi Neil and Muhammad,

  We are looking into this issue. Also is there any specific reason why you are running 5.0 and not the GA version 5.0.2 ?

Regards

adai

Public