Splunk AppDynamics

Alert for switching from one DB server to another

Ahmed_Zarad
Explorer

Dears,

We have 2 DB servers, one is primary & the other is secondary and we are monitoring them using DNS, which take us to the working one. But when a switch occurs from the primary server to the secondary one, no indication shows this switch while the data is shown fine 

So we are searching for any metric or alert that can notify us when the switching process occurs.

Labels (1)
Tags (1)
0 Karma

Hiroki_Ito
Contributor

Thank you for posting to the community.
If there is a query that can return information related to the switch, you can use custom metrics to detect the switch.
Please see the document below for details.

For instance, a query like the following in mysql returns 1 if db collector is targeting the specified hostname and 0 after the switch because the hostname changes.
select count(*) from (select @@hostname as host) as hostname where host = <Hostname> ;

By monitoring the custom metric with a health rule, you should be able to configure a policy to send a notification when the switch occurs.

Best Regards,

Hiroki
Get Updates on the Splunk Community!

Brains, Bytes, and Boston: Learn from the Best at .conf25

When you think of Boston, you might picture colonial charm, world-class universities, or even the crack of a ...

Splunk AppDynamics Agents Webinar Series

Mark your calendars! On June 24th at 12PM PST, we’re going live with the second session of our Splunk ...

SplunkTrust Application Period is Officially OPEN!

It's that time, folks! The application/nomination period for the 2025 SplunkTrust is officially open! If you ...