Community maintenance is complete. Thank you for your patience!

Active IQ Unified Manager Discussions

Report on Protection Manager policy schedules for backups and replication

MIP_GMT01

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

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

ppavagad

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

adaikkap

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

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

adaikkap

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

NEILHOLMES

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.

adaikkap

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

NEILHOLMES

Hi adai and Muhammad,

the problem has been resolved by restarting the server where DFM is installed. I suspect that if I had only restarted the dfm service it would have resolved it also.

Your suggestion that I should restart the dfm services triggered a thought in my mind that, maybe the server had not been restarted since the installation of Perl. This was indeed the case which explains why the other, non-perl script (the Efficiency Dashboard) was able to handle the long file paths, as that scheduled task had been added prior to the last server restart.

The confusion came from the fact that, when ran manually at the command line perl could execute your script fine without the requirement for a server restart. The ability of dfm to correctly handle the scheduled execution of the script required the restart of the dfm service.

Many thanks for your efforts.

adaikkap

Hi Neils,

Happy to know that the problem is now resolved. As you said, just starting the dfm service would have suffice. As I said earlier I could only replicate this error when perl was not installed. Also do a internal search I found that this could happen when perl is installed after the installation of dfm.

Until version 3.8 of DFM or so we used to bundle perl along with the installation but from then on stopped doing so.

BTW muhammad can you confirm if your is as well resolved ?

Regards

adai

ppavagad

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

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

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

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

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

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

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

MIP_GMT01

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

adaikkap

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

ppavagad

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

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

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

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public