Tuesday, July 31, 2012

[part III - Configure environment for script access] Using OpsView Core to check RPO through DPM monitoring

[If you haven't yet, check out the Part II of this article here]

So we have the script ready.

2.6. Configure Opsview Agent to make the script accessible "

Before you can use this script remotely, you first have to "tell" the agent that it exists and how to run it. So, you should:
  • copy "check_rpo.ps1" script to the scripts folder of the Opsview Agent 
  • open "nsc.ini" file, add the following line to the [NRPE Handlers] section and save the file afterwards:
check_rpo=cmd /c echo scripts\check_rpo.ps1 $ARG1$; exit($lastexitcode) | powershell.exe -PSConsoleFile "C:\Program Files\Microsoft DPM\DPM\bin\dpmshell.psc1" -command - 
  • restart Opsview agent in test mode by stopping the service (CTRL + C on the agent command window) and starting it again:
nsclient++ -test

2.7. Test the script remotely

Go back to your SSH session to Opsview Monitoring Server (or follow again point 2.3. of this tutorial) and execute
./check_nrpe -H 192.168.1.20 -t 20 -c check_rpo -a '-ProtGrpName "Exchange Databases" -DataSrcName "Mailbox Database 1" -RpoHours 24'

You should change the parameters according to your needs:

  • -ProtGrpName - The name of the protection group of configured on you DPM Server
  • -DataSrcName - The name of the datasource you wish to check
  • -RpoHours - You recovery point objective (the maximum number of hours before next recovery point)


On the client agent side, if you got the agent running in test mode, you should see the injected request and the agent's result.
If you check the picture you should see that apart from the result itself (OK- the RPO is beeing met or CRITICAL - something's wrong), it'll also return:
  • Hours since last RP
  • Last RP Date/time
  • RP validity
  • Size of RP
On the server side, you should now see the response returned.

Ok. You can now call the script remotely and it returns the desired results.