<?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: How to add data from an external API files? in Deployment Architecture</title>
    <link>https://community.splunk.com/t5/Deployment-Architecture/How-to-add-data-from-an-external-API-files/m-p/585933#M25277</link>
    <description>&lt;P&gt;Thank you very much&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;. I really appreciate it your help.&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 21 Feb 2022 15:23:01 GMT</pubDate>
    <dc:creator>maha110192</dc:creator>
    <dc:date>2022-02-21T15:23:01Z</dc:date>
    <item>
      <title>How to add data from an external API files?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-to-add-data-from-an-external-API-files/m-p/585849#M25271</link>
      <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;Hello splunkies!&lt;/P&gt;&lt;P&gt;I'm trying to be and admin and I'm trying to add data manually to my inputs.conf,&amp;nbsp; please see my scenario:&lt;/P&gt;&lt;P&gt;path:&amp;nbsp;/logfiles/syslog/log.txt&lt;/P&gt;&lt;P&gt;The output from a script that contacts an internal REST API. There are two kinds of requests in this file:&lt;/P&gt;&lt;P class=""&gt;1 . &lt;A href="http://localhost:8080/api/requests/xTraining.json" target="_blank" rel="noopener"&gt;http://localhost:8080/api/requests/xTraining.json&lt;/A&gt; &lt;SPAN class=""&gt;API shows data&amp;nbsp;&lt;/SPAN&gt;from the non-production host and should be written to&lt;/P&gt;&lt;P class=""&gt;Index = API-NPTraining&lt;/P&gt;&lt;P class=""&gt;2. &lt;A href="http://localhost:8080/api/requests/Training.json" target="_blank" rel="noopener"&gt;http://localhost:8080/api/requests/Training.json&lt;/A&gt; &lt;SPAN class=""&gt;api shows data&amp;nbsp;&lt;/SPAN&gt;from the production host and should be written to&lt;/P&gt;&lt;P class=""&gt;index = API-PTraining&lt;/P&gt;&lt;P class=""&gt;Both should use sourcetype ss:training&lt;/P&gt;&lt;P class=""&gt;Data in this file will rotate daily to log.txt.1020, log.txt.1021...etc&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;I have my stanzas like this&lt;/P&gt;&lt;P class=""&gt;#first stanza&lt;/P&gt;&lt;P class=""&gt;[monitor:///logfiles/syslog/log*.txt]&lt;/P&gt;&lt;P class=""&gt;disabled = 0&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;host =&amp;nbsp;&lt;A href="http://localhost:8080/api/requests/xTraining.json" target="_blank" rel="noopener"&gt;http://localhost:8080/api/requests/xTraining.json&lt;/A&gt;&lt;/P&gt;&lt;P class=""&gt;index =&amp;nbsp;API-NPTraining&lt;/P&gt;&lt;P class=""&gt;sourcetype = ss:training&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;# second Stanza&lt;/P&gt;&lt;P class=""&gt;[monitor:///logfiles/syslog/log*.txt]&lt;/P&gt;&lt;P class=""&gt;disabled = 0&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;host =&amp;nbsp;&lt;A href="http://localhost:8080/api/requests/xTraining.json" target="_blank" rel="noopener"&gt;http://localhost:8080/api/requests/Training.json&lt;/A&gt;&lt;/P&gt;&lt;P class=""&gt;index =&amp;nbsp;API-PTraining&lt;/P&gt;&lt;P class=""&gt;sourcetype = ss:training&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;What am I missing?&amp;nbsp; Am I wrong in something?&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;thank you.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sun, 20 Feb 2022 02:42:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-to-add-data-from-an-external-API-files/m-p/585849#M25271</guid>
      <dc:creator>maha110192</dc:creator>
      <dc:date>2022-02-20T02:42:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to add data from an external API files?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-to-add-data-from-an-external-API-files/m-p/585858#M25272</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/243108"&gt;@maha110192&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;there an error:&lt;/P&gt;&lt;P&gt;path file name is&amp;nbsp;&lt;SPAN&gt;/logfiles/syslog/log.txt, so in the monitor stanza you have to put&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[monitor:///logfiles/syslog/log.txt]&lt;/LI-CODE&gt;&lt;P&gt;in this way you don't take the rotated files but only the first file.&lt;/P&gt;&lt;P&gt;if you want to take also the rotated files (that aren't indexed twice also changine filename), you have to use a different monitor stanza&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[monitor:///logfiles/syslog/log.txt.*]&lt;/LI-CODE&gt;&lt;P&gt;using your monitor stanza you take only the first file, not the others.&lt;/P&gt;&lt;P&gt;In addition I don't like a so long string, with special chars for hostname: it's very difficoult to use in searches.&lt;/P&gt;&lt;P&gt;At least, you have to use different indexes between production and not production logs only if they have diferent retention and/or different access rights, otherwise you could put them in the same index, recognizing them by host.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Sun, 20 Feb 2022 09:17:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-to-add-data-from-an-external-API-files/m-p/585858#M25272</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-02-20T09:17:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to add data from an external API files?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-to-add-data-from-an-external-API-files/m-p/585872#M25273</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Thank you for helping me. I can see my mistake. Also, I have different rights for prod, non-prod. So, I need to keep both.&lt;/P&gt;&lt;P&gt;Regarding the long host string,&amp;nbsp; Can I just put in this way?&lt;/P&gt;&lt;P&gt;host = /api/request/xTraining.json&lt;/P&gt;&lt;P&gt;or still being so long?&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Feb 2022 19:26:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-to-add-data-from-an-external-API-files/m-p/585872#M25273</guid>
      <dc:creator>maha110192</dc:creator>
      <dc:date>2022-02-20T19:26:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to add data from an external API files?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-to-add-data-from-an-external-API-files/m-p/585886#M25274</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/243108"&gt;@maha110192&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;ok for your need.&lt;/P&gt;&lt;P&gt;About the host value, I hint to avoid special chars as "/", usually host is the hostname of the server (using the usual convention for your servers) or&amp;nbsp; a name as "Production_Server" or something similar.&lt;/P&gt;&lt;P&gt;If this answer soves your request, please accept it for the other people of Community or tell me how I can help you.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Feb 2022 06:31:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-to-add-data-from-an-external-API-files/m-p/585886#M25274</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-02-21T06:31:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to add data from an external API files?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-to-add-data-from-an-external-API-files/m-p/585892#M25275</link>
      <description>&lt;P&gt;Hello Giuseppe,&lt;/P&gt;&lt;P&gt;I agree with you about the host name. But I’m worried that I’m missing this part of the exercise:&lt;/P&gt;&lt;P&gt;“The output from a script that contacts an internal REST API. There are two kinds of requests in this file:&lt;/P&gt;&lt;P class=""&gt;1 . &lt;A href="http://localhost:8080/api/requests/xTraining.json" target="_blank" rel="noopener nofollow noreferrer"&gt;http://localhost:8080/api/requests/xTraining.json&lt;/A&gt; &lt;SPAN class=""&gt;API shows data&amp;nbsp;&lt;/SPAN&gt;from the non-production host“&lt;/P&gt;&lt;P class=""&gt;I don’t know if I am referring well to this APIs or if I need to add something else. Or if have to create an output.conf&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P class=""&gt;can you help me to clarify the situation here?&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;thanks in advance,&lt;/P&gt;&lt;P class=""&gt;and for sure those karma points are yours. &lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;&lt;/P&gt;&lt;P class=""&gt;thanks,&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Feb 2022 08:34:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-to-add-data-from-an-external-API-files/m-p/585892#M25275</guid>
      <dc:creator>maha110192</dc:creator>
      <dc:date>2022-02-21T08:34:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to add data from an external API files?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-to-add-data-from-an-external-API-files/m-p/585921#M25276</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/243108"&gt;@maha110192&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;outputs.conf is to send data to an indexer not for API configuration.&lt;/P&gt;&lt;P&gt;About the hostname, even if I don't like it, follow the test instructions.&lt;/P&gt;&lt;P&gt;I am not an expert in APIs, but I think that&amp;nbsp;&lt;SPAN&gt;you have to refer well to this APIs.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 21 Feb 2022 12:57:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-to-add-data-from-an-external-API-files/m-p/585921#M25276</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-02-21T12:57:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to add data from an external API files?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-to-add-data-from-an-external-API-files/m-p/585933#M25277</link>
      <description>&lt;P&gt;Thank you very much&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;. I really appreciate it your help.&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Feb 2022 15:23:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-to-add-data-from-an-external-API-files/m-p/585933#M25277</guid>
      <dc:creator>maha110192</dc:creator>
      <dc:date>2022-02-21T15:23:01Z</dc:date>
    </item>
  </channel>
</rss>

