Monitor AG Listener Remotely

  • Hi Guys,

    I need to check connectivity to AG listener remotely and log that to a table/file. What is the best way to do that? Powershell?

  • setup a linked server to the reporting database, run a sql agent query to save result to reporting database, check reporting database or write a SSRS report.

    Or you can setup SCOM to monitor alwayson status.

  • salamlemon (7/28/2015)


    Hi Guys,

    I need to check connectivity to AG listener remotely and log that to a table/file. What is the best way to do that? Powershell?

    You'll want to check the cluster resources for the virtual networkname and virtual IP are online, this can be done remotely via a Powershell query

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • Thanks for your reply Perry. Do you have any sample script for that?

    Regards,

  • Normally I'd give my standard response, "all pirates should find their own treasure". However, seeing as I'm in a good mood here you go

    Get-ClusterResource -Cluster "theWindowsClusterName" |

    ?{$_.resourcetype -EQ "IP Address" -or "Network Name" -and

    ?{$_.ownergroup -EQ "TheClusterGroupName"} |

    ft ownernode,resourcetype,name,ownergroup, state

    Note; wherever you run this from you'll need to have the "Failoverclusters" Powershell module loaded.

    You'll need to parameterise the above for cluster name and resource group name to make it truly generic

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply