<?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 Re: Monitoring Nodejs with pm2 in Splunk AppDynamics</title>
    <link>https://community.splunk.com/t5/Splunk-AppDynamics/Monitoring-Nodejs-with-pm2/m-p/721426#M2607</link>
    <description>&lt;P&gt;Hi, thaks.&lt;/P&gt;
&lt;P&gt;I followed your instructions but I always fail because I can not find the directory.&lt;BR /&gt;I have tried to create the directories tmp / appd / tmp / appd / logs and / tmp / appd / proxy_ctrl_dir&lt;/P&gt;

&lt;P&gt;I have execute:&lt;/P&gt;

&lt;P&gt;[nodejs@svtarqfrt1re proxy]$ ./runProxy -j /appsrv/LIBERBANK.PROYECTO/LBK_ARQ_SPA_SERVER/node_modules/appdynamics/node_modules/appdynamics-jre/jre - /tmp/appd/proxy_ctrl_dir /tmp/appd/logs/&lt;BR /&gt;Proxy communication directory, "-", does not exist or is not a directory.&lt;BR /&gt;Usage: runProxy options -- proxyCommunicationDir logDirectory [jvmOption [ jvmOption [...] ]&lt;BR /&gt;Options:&lt;BR /&gt;&amp;nbsp; -r &amp;lt;dir&amp;gt;, --proxy-runtime-dir=&amp;lt;dir&amp;gt;&amp;nbsp;&amp;nbsp; Specifies proxy runtime directory&lt;BR /&gt;&amp;nbsp; -d &amp;lt;dir&amp;gt;, --proxy-dir=&amp;lt;dir&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Specifies root proxy directory&lt;BR /&gt;&amp;nbsp; -j &amp;lt;dir&amp;gt;, --jre-dir=&amp;lt;dir&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Specifies root JRE directory&lt;BR /&gt;&amp;nbsp; -v, --verbose&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Enable verbose output&lt;BR /&gt;&amp;nbsp; -h,--help&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Show this message&lt;BR /&gt;&lt;BR /&gt;Example: ./runProxy -d ./proxy -r /tmp/appd/app1/tier1/node1 /tmp/proxy.communication /tmp/agentLogs&lt;BR /&gt;Note: Please use quotes for the entries wherever applicable.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;But always getting the following error&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;"Proxy communication directory," - ", does not exist or is not a directory."&lt;BR /&gt;Would be kind enough to show me some example.&lt;BR /&gt;Many thank&lt;/P&gt;</description>
    <pubDate>Wed, 22 Mar 2017 12:10:16 GMT</pubDate>
    <dc:creator>CommunityUser</dc:creator>
    <dc:date>2017-03-22T12:10:16Z</dc:date>
    <item>
      <title>Monitoring Nodejs with pm2</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/Monitoring-Nodejs-with-pm2/m-p/721424#M2605</link>
      <description>&lt;P&gt;Hi, good morning.&lt;/P&gt;
&lt;P&gt;I'm testing Appdinamyc nodejs monitor.&lt;BR /&gt;I have verified that it works perfectly.&lt;BR /&gt;But I have problems when I use the application manager nodejs "pm2" to start them with "n instances".&lt;BR /&gt;How can I configure Appdynamics with pm2 nodejs?&lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2017 10:41:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/Monitoring-Nodejs-with-pm2/m-p/721424#M2605</guid>
      <dc:creator>CommunityUser</dc:creator>
      <dc:date>2017-03-22T10:41:46Z</dc:date>
    </item>
    <item>
      <title>Re: Monitoring Nodejs with pm2</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/Monitoring-Nodejs-with-pm2/m-p/721425#M2606</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;If you want to use a process manager like PM2, you need to start the proxy manually.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;AppDynamics NodeJs agent talk to the controller via a proxy, there should be only one instance of proxy running. When you use a process manager like PM2. It may start multiple proxy which creates issue.&lt;/P&gt;

&lt;P&gt;Here is the documentation to start the proxy manually.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.appdynamics.com/display/PRO42/Run+the+Proxy+Daemon+Manually+for+Node.js+Agents" target="_blank" rel="nofollow noopener noreferrer"&gt;https://docs.appdynamics.com/display/PRO42/Run+the+Proxy+Daemon+Manually+for+Node.js+Agents&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2017 10:54:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/Monitoring-Nodejs-with-pm2/m-p/721425#M2606</guid>
      <dc:creator>Ayush_Ghosh</dc:creator>
      <dc:date>2017-03-22T10:54:42Z</dc:date>
    </item>
    <item>
      <title>Re: Monitoring Nodejs with pm2</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/Monitoring-Nodejs-with-pm2/m-p/721426#M2607</link>
      <description>&lt;P&gt;Hi, thaks.&lt;/P&gt;
&lt;P&gt;I followed your instructions but I always fail because I can not find the directory.&lt;BR /&gt;I have tried to create the directories tmp / appd / tmp / appd / logs and / tmp / appd / proxy_ctrl_dir&lt;/P&gt;

&lt;P&gt;I have execute:&lt;/P&gt;

&lt;P&gt;[nodejs@svtarqfrt1re proxy]$ ./runProxy -j /appsrv/LIBERBANK.PROYECTO/LBK_ARQ_SPA_SERVER/node_modules/appdynamics/node_modules/appdynamics-jre/jre - /tmp/appd/proxy_ctrl_dir /tmp/appd/logs/&lt;BR /&gt;Proxy communication directory, "-", does not exist or is not a directory.&lt;BR /&gt;Usage: runProxy options -- proxyCommunicationDir logDirectory [jvmOption [ jvmOption [...] ]&lt;BR /&gt;Options:&lt;BR /&gt;&amp;nbsp; -r &amp;lt;dir&amp;gt;, --proxy-runtime-dir=&amp;lt;dir&amp;gt;&amp;nbsp;&amp;nbsp; Specifies proxy runtime directory&lt;BR /&gt;&amp;nbsp; -d &amp;lt;dir&amp;gt;, --proxy-dir=&amp;lt;dir&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Specifies root proxy directory&lt;BR /&gt;&amp;nbsp; -j &amp;lt;dir&amp;gt;, --jre-dir=&amp;lt;dir&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Specifies root JRE directory&lt;BR /&gt;&amp;nbsp; -v, --verbose&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Enable verbose output&lt;BR /&gt;&amp;nbsp; -h,--help&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Show this message&lt;BR /&gt;&lt;BR /&gt;Example: ./runProxy -d ./proxy -r /tmp/appd/app1/tier1/node1 /tmp/proxy.communication /tmp/agentLogs&lt;BR /&gt;Note: Please use quotes for the entries wherever applicable.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;But always getting the following error&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;"Proxy communication directory," - ", does not exist or is not a directory."&lt;BR /&gt;Would be kind enough to show me some example.&lt;BR /&gt;Many thank&lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2017 12:10:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/Monitoring-Nodejs-with-pm2/m-p/721426#M2607</guid>
      <dc:creator>CommunityUser</dc:creator>
      <dc:date>2017-03-22T12:10:16Z</dc:date>
    </item>
    <item>
      <title>Re: Monitoring Nodejs with pm2</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/Monitoring-Nodejs-with-pm2/m-p/721427#M2608</link>
      <description>&lt;P&gt;Explaining a bit further.&lt;/P&gt;

&lt;P&gt;If the process manager spins up only 1 instance, it will work perfectly. As its same as just running application with node app.js.&lt;/P&gt;

&lt;P&gt;But if you&amp;nbsp;use of PM2 is to run multiple processes/instances, in which case there may be an&amp;nbsp;issue. As with each instance a new proxy could be spinned.&lt;/P&gt;

&lt;P&gt;Thus we suggest starting the proxy manually, and the steps are as follows&lt;/P&gt;

&lt;P&gt;Create two directories&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;/tmp/appd/proxy_ctrl_dir&lt;/STRONG&gt; &amp;amp;&amp;nbsp;&lt;STRONG&gt;/tmp/appd/logs&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;In Appdynamics config for NodeJS&lt;/P&gt;

&lt;P&gt;Set&amp;nbsp;&lt;STRONG&gt;proxyCtrlDir &lt;/STRONG&gt;as&lt;STRONG&gt;&amp;nbsp;&lt;SPAN&gt;/tmp/appd/proxy_ctrl_dir&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Set&amp;nbsp;&lt;STRONG&gt;proxyAutolaunchDisabled&lt;/STRONG&gt; as &lt;STRONG&gt;true&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Then start the proxy manually as described in the documentation&amp;nbsp;&lt;/P&gt;
&lt;DIV class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code"&gt;
&lt;DIV class="codeContent panelContent pdl"&gt;
&lt;DIV&gt;
&lt;DIV id="highlighter_616592" class="syntaxhighlighter sh-confluence nogutter  java"&gt;
&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="code"&gt;
&lt;DIV class="container" title="Hint: double-click to select code"&gt;
&lt;DIV class="line number1 index0 alt2"&gt;&lt;CODE class="java plain"&gt;nohup /&amp;lt;application_root_dir&amp;gt;/node_modules/appdynamics-proxy/proxy/runProxy -j /&amp;lt;application_root_dir&amp;gt;/node_modules/appdynamics-jre/jre – /tmp/appd/proxy_ctrl_dir /tmp/appd/logs &amp;amp;&amp;nbsp;&lt;/CODE&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;

&lt;P&gt;&lt;A href="https://docs.appdynamics.com/display/PRO42/Run+the+Proxy+Daemon+Manually+for+Node.js+Agents" target="_blank" rel="nofollow noopener noreferrer"&gt;https://docs.appdynamics.com/display/PRO42/Run+the+Proxy+Daemon+Manually+for+Node.js+Agents&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Then start the NodeJs application so that with any number of instance, there is only one proxy.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2017 05:23:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/Monitoring-Nodejs-with-pm2/m-p/721427#M2608</guid>
      <dc:creator>Ayush_Ghosh</dc:creator>
      <dc:date>2017-03-23T05:23:28Z</dc:date>
    </item>
    <item>
      <title>Re: Monitoring Nodejs with pm2</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/Monitoring-Nodejs-with-pm2/m-p/721428#M2609</link>
      <description>&lt;P&gt;sorry for delay. .&lt;/P&gt;
&lt;P&gt;I`ll summarize the actions&lt;/P&gt;
&lt;P&gt;I first&amp;nbsp; started correctly started manualy proxy&lt;/P&gt;
&lt;P&gt;second started pm2 -i 2 start server.js&lt;/P&gt;
&lt;P&gt;but no monitoring .&lt;/P&gt;
&lt;P&gt;Also be where to put&amp;nbsp; these options&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;P&gt;Configure each agent for manual launch of the proxy. In the &lt;SPAN&gt;AppDynamics require.profile() block&lt;/SPAN&gt; of each Node.js process, set &lt;STRONG&gt;proxyAutolaunchDisabled&lt;/STRONG&gt; to true and set the &lt;STRONG&gt;proxyCtrlDir&lt;/STRONG&gt; to the directory that you created. For example:&lt;/P&gt;
&lt;DIV class="preformatted panel conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="noformat"&gt;
&lt;DIV class="preformattedContent panelContent"&gt;
&lt;PRE&gt;...
proxyAutolaunchDisabled: true,
proxyCtrlDir: '/tmp/appd/proxy_ctrl_dir',
...&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;very best regards&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2017 15:05:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/Monitoring-Nodejs-with-pm2/m-p/721428#M2609</guid>
      <dc:creator>CommunityUser</dc:creator>
      <dc:date>2017-04-24T15:05:15Z</dc:date>
    </item>
    <item>
      <title>Re: Monitoring Nodejs with pm2</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/Monitoring-Nodejs-with-pm2/m-p/721429#M2610</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;In your node application you initiate the appdynamics profiler&amp;nbsp;like&lt;/P&gt;

&lt;PRE&gt;require("appdynamics").profile({
  controllerHostName: '&amp;lt;controller host name&amp;gt;',
  controllerPort: &amp;lt;controller port number&amp;gt;, 
  controllerSslEnabled: false,  // Set to true if controllerPort is SSL
  accountName: '&amp;lt;AppDynamics_account_name&amp;gt;',
  accountAccessKey: '&amp;lt;AppDynamics_account_key&amp;gt;', //required
  applicationName: 'your_app_name',
  tierName: 'choose_a_tier_name', 
  nodeName: 'choose_a_node_name', 
 });&lt;/PRE&gt;

&lt;P&gt;You need to add the&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proxyAutolaunchDisabled: true,
proxyCtrlDir: '/tmp/appd/proxy_ctrl_dir',&lt;/PRE&gt;

&lt;P&gt;to the same block.&lt;/P&gt;

&lt;P&gt;Please remember to start proxy first, and use the same file location for control and logs directory.&lt;/P&gt;


&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Ayush&lt;/P&gt;</description>
      <pubDate>Tue, 25 Apr 2017 09:51:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/Monitoring-Nodejs-with-pm2/m-p/721429#M2610</guid>
      <dc:creator>Ayush_Ghosh</dc:creator>
      <dc:date>2017-04-25T09:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: Monitoring Nodejs with pm2</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/Monitoring-Nodejs-with-pm2/m-p/721430#M2611</link>
      <description>&lt;P&gt;&lt;SPAN&gt;PM2 gained the most popularity and is now considered an enterprise standard. One of the most important thing is that It’s in active development, has a stable API and is constantly assailed by&amp;nbsp;more than 1000 tests.&amp;nbsp;&lt;/SPAN&gt;If you are interested in&amp;nbsp;monitoring &amp;amp; scaling Node.js&amp;nbsp;apps you should read&amp;nbsp;this article &lt;A href="https://www.netguru.co/codestories/monitoring-vertically-scaling-nodejs-applications" target="_self" rel="nofollow noopener noreferrer"&gt;https://www.netguru.co/codestories/monitoring-vertically-scaling-nodejs-applications&lt;/A&gt;. It's definitely worth it. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 May 2018 09:50:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/Monitoring-Nodejs-with-pm2/m-p/721430#M2611</guid>
      <dc:creator>CommunityUser</dc:creator>
      <dc:date>2018-05-30T09:50:29Z</dc:date>
    </item>
  </channel>
</rss>

