<?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: Splunk Universal forwarder should forward the data to a specific index of Splunk Indexer in Installation</title>
    <link>https://community.splunk.com/t5/Installation/Splunk-Universal-forwarder-should-forward-the-data-to-a-specific/m-p/681925#M13758</link>
    <description>&lt;P&gt;Are you able to check which process is using the inputs.conf file with lsof?&lt;BR /&gt;You may need to stop Splunk, update the file, then start Splunk again.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 26 Mar 2024 00:28:49 GMT</pubDate>
    <dc:creator>KendallW</dc:creator>
    <dc:date>2024-03-26T00:28:49Z</dc:date>
    <item>
      <title>Splunk Universal forwarder should forward the data to a specific index of Splunk Indexer</title>
      <link>https://community.splunk.com/t5/Installation/Splunk-Universal-forwarder-should-forward-the-data-to-a-specific/m-p/681091#M13742</link>
      <description>&lt;P&gt;HI All, I want to forward the log data using Splunk Universal forwarder to a specific index of Splunk Indexer.&lt;BR /&gt;I am running UF and Splunk Indexer inside a docker container.&lt;BR /&gt;&lt;BR /&gt;I am able to achieve this by modifying the inputs.conf file of UF after the container is started.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[monitor::///app/logs]
index = logs_data&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But, after making this change, I have to RESTART my UF container.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I want to ensure when my UF starts, it should send the data to "logs_data" index by default (assuming this index is present in the Splunk Indexer)&lt;BR /&gt;&lt;BR /&gt;I tried overriding the default inputs.conf by mounting the locally created inputs.conf to its location&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;Below is the snippet of how I am creating the UF container&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;  splunkforwarder:
    image: splunk/universalforwarder:8.0
    hostname: splunkforwarder
    environment:
      - SPLUNK_START_ARGS=--accept-license --answer-yes
      - SPLUNK_STANDALONE_URL=splunk:9997
      - SPLUNK_ADD=monitor /app/logs
      - SPLUNK_PASSWORD=password
    restart: always
    depends_on:
      splunk:
        condition: service_healthy
    volumes:
      - ./inputs.conf:/opt/splunkforwarder/etc/system/local/inputs.conf&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But, I am getting some weird error while container is trying to start.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;An exception occurred during task execution. To see the full traceback, use -vvv. The error was: OSError: [Errno 16] Device or resource busy: b'/opt/splunkforwarder/etc/system/local/.ansible_tmpnskbxfddinputs.conf' -&amp;gt; b'/opt/splunkforwarder/etc/system/local/inputs.conf'
fatal: [localhost]: FAILED! =&amp;gt; {
    "changed": false
}

MSG:

Unable to make /home/splunk/.ansible/tmp/ansible-moduletmp-1710787997.6605148-qhnktiip/tmpvjrugxb1 into to /opt/splunkforwarder/etc/system/local/inputs.conf, failed final rename from b'/opt/splunkforwarder/etc/system/local/.ansible_tmpnskbxfddinputs.conf': [Errno 16] Device or resource busy: b'/opt/splunkforwarder/etc/system/local/.ansible_tmpnskbxfddinputs.conf' -&amp;gt; b'/opt/splunkforwarder/etc/system/local/inputs.conf'​&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;Looks like, some process is trying to access the inputs.conf while its getting overridden.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Can someone please help me solve this issue?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks&lt;/DIV&gt;</description>
      <pubDate>Mon, 18 Mar 2024 19:43:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Splunk-Universal-forwarder-should-forward-the-data-to-a-specific/m-p/681091#M13742</guid>
      <dc:creator>sdhiren</dc:creator>
      <dc:date>2024-03-18T19:43:48Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Universal forwarder should forward the data to a specific index of Splunk Indexer</title>
      <link>https://community.splunk.com/t5/Installation/Splunk-Universal-forwarder-should-forward-the-data-to-a-specific/m-p/681925#M13758</link>
      <description>&lt;P&gt;Are you able to check which process is using the inputs.conf file with lsof?&lt;BR /&gt;You may need to stop Splunk, update the file, then start Splunk again.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Mar 2024 00:28:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Splunk-Universal-forwarder-should-forward-the-data-to-a-specific/m-p/681925#M13758</guid>
      <dc:creator>KendallW</dc:creator>
      <dc:date>2024-03-26T00:28:49Z</dc:date>
    </item>
  </channel>
</rss>

