<?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: Is it possible to use the HTTP Event Collector with Morgan? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-use-the-HTTP-Event-Collector-with-Morgan/m-p/345692#M63508</link>
    <description>&lt;P&gt;Morgan should have the ability to pass token to a http endpoint based on the documentation Ive read. &lt;/P&gt;

&lt;P&gt;Check out the HEC docs if you havent: &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Data/UsetheHTTPEventCollector"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Data/UsetheHTTPEventCollector&lt;/A&gt; . Additionally, check out the HEC docs on dev : &lt;A href="http://dev.splunk.com/view/event-collector/SP-CAAAE6M"&gt;http://dev.splunk.com/view/event-collector/SP-CAAAE6M&lt;/A&gt; &lt;/P&gt;

&lt;P&gt;Let us know your results!&lt;/P&gt;</description>
    <pubDate>Wed, 14 Jun 2017 05:48:43 GMT</pubDate>
    <dc:creator>esix_splunk</dc:creator>
    <dc:date>2017-06-14T05:48:43Z</dc:date>
    <item>
      <title>Is it possible to use the HTTP Event Collector with Morgan?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-use-the-HTTP-Event-Collector-with-Morgan/m-p/345691#M63507</link>
      <description>&lt;P&gt;In my Node.js(Express) Application I use Morgan as the logging library. Can we pass the logs to an Splunk Enterprise server using a HEC?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2017 04:51:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-use-the-HTTP-Event-Collector-with-Morgan/m-p/345691#M63507</guid>
      <dc:creator>tper1992</dc:creator>
      <dc:date>2017-06-14T04:51:24Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to use the HTTP Event Collector with Morgan?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-use-the-HTTP-Event-Collector-with-Morgan/m-p/345692#M63508</link>
      <description>&lt;P&gt;Morgan should have the ability to pass token to a http endpoint based on the documentation Ive read. &lt;/P&gt;

&lt;P&gt;Check out the HEC docs if you havent: &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Data/UsetheHTTPEventCollector"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Data/UsetheHTTPEventCollector&lt;/A&gt; . Additionally, check out the HEC docs on dev : &lt;A href="http://dev.splunk.com/view/event-collector/SP-CAAAE6M"&gt;http://dev.splunk.com/view/event-collector/SP-CAAAE6M&lt;/A&gt; &lt;/P&gt;

&lt;P&gt;Let us know your results!&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2017 05:48:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-use-the-HTTP-Event-Collector-with-Morgan/m-p/345692#M63508</guid>
      <dc:creator>esix_splunk</dc:creator>
      <dc:date>2017-06-14T05:48:43Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to use the HTTP Event Collector with Morgan?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-use-the-HTTP-Event-Collector-with-Morgan/m-p/345693#M63509</link>
      <description>&lt;P&gt;Thanks. &lt;/P&gt;

&lt;P&gt;Those documentation does not contain anything related to Morgan. But we can easily create a Splunk Logger object and pass it as the output for the Morgan. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;var MorganLogger = morgan({
  "format": "dev",
  "stream": {
    write: function(message) {
      var payload = {
        message
      };
      SplunkLogger.send(payload); }
  }
});

const app: express.Application = express();
+app.use(MorganLogger);
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 14 Jun 2017 06:49:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-use-the-HTTP-Event-Collector-with-Morgan/m-p/345693#M63509</guid>
      <dc:creator>tper1992</dc:creator>
      <dc:date>2017-06-14T06:49:37Z</dc:date>
    </item>
  </channel>
</rss>

