Hi, I am trying to create a CCR Status Monitor in APM, does anybody already have a template for this or can help me creating one?
Hello Questionario,I know you can't install RC version on your production environment but I just want to let you know that APM 4 contains new Powershell Monitor that allows you to execute powershell scripts directly from APM. This could solve your issues with Exchange monitoring.
Maybe you could try RC on some VM to check it.
anybody?
Have you tried creating a template yourself?
The Microsoft documentation references a Test-Replication Cmdlet: http://technet.microsoft.com/en-us/library/bb124521%28EXCHG.80%29.aspx
So, you could either set up a new application template with the appropriate monitors that map to each of these items or you could run the cmdlet using a Windows Script Monitor.
Exchange 2007 SP1 introduces a new cmdlet called Test-ReplicationHealth. This cmdlet is designed for proactive monitoring of continuous replication and the continuous replication pipeline. The Test-ReplicationHealthcmdlet checks all aspects of replication, cluster services, and storage group replication and replay status to provide a complete overview of the replication system. Specifically, when run on a node in the cluster, the Test-ReplicationHealth cmdlet performs the tests described in the following table.
Cluster network status
Verifies that all cluster-managed networks found on the local node are running. This test is run only in a CCR environment.
Quorum group state
Verifies that the cluster group containing the quorum resource is healthy. This test is run only in a CCR environment.
File share quorum state
Verifies that the value of the FileSharePath used by the Majority Node Set quorum with file share witness is reachable. This test is run only in a CCR environment.
Clustered mailbox server group state
Verifies that the clustered mailbox server is healthy by confirming that all resources in the group are online. This test is run only in a CCR environment.
Node state
Verifies that neither of the nodes in the cluster is in a paused state. This test is run only in a CCR environment.
DNS registration status
Verifies that all cluster-managed network interfaces that have Require DNS registration to succeed set have passed DNS registration. This test is run only in a CCR environment.
Replication service status
Verifies that the Microsoft Exchange Replication service on the local computer is healthy.
Storage group copy suspended
Checks whether continuous replication has been suspended for any storage groups enabled for continuous replication.
Storage group copy failed
Checks whether any storage group copies are in a Failed state.
Storage group replication queue length
Checks whether any storage group has a replication copy queue length greater than best practice thresholds. Currently, these thresholds are:
Databases dismounted after failover
Checks whether any databases are dismounted or failed after a failover has occurred. This test only checks for databases that have failed as a result of a failover.
Hi, Questionario. You might be the first to share an Exchange 2007 CRR monitoring template with the community.
I google searched for monitoring continuous replication and found what promises to be a helpful article from Microsoft regarding CRR-related monitoring
http://technet.microsoft.com/en-us/library/bb629521(EXCHG.80).aspx
It looks like a decent start for figuring out interesting Performance Counters to monitor.
I see that I cross-posted with Chris. Sorry, Chris!
Well, I have googled before but couldnt find anything useful. I have to add that I am not even familiar with Exchange 2007 but I introduced Orion into our company and received a request for this monitor as currently none of our monitoring systems are able to do this.
I will take a look at the links next week and try to make an application template out of it, if I manage to do so I will share it with the community.
EDIT: I took a look at these links and I have seen that commandlet before as well...
The thing is I dont know where to go from there... I didnt even know I could call that cmdlet and evaluate the outcome of it with Orion...
Is there a guide as to how to do something like that or a similar monitor where I could see an example?
Hello Questionario,
you can run whatever you need using VBscript and "Windows Script Monitor". Just run commandlet and parse it's results to convert them to message and statistics for Windows Script Monitor.
Hi, do you have an example somewhere on how to run a commandlet and parse its results using vbscript and windows script monitor?
I just dont know where to get started...
Hello,cmdlet is "command" for Windows PowerShell. During installation of Exchange you should be able to install those cmdlets and then execute them in PowerShell. One that will probably interest you most is "Test-ReplicationHealth" cmdlet.
To execute cmdlets from VBScript you can use guide provided on http://blogs.msdn.com/powershell/archive/2008/07/25/invoking-powershell-from-vbscript-com.aspx.
I don't know how output of cmdlet looks like so I can't tell you how to parse it. Just try to execute it in PowerShell and see what you can get from it.
judging from the last link I guess that APM does not support powershell directly?
If I knew how to execute the powershell on the remote computer with the exchange module loaded and would get something that I can try to parse, I can try from there but right now I am not even sure how I would execute the cmdlet and even get the results back...
If you write vbscript and assign that windows script monitor to Exchange server, script is executed on that Exchange server. So you can execute anything you need on Exchange directly. Of course you have to provide credentials that have correct permissions on both Orion host and Exchange server.
Just write VB script according to provided link and try to execute it manually on Exchange. If it works, you can assign it as windows script monitor from APM.
it looks like I would have to install that Sapien plugin on every server I want to execute a powershell script on?
Microsoft VBScript runtime error: ActiveX component can't create object: 'SAPIEN.ActiveXPosh
that i know i wouldnt be able to do...
APM doesnt support powershell itself, does it?
is there any apm monitor which already utilizes executing a cmdlet with vbscript and parsing its output?
PS: Excuse all these questions but I have never really worked with any of this before
In fact you can execute powershell command in the same way as any other shell command from vbscript so you don't need that ActiveX plugin. It provides full interface to powershell but all you need is output.
Set objShell = CreateObject("WScript.Shell")Set objScriptExec = objShell.Exec("powershell -command Test-ReplicationHealth")commandOutput = objScriptExec.StdOut.ReadAll
Then you will have output of command in "commandOutput" variable.
Check "powershell -help" to see how can you invoke powershell with paramaters and so on. Try to execute "Test-ReplicationHealth" cmdlet in powershell on Exchange to see how it works and then incorporate it into vbscript.
APM has no direct monitor for PowerShell so you can't do this directly.
There are two problems with this now:
1.) It executes the powershell locally, not on the server I want to monitor
2.) it times out because the powershell never exits (if I go .Exec, if I try .Run it quits but doesnt return me what I need)
Hi jiri,
here I am again, still trying :-P
Set WshShell = WScript.CreateObject("WScript.Shell")Return= WshShell.Run ("PowerShell.exe -Command C:\Scripts\ExchangeReplicationHealth\SCRMonitoring.ps1", 0, true)
The Return value here is 1 which means it ran into some kind of error, probably a permission error?
If I run the vbs script locally, the script runs fine (as a .vbs file) but if I paste the code into APM, it errors out... any idea?
PS: the powershell script creates a text file for vbscript to read as this seems to be the only way to communicate from powershell to vbscript....