{"id":33417,"date":"2023-04-12T10:49:06","date_gmt":"2023-04-12T10:49:06","guid":{"rendered":"https:\/\/www.devopsschool.com\/blog\/?p=33417"},"modified":"2023-04-12T10:54:56","modified_gmt":"2023-04-12T10:54:56","slug":"newrelic-tutorials-newrelic-command-to-troubleshoot-agent","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/newrelic-tutorials-newrelic-command-to-troubleshoot-agent\/","title":{"rendered":"Newrelic Tutorials: Newrelic command to troubleshoot Agent"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">General Commands<\/h2>\n\n\n\n<p>New Relic is a tool used for application performance monitoring. To troubleshoot an agent in New Relic, there are several commands you can use depending on the issue you are facing. Here are some important New Relic commands that can help troubleshoot an agent:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><code>newrelic-admin<\/code> &#8211; This command is used to manage the New Relic agent. You can use this command to start or stop the agent, generate a diagnostic report, or get the agent&#8217;s status.<\/li>\n\n\n\n<li><code>newrelic-daemon<\/code> &#8211; This command is used to start the New Relic daemon. The daemon is responsible for collecting data from the agent and sending it to the New Relic servers.<\/li>\n\n\n\n<li><code>newrelic-diag<\/code> &#8211; This command is used to generate a diagnostic report for the New Relic agent. This report contains information about the agent&#8217;s configuration, logs, and performance.<\/li>\n\n\n\n<li><code>newrelic-config<\/code> &#8211; This command is used to manage the agent&#8217;s configuration. You can use this command to view or modify the agent&#8217;s configuration settings.<\/li>\n\n\n\n<li><code>newrelic-nrsysmond<\/code> &#8211; This command is used to start the New Relic system monitor daemon. This daemon is used to collect system metrics like CPU usage, memory usage, and disk space.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">List of NewRelic Command to work with integration<\/h2>\n\n\n\n<p>New Relic provides several commands that you can use to work with integrations. Here are some of the most commonly used New Relic commands for integration, along with examples:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><code>newrelic integrations:list<\/code> &#8211; This command lists all the available integrations in your New Relic account. Example: <code>newrelic integrations:list<\/code><\/li>\n\n\n\n<li><code>newrelic integrations:install<\/code> &#8211; This command installs a specific integration. You will need to provide the integration name and any necessary configuration options. Example: <code>newrelic integrations:install nri-redis -c config.yml<\/code><\/li>\n\n\n\n<li><code>newrelic integrations:update<\/code> &#8211; This command updates an existing integration. You will need to provide the integration name and any necessary configuration options. Example: <code>newrelic integrations:update nri-redis -c config.yml<\/code><\/li>\n\n\n\n<li><code>newrelic integrations:uninstall<\/code> &#8211; This command uninstalls a specific integration. You will need to provide the integration name. Example: <code>newrelic integrations:uninstall nri-redis<\/code><\/li>\n\n\n\n<li><code>newrelic integrations:enable<\/code> &#8211; This command enables an installed integration. You will need to provide the integration name. Example: <code>newrelic integrations:enable nri-redis<\/code><\/li>\n\n\n\n<li><code>newrelic integrations:disable<\/code> &#8211; This command disables an installed integration. You will need to provide the integration name. Example: <code>newrelic integrations:disable nri-redis<\/code><\/li>\n\n\n\n<li><code>newrelic integrations:status<\/code> &#8211; This command shows the status of an installed integration. You will need to provide the integration name. Example: <code>newrelic integrations:status nri-redis<\/code><\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">List of example of newrelic-infra-ctl<\/h2>\n\n\n\n<p><code>newrelic-infra-ctl<\/code> is a command-line tool for managing New Relic Infrastructure. Here are some examples of how to use <code>newrelic-infra-ctl<\/code>:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><code>newrelic-infra-ctl status<\/code> &#8211; This command shows the current status of the New Relic Infrastructure agent.<\/li>\n\n\n\n<li><code>newrelic-infra-ctl install<\/code> &#8211; This command installs the New Relic Infrastructure agent.<\/li>\n\n\n\n<li><code>newrelic-infra-ctl uninstall<\/code> &#8211; This command uninstalls the New Relic Infrastructure agent.<\/li>\n\n\n\n<li><code>newrelic-infra-ctl restart<\/code> &#8211; This command restarts the New Relic Infrastructure agent.<\/li>\n\n\n\n<li><code>newrelic-infra-ctl config validate<\/code> &#8211; This command validates the configuration file for the New Relic Infrastructure agent.<\/li>\n\n\n\n<li><code>newrelic-infra-ctl logs<\/code> &#8211; This command shows the logs for the New Relic Infrastructure agent.<\/li>\n\n\n\n<li><code>newrelic-infra-ctl integrations list<\/code> &#8211; This command lists all the available integrations for the New Relic Infrastructure agent.<\/li>\n\n\n\n<li><code>newrelic-infra-ctl integrations enable<\/code> &#8211; This command enables a specific integration for the New Relic Infrastructure agent.<\/li>\n\n\n\n<li><code>newrelic-infra-ctl integrations disable<\/code> &#8211; This command disables a specific integration for the New Relic Infrastructure agent.<\/li>\n\n\n\n<li><code>newrelic-infra-ctl integrations update<\/code> &#8211; This command updates a specific integration for the New Relic Infrastructure agent.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">newrelic command line<\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">The <span class=\"hljs-keyword\">New<\/span> Relic CLI enables users to perform tasks against the <span class=\"hljs-keyword\">New<\/span> Relic APIs\r\n\r\nUsage:\r\n  newrelic &#91;command]\r\n\r\nAvailable Commands:\r\n  agent         Utilities <span class=\"hljs-keyword\">for<\/span> <span class=\"hljs-keyword\">New<\/span> Relic Agents\r\n  apiAccess     Manage <span class=\"hljs-keyword\">New<\/span> Relic API access keys\r\n  apm           Interact with <span class=\"hljs-keyword\">New<\/span> Relic APM\r\n  completion    Generate completion script\r\n  config        Manage the configuration of the <span class=\"hljs-keyword\">New<\/span> Relic CLI\r\n  decode        Decodes NR1 URL Strings\r\n  diagnose      Troubleshoot your <span class=\"hljs-keyword\">New<\/span> Relic installation\r\n  documentation Generate CLI documentation\r\n  edge          Interact with <span class=\"hljs-keyword\">New<\/span> Relic Edge\r\n  entity        Interact with <span class=\"hljs-keyword\">New<\/span> Relic entities\r\n  events        Send custom events to <span class=\"hljs-keyword\">New<\/span> Relic\r\n  help          Help about any command\r\n  install       Install <span class=\"hljs-keyword\">New<\/span> Relic.\r\n  nerdgraph     Execute GraphQL requests to the NerdGraph API\r\n  nerdstorage   Read, write, <span class=\"hljs-keyword\">and<\/span> delete NerdStorage documents <span class=\"hljs-keyword\">and<\/span> collections.\r\n  nrql          Commands <span class=\"hljs-keyword\">for<\/span> interacting with the <span class=\"hljs-keyword\">New<\/span> Relic Database\r\n  profile       Manage the authentication profiles <span class=\"hljs-keyword\">for<\/span> this tool\r\n  reporting     Commands <span class=\"hljs-keyword\">for<\/span> reporting data into <span class=\"hljs-keyword\">New<\/span> Relic\r\n  synthetics    Interact with <span class=\"hljs-keyword\">New<\/span> Relic Synthetics\r\n  utils         Various utility methods\r\n  version       Show the version of the <span class=\"hljs-keyword\">New<\/span> Relic CLI\r\n  workload      Interact with <span class=\"hljs-keyword\">New<\/span> Relic One workloads\r\n\r\nFlags:\r\n  -a, --accountId int    the account ID to <span class=\"hljs-keyword\">use<\/span>. <span class=\"hljs-title\">Can<\/span> <span class=\"hljs-title\">be<\/span> <span class=\"hljs-title\">overridden<\/span> <span class=\"hljs-title\">by<\/span> <span class=\"hljs-title\">setting<\/span> <span class=\"hljs-title\">NEW_RELIC_ACCOUNT_ID<\/span>\r\n      --<span class=\"hljs-title\">debug<\/span>            <span class=\"hljs-title\">debug<\/span> <span class=\"hljs-title\">level<\/span> <span class=\"hljs-title\">logging<\/span>\r\n      --<span class=\"hljs-title\">format<\/span> <span class=\"hljs-title\">string<\/span>    <span class=\"hljs-title\">output<\/span> <span class=\"hljs-title\">text<\/span> <span class=\"hljs-title\">format<\/span> &#91;<span class=\"hljs-title\">JSON<\/span>, <span class=\"hljs-title\">Text<\/span>, <span class=\"hljs-title\">YAML<\/span>] (<span class=\"hljs-title\">default<\/span> \"<span class=\"hljs-title\">JSON<\/span>\")\r\n  -<span class=\"hljs-title\">h<\/span>, --<span class=\"hljs-title\">help<\/span>             <span class=\"hljs-title\">help<\/span> <span class=\"hljs-title\">for<\/span> <span class=\"hljs-title\">newrelic<\/span>\r\n      --<span class=\"hljs-title\">plain<\/span>            <span class=\"hljs-title\">output<\/span> <span class=\"hljs-title\">compact<\/span> <span class=\"hljs-title\">text<\/span>\r\n      --<span class=\"hljs-title\">profile<\/span> <span class=\"hljs-title\">string<\/span>   <span class=\"hljs-title\">the<\/span> <span class=\"hljs-title\">authentication<\/span> <span class=\"hljs-title\">profile<\/span> <span class=\"hljs-title\">to<\/span> <span class=\"hljs-title\">use<\/span>\r\n      --<span class=\"hljs-title\">trace<\/span>            <span class=\"hljs-title\">trace<\/span> <span class=\"hljs-title\">level<\/span> <span class=\"hljs-title\">logging<\/span>\r\n  -<span class=\"hljs-title\">v<\/span>, --<span class=\"hljs-title\">version<\/span>          <span class=\"hljs-title\">version<\/span> <span class=\"hljs-title\">for<\/span> <span class=\"hljs-title\">newrelic<\/span>\r\n\r\n<span class=\"hljs-title\">Use<\/span> \"<span class=\"hljs-title\">newrelic<\/span> &#91;<span class=\"hljs-title\">command<\/span>] --<span class=\"hljs-title\">help<\/span>\" <span class=\"hljs-title\">for<\/span> <span class=\"hljs-title\">more<\/span> <span class=\"hljs-title\">information<\/span> <span class=\"hljs-title\">about<\/span> <span class=\"hljs-title\">a<\/span> <span class=\"hljs-title\">command<\/span>.<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>","protected":false},"excerpt":{"rendered":"<p>General Commands New Relic is a tool used for application performance monitoring. To troubleshoot an agent in New Relic, there are several commands you can use depending on the issue&#8230; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[2],"tags":[],"class_list":["post-33417","post","type-post","status-publish","format-standard","hentry","category-uncategorised"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/33417","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=33417"}],"version-history":[{"count":5,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/33417\/revisions"}],"predecessor-version":[{"id":33423,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/33417\/revisions\/33423"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=33417"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=33417"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=33417"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}