<?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: Creating An Alert Based Off A Forwarded Text File in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/Creating-An-Alert-Based-Off-A-Forwarded-Text-File/m-p/740777#M16283</link>
    <description>&lt;P&gt;Good day, unfortunately this did not prompt a triggered alert even after changing the usage value to a lower number to test it. Thank you though.&lt;/P&gt;</description>
    <pubDate>Tue, 04 Mar 2025 15:22:01 GMT</pubDate>
    <dc:creator>DaveyJones</dc:creator>
    <dc:date>2025-03-04T15:22:01Z</dc:date>
    <item>
      <title>Creating An Alert Based Off A Forwarded Text File</title>
      <link>https://community.splunk.com/t5/Alerting/Creating-An-Alert-Based-Off-A-Forwarded-Text-File/m-p/740650#M16279</link>
      <description>&lt;P&gt;Good Day All,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;I'm looking for assistance on how to create a Triggered Alert when a certain percentage number in a text .log file is met in real-time. For background, on a remote server there's a PowerShell script that runs locally via Task Scheduler set to daily which generates a text .log file containing the used percentage of that drive (F: Drive in this instance). The&amp;nbsp;Data Inputs –&amp;gt; Forwarded Inputs –&amp;gt; Files &amp;amp; Directories on splunk along with the Universal Forwarder on that remote server are configured and the text .log file can be read in splunk when searched as shown below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Search:&lt;/P&gt;&lt;P&gt;index=”main” source=”C:\\Admin\StorageLogs\storage_usage.log”&lt;/P&gt;&lt;P&gt;Result:&lt;/P&gt;&lt;P&gt;Event: 03/03/2025 13:10:40 - F: drive usage 17.989% used (All the text contained in the .log file)&lt;BR /&gt;source = C:\\Admin\StorageLogs\storage_usage.log&amp;nbsp; &amp;nbsp;sourcetype = storage_usage-too_small&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;What would be the best way to go about setting up a triggered alert that notifies you in real-time when that text .log file meets/exceeds 75% of the F: drive used? I attempted saving it as an alert from there by performing the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Save As -&amp;gt; Alert:&lt;/P&gt;&lt;P&gt;Title: Storage Monitoring&lt;BR /&gt;Description: (Will add at the end)&lt;BR /&gt;Permissions: Shared in App&lt;BR /&gt;Alert Type: Real-time&lt;BR /&gt;Expires: 24 Hours&lt;BR /&gt;Trigger Conditions: Custom&lt;BR /&gt;Trigger alert when: (This is the field I’m trying to articulate the reading/notifying the 75% used part but unfamiliar with what to put)&lt;BR /&gt;In: 1 minute&lt;BR /&gt;Trigger: For each result&lt;BR /&gt;Throttle: (Unsure if needs to be enabled or not)&lt;BR /&gt;Trigger Actions -&amp;gt; When triggered -&amp;gt; Add to Triggered Alerts -&amp;gt; Severity: Medium&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Would it be easier to configure the reading/notifying when 75% used part in the trigger conditions above or by adding the inputs in the main search query then saving? My apologies if I’m incorrect in any of my interpretations/explanations, I just started with this team and have basically no experience with splunk. Any information or guidance is greatly appreciated, thanks again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Mar 2025 20:50:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Creating-An-Alert-Based-Off-A-Forwarded-Text-File/m-p/740650#M16279</guid>
      <dc:creator>DaveyJones</dc:creator>
      <dc:date>2025-03-03T20:50:42Z</dc:date>
    </item>
    <item>
      <title>Re: Creating An Alert Based Off A Forwarded Text File</title>
      <link>https://community.splunk.com/t5/Alerting/Creating-An-Alert-Based-Off-A-Forwarded-Text-File/m-p/740653#M16280</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/308183"&gt;@DaveyJones&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think the easiest way to achieve this might be to add the following to your search&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=_raw "usage (?&amp;lt;diskUsage&amp;gt;[0-9\.]+)% used"
