<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Query on DB status in controller in Splunk AppDynamics</title>
    <link>https://community.splunk.com/t5/Splunk-AppDynamics/Query-on-DB-status-in-controller/m-p/721901#M2896</link>
    <description>&lt;P&gt;hi team&amp;nbsp;&lt;/P&gt;&lt;P&gt;we have active/passive configuration of the db agent for the db collectors in the controller. is there any query where we can find which is active/passive host by running in the controller database and not checking from the controller gui.&lt;/P&gt;&lt;P&gt;below is the ref snap from the database agent setting screen where one is active host and other passive host.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JubinPatel_0-1721027291437.png" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image.png"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/35611i918216D488207789/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 15 Jul 2024 07:10:37 GMT</pubDate>
    <dc:creator>Jubin_Patel</dc:creator>
    <dc:date>2024-07-15T07:10:37Z</dc:date>
    <item>
      <title>Query on DB status in controller</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/Query-on-DB-status-in-controller/m-p/721901#M2896</link>
      <description>&lt;P&gt;hi team&amp;nbsp;&lt;/P&gt;&lt;P&gt;we have active/passive configuration of the db agent for the db collectors in the controller. is there any query where we can find which is active/passive host by running in the controller database and not checking from the controller gui.&lt;/P&gt;&lt;P&gt;below is the ref snap from the database agent setting screen where one is active host and other passive host.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JubinPatel_0-1721027291437.png" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image.png"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/35611i918216D488207789/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jul 2024 07:10:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/Query-on-DB-status-in-controller/m-p/721901#M2896</guid>
      <dc:creator>Jubin_Patel</dc:creator>
      <dc:date>2024-07-15T07:10:37Z</dc:date>
    </item>
    <item>
      <title>Re: Query on DB status in controller</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/Query-on-DB-status-in-controller/m-p/721902#M2897</link>
      <description>&lt;P&gt;Hello Jubin.Patel,&lt;/P&gt;
&lt;P&gt;Thanks for posting question on the community.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Controller determines status of db agents with the same name based on&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;latest&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;start time.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Hence we could fetch last agent start time from controller db and then judge which one is active / passive.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Please access controller and use the query command below: (You need to use real account name in this SQL):&lt;/SPAN&gt;&lt;/P&gt;

&lt;PRE class="lia-code-sample language-java"&gt;&lt;CODE&gt;select acn.name as nodeName, ag.type as agentType, ag.agent_version as agentVersion, from_unixtime(ag.last_agent_start_timestamp/1000) as lastAgentStartTime from application app inner join application_component ac on ac.application_id = app.id inner join application_component_node acn on acn.application_component_id = ac.id inner join application_component_node_agent_mapping acnm on acnm.application_component_node_id=acn.id inner join agent ag on ag.id=acnm.agent_id inner join account a on a.id = app.account_id where a.name='&amp;lt;account name&amp;gt;' and ag.type = 'DB_AGENT';&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;SPAN&gt;(E.g.)&lt;/SPAN&gt;&lt;/P&gt;

&lt;PRE class="lia-code-sample language-java"&gt;&lt;CODE&gt;mysql&amp;gt; select acn.name as nodeName, ag.type as agentType, ag.agent_version as agentVersion, from_unixtime(ag.last_agent_start_timestamp/1000) as lastAgentStartTime from application app inner join application_component ac on ac.application_id = app.id inner join application_component_node acn on acn.application_component_id = ac.id inner join application_component_node_agent_mapping acnm on acnm.application_component_node_id=acn.id inner join agent ag on ag.id=acnm.agent_id inner join account a on a.id = app.account_id where a.name='xxxxxxxx' and ag.type = 'DB_AGENT';
+---------------------------------------------+-----------+-------------------------------------------------------------------------------+--------------------------+
| nodeName                                    | agentType | agentVersion                                                                  | lastAgentStartTime       |
+---------------------------------------------+-----------+-------------------------------------------------------------------------------+--------------------------+
| cDBAgent_Mao|host:cDBAgent-Secondary-Mao    | DB_AGENT  | Database Agent v24.5.0.4126 GA compatible with 4.5.2.0 Build Date  2024-05-15 | 2024-07-16 05:48:48.8930 |
| cDBAgent_Mao|host:cDBAgent-Primary-Mao      | DB_AGENT  | Database Agent v24.5.0.4126 GA compatible with 4.5.2.0 Build Date  2024-05-15 | 2024-07-16 05:48:48.8890 |
+---------------------------------------------+-----------+-------------------------------------------------------------------------------+--------------------------+
2 rows in set (0.00 sec)&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="screenshot.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image.png"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/35614iFE343C339DB66539/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Xiangning&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2024 07:46:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/Query-on-DB-status-in-controller/m-p/721902#M2897</guid>
      <dc:creator>Xiangning_Mao</dc:creator>
      <dc:date>2024-07-16T07:46:46Z</dc:date>
    </item>
    <item>
      <title>Re: Query on DB status in controller</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/Query-on-DB-status-in-controller/m-p/721903#M2898</link>
      <description>&lt;P&gt;Hello &lt;A href="https://community.appdynamics.com/t5/user/viewprofilepage/user-id/159560"&gt;@Xiangning.Mao&lt;/A&gt;&amp;nbsp;,Thanks for the details. It worked as expected.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2024 13:15:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/Query-on-DB-status-in-controller/m-p/721903#M2898</guid>
      <dc:creator>Jubin_Patel</dc:creator>
      <dc:date>2024-07-16T13:15:23Z</dc:date>
    </item>
    <item>
      <title>Re: Query on DB status in controller</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/Query-on-DB-status-in-controller/m-p/744666#M11850</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/305427"&gt;@Xiangning_Mao&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;is it possible to add Status column as well?&lt;/P&gt;</description>
      <pubDate>Tue, 22 Apr 2025 09:39:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/Query-on-DB-status-in-controller/m-p/744666#M11850</guid>
      <dc:creator>JGP</dc:creator>
      <dc:date>2025-04-22T09:39:39Z</dc:date>
    </item>
  </channel>
</rss>

