{"componentChunkName":"component---src-components-mark-down-block-js","path":"/docs/examples-use-cases/","result":{"data":{"markdownRemark":{"html":"<h2 id=\"further-examples\" style=\"position:relative;\"><a href=\"#further-examples\" aria-label=\"further examples 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>Further Examples</h2>\n<p>These examples provide details for most of the <a href=\"/docs/what-do-with-scope#use-cases\">use cases</a> introduced earlier.</p>\n<h4 id=\"viewing-browser-results-in-a-dashboard\" style=\"position:relative;\"><a href=\"#viewing-browser-results-in-a-dashboard\" aria-label=\"viewing browser results in a dashboard 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>Viewing Browser Results in a Dashboard</h4>\n<p>Run Firefox from the AppScope CLI, and view results on a terminal-based dashboard:</p>\n<pre><code>scope firefox\nscope dash\n</code></pre>\n<h4 id=\"sending-metrics-to-datadog\" style=\"position:relative;\"><a href=\"#sending-metrics-to-datadog\" aria-label=\"sending metrics to datadog 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>Sending Metrics to Datadog</h4>\n<ol>\n<li>Send default metrics from the Go static application <code>hello</code> to the Datadog server at <code>ddog</code>:</li>\n</ol>\n<pre><code>scope run -m udp://ddog:8125\n</code></pre>\n<ol start=\"2\">\n<li>Send metrics from nginx to Datadog at <code>ddoghost</code>, using an environment variable and all other defaults:</li>\n</ol>\n<pre><code>LD_PRELOAD=/opt/appscope/libscope.so SCOPE_METRIC_DEST=udp://ddoghost:8125 nginx \n</code></pre>\n<h4 id=\"sending-events-from-curl\" style=\"position:relative;\"><a href=\"#sending-events-from-curl\" aria-label=\"sending events from curl 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>Sending Events from cURL</h4>\n<ol>\n<li>Send DNS events from cURL to the default host. This example uses the library in the current directory, independently of the CLI:</li>\n</ol>\n<pre><code>SCOPE_EVENT_DNS=true LD_PRELOAD=./libscope.so curl https://cribl.io\n</code></pre>\n<ol start=\"2\">\n<li>Send configured events from cURL to the server <code>myHost.example.com</code> on port 9000, using the config file at <code>/opt/appscope/scope.yml</code>:</li>\n</ol>\n<pre><code>scope run -u /opt/appscope/scope.yml -- curl https://cribl.io\n</code></pre>\n<p>Example config file:</p>\n<pre><code>event:\n  enable: true\n  transport:\n    type: tcp\n    host: myHost.example.com\n    port: 9000\n</code></pre>\n<h4 id=\"sending-http-events-to-splunk\" style=\"position:relative;\"><a href=\"#sending-http-events-to-splunk\" aria-label=\"sending http events to splunk 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>Sending HTTP Events to Splunk</h4>\n<p>Send HTTP events from Slack to a Splunk server at <code>myHost.example.com</code>:</p>\n<pre><code>scope run --passthrough -- slack\n</code></pre>\n<p>Example config file:</p>\n<pre><code>event:\n  enable: true\n  transport:\n    type: tcp\n    host: myHost.example.com\n    port: 8083\n...\n  watch:\n    - type: http\n      name: .*\n      field: .*\n      value: .*\n</code></pre>","frontmatter":{"title":"Further Examples"}}},"pageContext":{"slug":"/examples-use-cases/","id":"6b9021b6-2a15-5c31-ae3a-9f571056c6aa"}},"staticQueryHashes":["2787008656","306729481","625673991","640077088"]}