<?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 multivalue field - missing a week in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/multivalue-field-missing-a-week/m-p/709458#M239788</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a multivalue field called weeksum that contains the following values&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;2024:47&lt;/SPAN&gt; &lt;SPAN class=""&gt;2024:48&lt;/SPAN&gt; &lt;SPAN class=""&gt;2024:49&lt;/SPAN&gt; &lt;SPAN class=""&gt;2024:50&lt;/SPAN&gt; &lt;SPAN class=""&gt;2024:51&lt;/SPAN&gt; &lt;SPAN class=""&gt;2024:52&lt;/SPAN&gt; &lt;SPAN class=""&gt;2025:01&lt;/SPAN&gt; &lt;SPAN class=""&gt;2025:02&lt;/SPAN&gt; &lt;SPAN class=""&gt;2025:03&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;In this case, from the first to the last week, there are no missing weeks. I would like to create a field that identifies if there are any missing weeks in the sequence.&lt;/P&gt;&lt;P&gt;For example, if week 2024:51 is missing, the field should indicate that there is a gap in the sequence.&lt;/P&gt;&lt;P&gt;Please note that the weeksum multivalue field already consists of pre-converted values, so converting them back to epoch (using something like | eval week = strftime(_time, "%Y:%U")) does not work.&lt;/P&gt;</description>
    <pubDate>Wed, 22 Jan 2025 14:29:32 GMT</pubDate>
    <dc:creator>omcollia</dc:creator>
    <dc:date>2025-01-22T14:29:32Z</dc:date>
    <item>
      <title>multivalue field - missing a week</title>
      <link>https://community.splunk.com/t5/Splunk-Search/multivalue-field-missing-a-week/m-p/709458#M239788</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a multivalue field called weeksum that contains the following values&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;2024:47&lt;/SPAN&gt; &lt;SPAN class=""&gt;2024:48&lt;/SPAN&gt; &lt;SPAN class=""&gt;2024:49&lt;/SPAN&gt; &lt;SPAN class=""&gt;2024:50&lt;/SPAN&gt; &lt;SPAN class=""&gt;2024:51&lt;/SPAN&gt; &lt;SPAN class=""&gt;2024:52&lt;/SPAN&gt; &lt;SPAN class=""&gt;2025:01&lt;/SPAN&gt; &lt;SPAN class=""&gt;2025:02&lt;/SPAN&gt; &lt;SPAN class=""&gt;2025:03&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;In this case, from the first to the last week, there are no missing weeks. I would like to create a field that identifies if there are any missing weeks in the sequence.&lt;/P&gt;&lt;P&gt;For example, if week 2024:51 is missing, the field should indicate that there is a gap in the sequence.&lt;/P&gt;&lt;P&gt;Please note that the weeksum multivalue field already consists of pre-converted values, so converting them back to epoch (using something like | eval week = strftime(_time, "%Y:%U")) does not work.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jan 2025 14:29:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/multivalue-field-missing-a-week/m-p/709458#M239788</guid>
      <dc:creator>omcollia</dc:creator>
      <dc:date>2025-01-22T14:29:32Z</dc:date>
    </item>
    <item>
      <title>Re: multivalue field - missing a week</title>
      <link>https://community.splunk.com/t5/Splunk-Search/multivalue-field-missing-a-week/m-p/709462#M239789</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/265058"&gt;@omcollia&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;you could use the delta command to check if the difference between one value and the following is 1, something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your_search&amp;gt;
