Foglight does not support monitor availability group via listener. Each node in availability group should be monitored separately.
Issues caused by this configuration.
- The Failover alarm will not work properly
- Since primary and secondary are different instances and machines
- This will confuse the topology because data from different instances will be mixed together. This will cause it to be problematic to review historical data as the user with not know to which instance it related.
- OS monitoring - for example, if Foglight can monitors instance "A" on machine "A", then after a failover to instance "B" on machine "B". If monitoring via a listener, the database metrics will belong to instance "B" but the OS metrics to machine "A"
It is recommended to monitor each instance node separately to make sure that all nodes(machines) and database instances are healthy and available for failover
Unlike a Failover cluster, with Availability Groups (AG) an instance can serve as secondary for one AG and primary on another. Even though some databases are part of AG on an instance, it does not mean all databases are part of the AG. Hence each instance should be monitored separately.