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!

Fueling your curiosity with new Splunk ILT and eLearning courses

At Splunk Education, we’re driven by curiosity—both ours and yours! That’s why we’re committed to delivering ...

Splunk AI Assistant for SPL 1.1.0 | Now Personalized to Your Environment for Greater ...

Splunk AI Assistant for SPL has transformed how users interact with Splunk, making it easier than ever to ...

Unleash Unified Security and Observability with Splunk Cloud Platform

     Now Available on Microsoft AzureOn Demand Now Step boldly into the AI revolution with enhanced security ...