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!

Prove Your Splunk Prowess at .conf25—No Prereqs Required!

Your Next Big Security Credential: No Prerequisites Needed We know you’ve got the skills, and now, earning the ...

Splunk Observability Cloud's AI Assistant in Action Series: Observability as Code

This is the sixth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how to ...

Splunk Answers Content Calendar, July Edition I

Hello Community! Welcome to another month of Community Content Calendar series! For the month of July, we will ...