{"componentChunkName":"component---src-components-mark-down-block-js","path":"/docs/cribl-integration/","result":{"data":{"markdownRemark":{"html":"<h1 id=\"integrating-with-cribl\" style=\"position:relative;\"><a href=\"#integrating-with-cribl\" aria-label=\"integrating with cribl permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Integrating with Cribl</h1>\n<p>By default, AppScope is configured to connect to an instance of Cribl Edge (<a href=\"https://docs.cribl.io/edge/\">docs</a>) running on the same host. Cribl Edge, in turn, connects to Cribl Stream over the network. This arrangement can support scaling to large numbers of scoped processes.</p>\n<p>AppScope can also easily connect to Cribl Stream (<a href=\"https://cribl.io/product/\">overview</a> | <a href=\"https://cribl.cloud/\">cloud</a> | <a href=\"https://cribl.io/download/\">download</a> | <a href=\"https://docs.cribl.io/docs/welcome\">docs</a>) directly.</p>\n<h2 id=\"integrating-with-cribl-edge\" style=\"position:relative;\"><a href=\"#integrating-with-cribl-edge\" aria-label=\"integrating with cribl edge permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Integrating with Cribl Edge</h2>\n<p>AppScope will connect with Cribl Edge when the <code>cribl</code> backend is enabled with the <code>edge</code> transport type. These are default settings for the AppScope library, which is <a href=\"/docs/working-with\">best suited</a> for the kinds of longer-running, planned monitoring procedures that tend to scale, and where the AppScope-Cribl Edge combination excels. </p>\n<p>The CLI, by contrast, writes to the local filesystem by default; and the CLI is best suited for ad hoc exploration that's less likely to scale to large numbers of scoped processes.</p>\n<p>To define a connection to Cribl Edge with the AppScope library, just set the <code>SCOPE_CRIBL</code> environment variable to <code>edge</code>. </p>\n<p>For example:</p>\n<pre><code>LD_PRELOAD=./libscope.so SCOPE_CRIBL=edge ls -al\n</code></pre>\n<h3 id=\"scaling-scoped-processes\" style=\"position:relative;\"><a href=\"#scaling-scoped-processes\" aria-label=\"scaling scoped processes permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Scaling to Many Scoped Processes</h3>\n<p>The number of scoped processes can become very high in two kinds of situations:</p>\n<ol>\n<li>Where the application that one instance of AppScope is monitoring spawns a large number of processes - for example, scoping a build process; and,</li>\n<li>Where many instances of AppScope are monitoring many instances of an application in a distributed architecture - for example, monitoring Apache in a server farm.</li>\n</ol>\n<p>In either case, it can help when AppScope connects to Cribl Edge on the same host, and Cribl Edge then connects to Cribl Stream over the network.</p>\n<p>To understand why this is, consider these facts: </p>\n<ul>\n<li>Within the same host, AppScope connects to Cribl Edge over unix sockets. </li>\n<li>The number of sockets is only limited by number of processes that the host can support. </li>\n<li>Then, Cribl Edge only requires a <strong>single network connection</strong> to send all of the data on to Cribl Stream.</li>\n</ul>\n<p>This results in dramatically lower numbers of network connections needed than if AppScope connected to Cribl Stream over the network without Cribl Edge as a proxy. Each network connection requires a port, and a large number of connections could exhaust the supply of ports available on the Cribl Stream host.</p>\n<p>Sending data through Cribl Edge has other benefits: Cribl Edge is capable of filtering, aggregating, and reducing data in the same manner as Cribl Stream, and it can be efficient to perform these operations on the data before sending it over the wire. </p>\n<h2 id=\"integrating-with-cribl-stream\" style=\"position:relative;\"><a href=\"#integrating-with-cribl-stream\" aria-label=\"integrating with cribl stream permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Integrating with Cribl Stream</h2>\n<p>To define a TLS-encrypted connection to Cribl Stream on Cribl.Cloud, just set the <code>SCOPE_CRIBL_CLOUD</code> environment variable, specifying a transport type, a host name or IPv4 address, and a port number. </p>\n<p>For example:</p>\n<pre><code>SCOPE_CRIBL_CLOUD=tcp://in.main-default-&#x3C;organization>.cribl.cloud:10090\n</code></pre>\n<p>By default, Cribl.Cloud-managed instances of Cribl Stream have port <code>10090</code> configured to use <a href=\"/docs/tls\">TLS</a> over TCP, and a built-in AppScope Source to receive data from AppScope. You can change the <a href=\"https://docs.cribl.io/docs/sources-appscope\">AppScope Source configuration</a>, or create additional AppScope Sources, as needed.</p>\n<p>This is the easiest way to integrate AppScope with Cribl Stream. It is also possible to connect to Cribl Stream on Cribl.Cloud <a href=\"#cloud-unencrypted\">unencrypted</a>; or, to Cribl Stream <a href=\"#on-prem\">on-prem</a>, encrypted or not.</p>\n<h3 id=\"parameter-overrides\" style=\"position:relative;\"><a href=\"#parameter-overrides\" aria-label=\"parameter overrides permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Parameter Overrides</h3>\n<p>When AppScope establishes a Cribl Stream connection, this sets several AppScope configuration parameters, some of which override settings in any configuration file or environment variable.</p>\n<p>These overrides include: </p>\n<ul>\n<li>Metrics format is set to <code>ndjson</code>.</li>\n<li>Transport for events, metrics, and payloads use the Cribl Stream connection.</li>\n<li>Log level, is set to <code>warning</code> if originally configured as <code>error</code> or <code>none</code>.</li>\n</ul>\n<p>Any configuration override is logged to AppScope's default log file.</p>\n<p>If you have events or metrics enabled (or disabled), they retain this setting. (Before v.1.0.0, both would be set to enabled, as an override). You still have control via environment variables or the config file.</p>\n<p>When the <strong>payloads</strong> feature is enabled, setting <code>SCOPE_PAYLOAD_TO_DISK</code> to <code>true</code> guarantees that AppScope will write payloads to the local directory specified in <code>SCOPE_PAYLOAD_DIR</code>. The <code>payload</code> <a href=\"/docs/schema-reference/#eventstartmsginfoconfigurationcurrentpayload\">field</a> in the process-start message records whether the feature is enabled or not, and if enabled, the directory to which it will write payloads.</p>\n<p><span id=\"cloud-unencrypted\"> </span></p>\n<h3 id=\"connecting-to-cribl-stream-on-criblcloud-unencrypted\" style=\"position:relative;\"><a href=\"#connecting-to-cribl-stream-on-criblcloud-unencrypted\" aria-label=\"connecting to cribl stream on criblcloud unencrypted permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Connecting to Cribl Stream on Cribl.Cloud, Unencrypted</h3>\n<p>To define an <strong>unencrypted</strong> connection to a Cribl.Cloud-managed instance of Cribl Stream, set the <code>SCOPE_CRIBL</code> environment variable (<strong>not</strong> <code>SCOPE_CRIBL_CLOUD</code>) and specify port <code>10091</code>.</p>\n<p>For example:</p>\n<pre><code>SCOPE_CRIBL=tcp://in.main-default-&#x3C;organization>.cribl.cloud:10091\n</code></pre>\n<p><span id=\"on-prem\"> </span></p>\n<h3 id=\"connecting-to-cribl-stream-on-prem\" style=\"position:relative;\"><a href=\"#connecting-to-cribl-stream-on-prem\" aria-label=\"connecting to cribl stream on prem permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Connecting to Cribl Stream On-Prem</h3>\n<p>An on-prem instance of Cribl Stream has an AppScope Source built in. However, by default: </p>\n<ul>\n<li>The Source itself is disabled. </li>\n<li>The Source listens on port 10090.</li>\n<li>On the Source, TLS is disabled by default.</li>\n</ul>\n<p>To connect from AppScope, you'll need to <a href=\"https://docs.cribl.io/stream/sources-appscope\">configure</a> the AppScope Source in Cribl Stream. This includes\nenabling the Source; configuring it to listen on the desired port; and, enabling and configuring TLS if desired.</p>\n<p>Then, to define a connection to the on-prem Cribl Stream instance, set <code>SCOPE_CRIBL</code>.  </p>\n<p>For example:</p>\n<pre><code>SCOPE_CRIBL=tcp://127.0.0.1:10090\n</code></pre>","frontmatter":{"title":"Integrating with Cribl"}}},"pageContext":{"slug":"/cribl-integration/","id":"02c5b33d-18ec-5e17-9852-f1cb1bab750c"}},"staticQueryHashes":["2787008656","306729481","625673991","640077088"]}