<?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: Script for UF in Monitoring Splunk</title>
    <link>https://community.splunk.com/t5/Monitoring-Splunk/Script-for-UF/m-p/579710#M8739</link>
    <description>&lt;P&gt;Max,&lt;/P&gt;&lt;P&gt;Create a Splunk app and put the script in the bin folder of that app.&amp;nbsp; The app also should contain a default directory with inputs.conf and props.conf files in it.&amp;nbsp; The inputs.conf file tells Splunk how to run the script.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[script://full/path/to/the/script]
interval = */5 * * * *
index = foo
sourcetype = mysourcetype&lt;/LI-CODE&gt;&lt;P&gt;The props.conf file tells Splunk how to parse the data produced by the script.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[mysourcetype]
TIME_PREFIX = &amp;lt;&amp;lt;some regular expression to help Splunk find the timestamp of each event&amp;gt;&amp;gt;
TIME_FORMAT = &amp;lt;&amp;lt;time format string that describes the timestamp&amp;gt;&amp;gt;
# How many characters follow TIME_PREFIX until the end of the tiemestamp
MAX_TIMESTAMP_LOOKAHEAD = 132
SHOULD_LINEMERGE = false
# Regular expression that describes the text between events.
# Must contain a capture group.  The group will be discarded.
LINE_BREAKER = ([\r\n]+)
# Set this to the maximum size of the events produced by the script
TRUNCATE = 10000
EVENT_BREAKER_ENABLE = true
# Set this value to the same as LINE_BREAKER
EVENT_BREAKER = ([\r\n]+)&lt;/LI-CODE&gt;&lt;P&gt;Use the Deployment Server to install the app on the relevant forwarders.&amp;nbsp; If you have a small number of forwarders (fewer than 3) you can install the app manually.&lt;/P&gt;&lt;P&gt;Also install the app on the indexer(s).&lt;/P&gt;&lt;P&gt;Restart the forwarders and indexers after installing the app.&lt;/P&gt;</description>
    <pubDate>Sat, 01 Jan 2022 17:21:04 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2022-01-01T17:21:04Z</dc:date>
    <item>
      <title>Script for UF</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Script-for-UF/m-p/579705#M8735</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;how can I set the Universal Forwarder to run a script every 5 minute with a cronjob&lt;/P&gt;&lt;P&gt;Info of the script should&amp;nbsp;be showing up when searching from the Search Head&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Max.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Dec 2021 23:44:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Script-for-UF/m-p/579705#M8735</guid>
      <dc:creator>splunk_luis12</dc:creator>
      <dc:date>2021-12-31T23:44:15Z</dc:date>
    </item>
    <item>
      <title>Re: Script for UF</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Script-for-UF/m-p/579708#M8737</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/241853"&gt;@splunk_luis12&lt;/a&gt;&amp;nbsp;Try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[script://&amp;lt;cmd&amp;gt;]
interval = [&amp;lt;decimal&amp;gt;|&amp;lt;cron schedule&amp;gt;]&lt;/LI-CODE&gt;&lt;P&gt;Reference:&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.3.1/Admin/Inputsconf" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/Splunk/7.3.1/Admin/Inputsconf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Also if this reply helped you in solving your problem an up-vote would be appreciated &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 01 Jan 2022 06:47:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Script-for-UF/m-p/579708#M8737</guid>
      <dc:creator>ashvinpandey</dc:creator>
      <dc:date>2022-01-01T06:47:40Z</dc:date>
    </item>
    <item>
      <title>Re: Script for UF</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Script-for-UF/m-p/579709#M8738</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;ashvinpandey,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I forgot to mention that it is for Linux (CLI)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;how would you run the following script every 5 minutes? and in which directory should I include it the UF?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#!/bin/bash&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;function check processes (){&lt;BR /&gt;echo ""&lt;BR /&gt;echo "processes:"&lt;BR /&gt;top&lt;BR /&gt;echo ""&lt;BR /&gt;}&lt;BR /&gt;check_processes&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appreciate a lot your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Max.&lt;/P&gt;</description>
      <pubDate>Sat, 01 Jan 2022 17:05:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Script-for-UF/m-p/579709#M8738</guid>
      <dc:creator>splunk_luis12</dc:creator>
      <dc:date>2022-01-01T17:05:57Z</dc:date>
    </item>
    <item>
      <title>Re: Script for UF</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Script-for-UF/m-p/579710#M8739</link>
      <description>&lt;P&gt;Max,&lt;/P&gt;&lt;P&gt;Create a Splunk app and put the script in the bin folder of that app.&amp;nbsp; The app also should contain a default directory with inputs.conf and props.conf files in it.&amp;nbsp; The inputs.conf file tells Splunk how to run the script.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[script://full/path/to/the/script]
interval = */5 * * * *
index = foo
sourcetype = mysourcetype&lt;/LI-CODE&gt;&lt;P&gt;The props.conf file tells Splunk how to parse the data produced by the script.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[mysourcetype]
TIME_PREFIX = &amp;lt;&amp;lt;some regular expression to help Splunk find the timestamp of each event&amp;gt;&amp;gt;
TIME_FORMAT = &amp;lt;&amp;lt;time format string that describes the timestamp&amp;gt;&amp;gt;
# How many characters follow TIME_PREFIX until the end of the tiemestamp
MAX_TIMESTAMP_LOOKAHEAD = 132
SHOULD_LINEMERGE = false
# Regular expression that describes the text between events.
# Must contain a capture group.  The group will be discarded.
LINE_BREAKER = ([\r\n]+)
# Set this to the maximum size of the events produced by the script
TRUNCATE = 10000
EVENT_BREAKER_ENABLE = true
# Set this value to the same as LINE_BREAKER
EVENT_BREAKER = ([\r\n]+)&lt;/LI-CODE&gt;&lt;P&gt;Use the Deployment Server to install the app on the relevant forwarders.&amp;nbsp; If you have a small number of forwarders (fewer than 3) you can install the app manually.&lt;/P&gt;&lt;P&gt;Also install the app on the indexer(s).&lt;/P&gt;&lt;P&gt;Restart the forwarders and indexers after installing the app.&lt;/P&gt;</description>
      <pubDate>Sat, 01 Jan 2022 17:21:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Script-for-UF/m-p/579710#M8739</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-01-01T17:21:04Z</dc:date>
    </item>
    <item>
      <title>Re: Script for UF</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Script-for-UF/m-p/579711#M8740</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/241853"&gt;@splunk_luis12&lt;/a&gt;&amp;nbsp;Check this doc:&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/latest/AdvancedDev/ScriptSetup" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/SplunkCloud/latest/AdvancedDev/ScriptSetup&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 01 Jan 2022 17:23:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Script-for-UF/m-p/579711#M8740</guid>
      <dc:creator>ashvinpandey</dc:creator>
      <dc:date>2022-01-01T17:23:12Z</dc:date>
    </item>
  </channel>
</rss>