| where diskUsage&amp;gt;75&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Adjust the diskUsage&amp;gt;75 to whatever you need. This works by extracting the % value of the disk usage from the raw event and then only returning events where the diskUsage is over the specified value.&lt;/P&gt;&lt;P&gt;You would then create the alert to run on a cron-schedule as required, such as every hour (Real-Time is generally not advised, especially as disk usage shouldnt drastically change that quick! So maybe run on a suitable interval, and adjust the time it looks back over (earliest) accordingly.&lt;/P&gt;&lt;P&gt;Set the alert to&amp;nbsp;Trigger alert when: Number of Results, is greater than 0.&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;This will then trigger the alert if there is any result from the search (which has the specified limit on it).&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="livehybrid_0-1741035414768.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/37952iCFB920FFC2FEE2CB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="livehybrid_0-1741035414768.png" alt="livehybrid_0-1741035414768.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Please let me know how you get on and consider adding karma to this or any other answer if it has helped.&lt;BR /&gt;Regards&lt;/P&gt;&lt;P&gt;Will&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Mar 2025 20:59:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Creating-An-Alert-Based-Off-A-Forwarded-Text-File/m-p/740653#M16280</guid>
      <dc:creator>livehybrid</dc:creator>
      <dc:date>2025-03-03T20:59:08Z</dc:date>
    </item>
    <item>
      <title>Re: Creating An Alert Based Off A Forwarded Text File</title>
      <link>https://community.splunk.com/t5/Alerting/Creating-An-Alert-Based-Off-A-Forwarded-Text-File/m-p/740657#M16281</link>
      <description>&lt;P&gt;Use the &lt;FONT face="courier new,courier"&gt;rex&lt;/FONT&gt; command to extract the usage value then test the value to see if the alert should be triggered.&amp;nbsp; I find it more reliable to put the threshold in the alert rather than in the metadata.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=”main” source=”C:\\Admin\StorageLogs\storage_usage.log”
| rex "usage (?&amp;lt;usage&amp;gt;[^%]+)% used"
| where usage &amp;gt; 75&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Mar 2025 16:10:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Creating-An-Alert-Based-Off-A-Forwarded-Text-File/m-p/740657#M16281</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2025-03-04T16:10:10Z</dc:date>
    </item>
    <item>
      <title>Re: Creating An Alert Based Off A Forwarded Text File</title>
      <link>https://community.splunk.com/t5/Alerting/Creating-An-Alert-Based-Off-A-Forwarded-Text-File/m-p/740776#M16282</link>
      <description>&lt;P&gt;Good day, unfortunately this did not prompt a triggered alert even after changing the usage value to a lower number when testing it. Thank you though.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Mar 2025 15:21:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Creating-An-Alert-Based-Off-A-Forwarded-Text-File/m-p/740776#M16282</guid>
      <dc:creator>DaveyJones</dc:creator>
      <dc:date>2025-03-04T15:21:47Z</dc:date>
    </item>
    <item>
      <title>Re: Creating An Alert Based Off A Forwarded Text File</title>
      <link>https://community.splunk.com/t5/Alerting/Creating-An-Alert-Based-Off-A-Forwarded-Text-File/m-p/740777#M16283</link>
      <description>&lt;P&gt;Good day, unfortunately this did not prompt a triggered alert even after changing the usage value to a lower number to test it. Thank you though.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Mar 2025 15:22:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Creating-An-Alert-Based-Off-A-Forwarded-Text-File/m-p/740777#M16283</guid>
      <dc:creator>DaveyJones</dc:creator>
      <dc:date>2025-03-04T15:22:01Z</dc:date>
    </item>
    <item>
      <title>Re: Creating An Alert Based Off A Forwarded Text File</title>
      <link>https://community.splunk.com/t5/Alerting/Creating-An-Alert-Based-Off-A-Forwarded-Text-File/m-p/740785#M16284</link>
      <description>&lt;P&gt;I left out a character.&amp;nbsp; Try my updated query.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Mar 2025 16:10:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Creating-An-Alert-Based-Off-A-Forwarded-Text-File/m-p/740785#M16284</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2025-03-04T16:10:37Z</dc:date>
    </item>
    <item>
      <title>Re: Creating An Alert Based Off A Forwarded Text File</title>
      <link>https://community.splunk.com/t5/Alerting/Creating-An-Alert-Based-Off-A-Forwarded-Text-File/m-p/740828#M16285</link>
      <description>&lt;P&gt;Thank you for the edit, I got it to work after adding a : after usage as without it nothing was generating. Thank you for your assistance&lt;/P&gt;&lt;P&gt;index=”main” source=”C:\\Admin\StorageLogs\storage_usage.log” | rex "usage&lt;FONT color="#FF0000"&gt;:&lt;/FONT&gt; (?&amp;lt;usage&amp;gt;[^%]+)% used" | where usage &amp;gt;= 75&lt;/P&gt;</description>
      <pubDate>Tue, 04 Mar 2025 19:37:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Creating-An-Alert-Based-Off-A-Forwarded-Text-File/m-p/740828#M16285</guid>
      <dc:creator>DaveyJones</dc:creator>
      <dc:date>2025-03-04T19:37:54Z</dc:date>
    </item>
    <item>
      <title>Re: Creating An Alert Based Off A Forwarded Text File</title>
      <link>https://community.splunk.com/t5/Alerting/Creating-An-Alert-Based-Off-A-Forwarded-Text-File/m-p/740860#M16286</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/308183"&gt;@DaveyJones&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please could you provide the search you ended up using so I can look into this further for you?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Will&lt;/P&gt;</description>
      <pubDate>Tue, 04 Mar 2025 22:19:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Creating-An-Alert-Based-Off-A-Forwarded-Text-File/m-p/740860#M16286</guid>
      <dc:creator>livehybrid</dc:creator>
      <dc:date>2025-03-04T22:19:45Z</dc:date>
    </item>
    <item>
      <title>Re: Creating An Alert Based Off A Forwarded Text File</title>
      <link>https://community.splunk.com/t5/Alerting/Creating-An-Alert-Based-Off-A-Forwarded-Text-File/m-p/740935#M16287</link>
      <description>&lt;P&gt;Good day,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I got it to work after adding a : after "usage" as shown below:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P class=""&gt;index=”main” source=”C:\\Admin\StorageLogs\storage_usage.log” | rex field=_raw "usage&lt;FONT color="#FF0000"&gt;:&lt;/FONT&gt; (?&amp;lt;diskUsage&amp;gt;[0-9\.]+)% used" | where diskUsage&amp;gt;75&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Thank you for your assistance.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2025 15:11:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Creating-An-Alert-Based-Off-A-Forwarded-Text-File/m-p/740935#M16287</guid>
      <dc:creator>DaveyJones</dc:creator>
      <dc:date>2025-03-05T15:11:17Z</dc:date>
    </item>
  </channel>
</rss>

