<?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 Machine Agent not working after Server reboot in Splunk AppDynamics</title>
    <link>https://community.splunk.com/t5/Splunk-AppDynamics/Machine-Agent-not-working-after-Server-reboot/m-p/719237#M1401</link>
    <description>&lt;P&gt;Hello Team,&lt;/P&gt;

&lt;P&gt;After the server reboots the machine agent is not working. It's not collecting metrics. The app agent is collecting data. We are using linux system.&lt;/P&gt;

&lt;P&gt;Also let me know below points.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;How we can check the status of an machine agent?&lt;/LI&gt;
&lt;LI&gt;How we can start and stop the machine agent?&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Sachin Patil.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 03 Dec 2019 06:21:00 GMT</pubDate>
    <dc:creator>Sachin_Patil</dc:creator>
    <dc:date>2019-12-03T06:21:00Z</dc:date>
    <item>
      <title>Machine Agent not working after Server reboot</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/Machine-Agent-not-working-after-Server-reboot/m-p/719237#M1401</link>
      <description>&lt;P&gt;Hello Team,&lt;/P&gt;

&lt;P&gt;After the server reboots the machine agent is not working. It's not collecting metrics. The app agent is collecting data. We are using linux system.&lt;/P&gt;

&lt;P&gt;Also let me know below points.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;How we can check the status of an machine agent?&lt;/LI&gt;
&lt;LI&gt;How we can start and stop the machine agent?&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Sachin Patil.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2019 06:21:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/Machine-Agent-not-working-after-Server-reboot/m-p/719237#M1401</guid>
      <dc:creator>Sachin_Patil</dc:creator>
      <dc:date>2019-12-03T06:21:00Z</dc:date>
    </item>
    <item>
      <title>Re: Machine Agent not working after Server reboot</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/Machine-Agent-not-working-after-Server-reboot/m-p/719238#M1402</link>
      <description>&lt;P&gt;You need to create a startup script.&amp;nbsp; If you're using SysV, you'd just need to create a script in /etc/init.d, and then create a link to that in /etc/rc3.d, starting with a capital 'S', and following with a number, following the standard (the 'S' scrips are executed in order, starting with the lower numbers first).&amp;nbsp; Here's the startup script we use.&amp;nbsp; I believe we got this from AppDynamics directly, but it's been a long while, so it's possible we created it and I just forgot. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; . Sorry for the formatting.. Couldn't get cut and paste to work well.&amp;nbsp;&lt;/P&gt;&lt;P&gt;#!/bin/bash&lt;BR /&gt;# chkconfig: - 85 15&lt;BR /&gt;# description: Start and stop AppD Machine Agent&lt;BR /&gt;# Source function library.&lt;BR /&gt;. /etc/rc.d/init.d/functions&lt;/P&gt;&lt;P&gt;APP_DYN_DIR=/opt/appdynamics&lt;BR /&gt;APP_DYN_PID=`ps -ef | grep machineagent.jar | grep -v grep | awk ' { print $2 } '`&lt;BR /&gt;start () {&lt;/P&gt;&lt;P&gt;/opt/appdynamics/machineagent/bin/machine-agent -d -p /var/run/agent.pid -j&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /opt/appdynamics/machineagent/jre&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;stop () {&lt;BR /&gt;if [ $APP_DYN_PID ]; then&lt;BR /&gt;kill -9 $APP_DYN_PID&lt;BR /&gt;fi&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;status () {&lt;BR /&gt;if [ ! -d $APP_DYN_DIR ]; then&lt;BR /&gt;echo Appdynamics is not installed&lt;BR /&gt;exit 0&lt;BR /&gt;fi&lt;BR /&gt;if [ $APP_DYN_PID ]; then&lt;BR /&gt;echo Appdynamics pid $APP_DYN_PID is running&lt;BR /&gt;else&lt;BR /&gt;echo Appdynamics is not running&lt;BR /&gt;fi&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;case "$1" in&lt;BR /&gt;start)&lt;BR /&gt;start&lt;BR /&gt;;;&lt;BR /&gt;stop)&lt;BR /&gt;stop&lt;BR /&gt;;;&lt;BR /&gt;restart)&lt;BR /&gt;stop&lt;BR /&gt;start&lt;BR /&gt;;;&lt;BR /&gt;status)&lt;BR /&gt;status&lt;BR /&gt;RETVAL=$?&lt;BR /&gt;;;&lt;BR /&gt;*)&lt;BR /&gt;echo $"Usage: $0 {start|stop|restart|status}"&lt;BR /&gt;RETVAL=1&lt;BR /&gt;esac&lt;BR /&gt;exit $RETVAL&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Put that script in /etc/init.d, make sure it's executable by the root user like so:&lt;/P&gt;&lt;P&gt;-rwxr-xr-x. 1 root root 1521 Jun 3 2019 /etc/init.d/appdynamics&lt;/P&gt;&lt;P&gt;Then, create a sym link to that file in /etc/rc3.d:&lt;/P&gt;&lt;P&gt;&amp;nbsp;/etc/rc3.d/S85appdynamics -&amp;gt; ../init.d/appdynamics&lt;/P&gt;&lt;P&gt;If you run chkconfig commands ( chkconfig --add appdynamics, chkconfig --on appdynamics, etc) as well, but I prefer to create the links manually so I can control the startup level.&amp;nbsp; Make sure it starts up after your network services so DNS is up and running before the machine agent attempts to connect to the controller, unless you have a hosts entry for that.&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can validate that it's working by running the standard service commands as well:&lt;/P&gt;&lt;P&gt;sudo service appdynamics status&amp;nbsp;&lt;/P&gt;&lt;P&gt;This will also work with SystemD, though I don't have a sample script as we don't use SystemD on our Linux servers here.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try that, and let me know if you have any other questions on this,&lt;/P&gt;&lt;P&gt;~Ken&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2019 17:23:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/Machine-Agent-not-working-after-Server-reboot/m-p/719238#M1402</guid>
      <dc:creator>CommunityUser</dc:creator>
      <dc:date>2019-12-04T17:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: Machine Agent not working after Server reboot</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/Machine-Agent-not-working-after-Server-reboot/m-p/719239#M1403</link>
      <description>&lt;P&gt;Hello Ken,&lt;/P&gt;&lt;P&gt;Thanks for your responce,We will try your scripts in test env later but for now we try the below command and its working fine as expected.&lt;/P&gt;&lt;P&gt;Go to Path cd /opt/SP/data/appdynamics/machine-agent &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;and&lt;/P&gt;&lt;P&gt;run the command&amp;nbsp;--&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;nohup ./jre/bin/java –jar machineagent.jar &amp;amp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;We will try your method in test env and let you know the result later.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Regards,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sachin P&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2019 09:21:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/Machine-Agent-not-working-after-Server-reboot/m-p/719239#M1403</guid>
      <dc:creator>Sachin_Patil</dc:creator>
      <dc:date>2019-12-05T09:21:04Z</dc:date>
    </item>
  </channel>
</rss>

