<?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 Init file for Linux in Splunk AppDynamics</title>
    <link>https://community.splunk.com/t5/Splunk-AppDynamics/Init-file-for-Linux/m-p/735511#M9424</link>
    <description>&lt;P&gt;I'm using the below script to start the dbagent automatically but it doesn't start the agent. interactively running it produces this error:&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;# ./dbagent start&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;./dbagent: line 21: -Dappdynamics.agent.logging.dir=&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;#AGENT_OPTIONS=: command not found&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;what should these AGENT_OPTIONS be set to?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;#AGENT_OPTIONS="$AGENT_OPTIONS -Dappdynamics.agent.logging.dir=/opt/appd/dbagent/logs"&lt;/PRE&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;when I try to set them the script still fails with the same error.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;my script&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;#!/bin/bash
#
# Init file for AppDynamics Database Agent
#
# chkconfig: 2345 60 25
# description: database agent for AppDynamics

#CHANGE ME: Set to the Java install directory
JAVA="export JAVA_HOME=$(readlink -f /usr/bin/java | sed "s:bin/java::")""

#CHANGE ME: Set to the agent's install directory
AGENT_HOME="/opt/appd/dbagent"
AGENT="$AGENT_HOME/db-agent.jar"

#CHANGE ME: Set to a name that is unique to the Controller - required when a machine agent is
#also running on the same hardware
AGENT_OPTIONS="appdynamics.agent.uniqueHostId='unique host ID'"

# Agent Options
AGENT_OPTIONS=""
#AGENT_OPTIONS="$AGENT_OPTIONS -Dappdynamics.agent.logging.dir="
#AGENT_OPTIONS="$AGENT_OPTIONS -Dmetric.http.listener=true | false
#AGENT_OPTIONS="$AGENT_OPTIONS -Dmetric.http.listener.port=&amp;lt;port&amp;gt;"
#AGENT_OPTIONS="$AGENT_OPTIONS -Dserver.name=&amp;lt;hostname&amp;gt;"


start()
{
nohup $JAVA $AGENT_OPTIONS -Xmx256m -jar $AGENT &amp;gt; /dev/null 2&amp;gt;&amp;amp;1 &amp;amp;
}

stop()
{
ps -opid,cmd |egrep "[0-9]+ $jJAVA.*db-agent" | awk '{print $1}' | xargs --no-run-if-empty kill -9
}

case "$1" in
start)
start
;;

stop)
stop
;;

restart)
stop
start
;;
*)
echo "Usage: $0 start|stop|restart"
esac&lt;/PRE&gt;</description>
    <pubDate>Tue, 01 Aug 2017 18:40:50 GMT</pubDate>
    <dc:creator>CommunityUser</dc:creator>
    <dc:date>2017-08-01T18:40:50Z</dc:date>
    <item>
      <title>Init file for Linux</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/Init-file-for-Linux/m-p/735511#M9424</link>
      <description>&lt;P&gt;I'm using the below script to start the dbagent automatically but it doesn't start the agent. interactively running it produces this error:&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;# ./dbagent start&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;./dbagent: line 21: -Dappdynamics.agent.logging.dir=&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;#AGENT_OPTIONS=: command not found&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;what should these AGENT_OPTIONS be set to?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;#AGENT_OPTIONS="$AGENT_OPTIONS -Dappdynamics.agent.logging.dir=/opt/appd/dbagent/logs"&lt;/PRE&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;when I try to set them the script still fails with the same error.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;my script&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;#!/bin/bash
#
# Init file for AppDynamics Database Agent
#
# chkconfig: 2345 60 25
# description: database agent for AppDynamics

#CHANGE ME: Set to the Java install directory
JAVA="export JAVA_HOME=$(readlink -f /usr/bin/java | sed "s:bin/java::")""

#CHANGE ME: Set to the agent's install directory
AGENT_HOME="/opt/appd/dbagent"
AGENT="$AGENT_HOME/db-agent.jar"

#CHANGE ME: Set to a name that is unique to the Controller - required when a machine agent is
#also running on the same hardware
AGENT_OPTIONS="appdynamics.agent.uniqueHostId='unique host ID'"

# Agent Options
AGENT_OPTIONS=""
#AGENT_OPTIONS="$AGENT_OPTIONS -Dappdynamics.agent.logging.dir="
#AGENT_OPTIONS="$AGENT_OPTIONS -Dmetric.http.listener=true | false
#AGENT_OPTIONS="$AGENT_OPTIONS -Dmetric.http.listener.port=&amp;lt;port&amp;gt;"
#AGENT_OPTIONS="$AGENT_OPTIONS -Dserver.name=&amp;lt;hostname&amp;gt;"


start()
{
nohup $JAVA $AGENT_OPTIONS -Xmx256m -jar $AGENT &amp;gt; /dev/null 2&amp;gt;&amp;amp;1 &amp;amp;
}

stop()
{
ps -opid,cmd |egrep "[0-9]+ $jJAVA.*db-agent" | awk '{print $1}' | xargs --no-run-if-empty kill -9
}

case "$1" in
start)
start
;;

stop)
stop
;;

restart)
stop
start
;;
*)
echo "Usage: $0 start|stop|restart"
esac&lt;/PRE&gt;</description>
      <pubDate>Tue, 01 Aug 2017 18:40:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/Init-file-for-Linux/m-p/735511#M9424</guid>
      <dc:creator>CommunityUser</dc:creator>
      <dc:date>2017-08-01T18:40:50Z</dc:date>
    </item>
    <item>
      <title>Re: Init file for Linux</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/Init-file-for-Linux/m-p/735512#M9425</link>
      <description>&lt;P&gt;Hi John,&lt;/P&gt;

&lt;P&gt;Please comment and add the&amp;nbsp;AGENT_OPTIONS sections like below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;# commenting below&lt;/P&gt;
&lt;P&gt;#&amp;nbsp;&lt;SPAN&gt;AGENT_OPTIONS = ""&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN&gt;# Adding the unique host id of the dbagent installed machine&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;AGENT_OPTIONS="appdynamics.agent.uniqueHostId='DBAgent-Server-Name'"&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;You can also add the properties as listed document based on the need.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.appdynamics.com/display/PRO43/Database+Agent+Configuration+Properties" target="_blank" rel="nofollow noopener noreferrer"&gt;https://docs.appdynamics.com/display/PRO43/Database+Agent+Configuration+Properties&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN&gt;Save and Now check the behavior.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Anka&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Aug 2017 15:53:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/Init-file-for-Linux/m-p/735512#M9425</guid>
      <dc:creator>Anka_Thanneeru</dc:creator>
      <dc:date>2017-08-03T15:53:21Z</dc:date>
    </item>
  </channel>
</rss>