| eval year=substr(weeksum,1,4), week=substr(weeksum,5,2)
| sort year week
| delta weeksum AS prevweeksum
| delta week AS prevweek
| delta year AS prevyear
| eval diff=week-prevweek
| search year=prevyear diff&amp;gt;1
| table weeksum prevweeksum year prevyear week prevweek&lt;/LI-CODE&gt;&lt;P&gt;in this way, if the search will have results there's some error.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jan 2025 14:43:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/multivalue-field-missing-a-week/m-p/709462#M239789</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2025-01-22T14:43:25Z</dc:date>
    </item>
    <item>
      <title>Re: multivalue field - missing a week</title>
      <link>https://community.splunk.com/t5/Splunk-Search/multivalue-field-missing-a-week/m-p/709463#M239790</link>
      <description>&lt;P&gt;Border case question (I like those) - how do you know how many weeks a year has? As silly as it sounds - depending on a particular year and how you're counting a year can have between 52 and 54 weeks.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jan 2025 14:44:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/multivalue-field-missing-a-week/m-p/709463#M239790</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2025-01-22T14:44:46Z</dc:date>
    </item>
    <item>
      <title>Re: multivalue field - missing a week</title>
      <link>https://community.splunk.com/t5/Splunk-Search/multivalue-field-missing-a-week/m-p/709473#M239793</link>
      <description>&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;Here’s the translation of your text into English:&lt;/P&gt;&lt;P&gt;"If I run this command:&lt;/P&gt;&lt;P&gt;| eval year=substr(weeksum,1,4)&lt;/P&gt;&lt;P&gt;the field remains empty, maybe because my field weeksum comes from an eventstats command: | eventstats values(week) as weeksum by IP,dest_ip,plugin_id&lt;/P&gt;&lt;P&gt;and maybe the multivalue field is in a format that's not readable?"&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 22 Jan 2025 15:17:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/multivalue-field-missing-a-week/m-p/709473#M239793</guid>
      <dc:creator>omcollia</dc:creator>
      <dc:date>2025-01-22T15:17:52Z</dc:date>
    </item>
    <item>
      <title>Re: multivalue field - missing a week</title>
      <link>https://community.splunk.com/t5/Splunk-Search/multivalue-field-missing-a-week/m-p/709475#M239794</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/265058"&gt;@omcollia&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I suppose that your inserted the weeksum extraction with eventstat before the eval.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jan 2025 15:20:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/multivalue-field-missing-a-week/m-p/709475#M239794</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2025-01-22T15:20:23Z</dc:date>
    </item>
    <item>
      <title>Re: multivalue field - missing a week</title>
      <link>https://community.splunk.com/t5/Splunk-Search/multivalue-field-missing-a-week/m-p/709477#M239795</link>
      <description>&lt;P&gt;I will explain my issue from the beginning to make it clearer.&lt;/P&gt;&lt;P&gt;I have an index that contains vulnerabilities related to an IP, and on Splunk, I receive VA data every week. I would like to check based on my IP and vulnerabilities for different cases:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Which vulnerabilities are new, i.e., those VA that appear only in the current week.&lt;/LI&gt;&lt;LI&gt;Which vulnerabilities have reappeared in a week after being absent (I think I should check when a VA is missing for a week and then reappears, perhaps by looking at when the time between results is greater than 7 days).&lt;/LI&gt;&lt;LI&gt;When a vulnerability has disappeared, i.e., when the last week in which we had that VA is not the same as the current one.**&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Wed, 22 Jan 2025 15:38:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/multivalue-field-missing-a-week/m-p/709477#M239795</guid>
      <dc:creator>omcollia</dc:creator>
      <dc:date>2025-01-22T15:38:02Z</dc:date>
    </item>
    <item>
      <title>Re: multivalue field - missing a week</title>
      <link>https://community.splunk.com/t5/Splunk-Search/multivalue-field-missing-a-week/m-p/709478#M239796</link>
      <description>&lt;P&gt;Perhaps I just need to check when more than 7 days have passed between one VA and the next.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jan 2025 15:39:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/multivalue-field-missing-a-week/m-p/709478#M239796</guid>
      <dc:creator>omcollia</dc:creator>
      <dc:date>2025-01-22T15:39:02Z</dc:date>
    </item>
    <item>
      <title>Re: multivalue field - missing a week</title>
      <link>https://community.splunk.com/t5/Splunk-Search/multivalue-field-missing-a-week/m-p/709488#M239798</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/265058"&gt;@omcollia&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;ok, you need a completely different thing!&lt;/P&gt;&lt;P&gt;you should run a search to understand if a vulnerability is present in more weeks, so, if vulnerabilities are contained in a fied called vulnerability, you could run something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your_search&amp;gt;
| eval weeksum=strftime(_time,"%Y:%V")
| stats 
     dc(weeksum) AS weeksum_count
     values(weeksum) AS weeksum
     BY vulnerabilities
| eval present_weeksum=strftime(now(),"%Y:%V")
| eval status=case(
     weeksum_count=1 AND weeksum=present_weeksum,"Present in Last Week",
     weeksum_count=1 AND NOT weeksum=present_weeksum,"Present in Week: ".weeksum,
     weeksum_count&amp;gt;1,"Present in More Weeks")&lt;/LI-CODE&gt;&lt;P&gt;you can customize this search using the field you have for vulnerabilities and the additional conditions for status following my approach.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jan 2025 16:27:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/multivalue-field-missing-a-week/m-p/709488#M239798</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2025-01-22T16:27:49Z</dc:date>
    </item>
  </channel>
</rss>

