<?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: Calculate vulnerabilty age by month with vulnerabilities that span over a month in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Calculate-vulnerabilty-age-by-month-with-vulnerabilities-that/m-p/523690#M147722</link>
    <description>&lt;P&gt;So you still want it appearing every month (not just the last month) but to make it a running total? How about keeping the minimum firstTime and calculating age using that?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats `summariesonly` min(_time) as firstTime,max(_time) as lastTime,count from datamodel=Vulnerabilities.Vulnerabilities by _time Vulnerabilities.signature,Vulnerabilities.dest, Vulnerabilities.severity span=1mon 
| eventstats min(firstTime) as firstTime by Vulnerabilities.signature,Vulnerabilities.dest, Vulnerabilities.severity
| `drop_dm_object_name("Vulnerabilities")` 
| where firstTime!=lastTime AND severity!="informational" 
| eval age=round((lastTime-firstTime)/86400) 
| eval _time=lastTime 
| timechart span=1mon avg(age) by severity 
| fields _time low medium high critical&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 08 Oct 2020 13:01:07 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2020-10-08T13:01:07Z</dc:date>
    <item>
      <title>Calculate vulnerabilty age by month with vulnerabilities that span over a month</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculate-vulnerabilty-age-by-month-with-vulnerabilities-that/m-p/523657#M147707</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I would like to create a graph showing the average vulnerability age for each month by severity. I use this 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;| tstats `summariesonly` min(_time) as firstTime,max(_time) as lastTime,count from datamodel=Vulnerabilities.Vulnerabilities by _time Vulnerabilities.signature,Vulnerabilities.dest, Vulnerabilities.severity span=1mon | `drop_dm_object_name("Vulnerabilities")` | where firstTime!=lastTime AND severity!="informational" | eval age=round((lastTime-firstTime)/86400) | eval _time=lastTime | timechart span=1mon avg(age) by severity | fields _time low medium high critical&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However the age is calculated independently for each month. Meaning that if a vulnerability spans over multiple month its age will cap at 30 days maximum for each month in the graph. I'm unsure of how to make it cumulative&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2020 11:02:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculate-vulnerabilty-age-by-month-with-vulnerabilities-that/m-p/523657#M147707</guid>
      <dc:creator>unitrium</dc:creator>
      <dc:date>2020-10-08T11:02:44Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate vulnerabilty age by month with vulnerabilities that span over a month</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculate-vulnerabilty-age-by-month-with-vulnerabilities-that/m-p/523684#M147719</link>
      <description>&lt;P&gt;Do you need the time element to the tstats?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats `summariesonly` min(_time) as firstTime,max(_time) as lastTime,count from datamodel=Vulnerabilities.Vulnerabilities by  Vulnerabilities.signature,Vulnerabilities.dest, Vulnerabilities.severity | `drop_dm_object_name("Vulnerabilities")` | where firstTime!=lastTime AND severity!="informational" | eval age=round((lastTime-firstTime)/86400) | eval _time=lastTime | timechart span=1mon avg(age) by severity | fields _time low medium high critical&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 08 Oct 2020 12:32:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculate-vulnerabilty-age-by-month-with-vulnerabilities-that/m-p/523684#M147719</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-10-08T12:32:31Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate vulnerabilty age by month with vulnerabilities that span over a month</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculate-vulnerabilty-age-by-month-with-vulnerabilities-that/m-p/523688#M147721</link>
      <description>&lt;P&gt;I think it needed for the span=1mon so I can get the firstTime and lastTime for each month.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2020 12:45:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculate-vulnerabilty-age-by-month-with-vulnerabilities-that/m-p/523688#M147721</guid>
      <dc:creator>unitrium</dc:creator>
      <dc:date>2020-10-08T12:45:07Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate vulnerabilty age by month with vulnerabilities that span over a month</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculate-vulnerabilty-age-by-month-with-vulnerabilities-that/m-p/523690#M147722</link>
      <description>&lt;P&gt;So you still want it appearing every month (not just the last month) but to make it a running total? How about keeping the minimum firstTime and calculating age using that?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats `summariesonly` min(_time) as firstTime,max(_time) as lastTime,count from datamodel=Vulnerabilities.Vulnerabilities by _time Vulnerabilities.signature,Vulnerabilities.dest, Vulnerabilities.severity span=1mon 
| eventstats min(firstTime) as firstTime by Vulnerabilities.signature,Vulnerabilities.dest, Vulnerabilities.severity
| `drop_dm_object_name("Vulnerabilities")` 
| where firstTime!=lastTime AND severity!="informational" 
| eval age=round((lastTime-firstTime)/86400) 
| eval _time=lastTime 
| timechart span=1mon avg(age) by severity 
| fields _time low medium high critical&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2020 13:01:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculate-vulnerabilty-age-by-month-with-vulnerabilities-that/m-p/523690#M147722</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-10-08T13:01:07Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate vulnerabilty age by month with vulnerabilities that span over a month</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculate-vulnerabilty-age-by-month-with-vulnerabilities-that/m-p/523691#M147723</link>
      <description>&lt;P&gt;Seems to be closer to what I need, I'm just wondering what happens when a vulnerability is fixed, will it's average still be counted for the following months ?&lt;BR /&gt;If yes I was thinking to add an if clause in the eval age so that the age for the month should be 0 if lastTime!=_time&lt;BR /&gt;Would that work ?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2020 13:10:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculate-vulnerabilty-age-by-month-with-vulnerabilities-that/m-p/523691#M147723</guid>
      <dc:creator>unitrium</dc:creator>
      <dc:date>2020-10-08T13:10:43Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate vulnerabilty age by month with vulnerabilities that span over a month</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculate-vulnerabilty-age-by-month-with-vulnerabilities-that/m-p/523695#M147724</link>
      <description>&lt;P&gt;I think the answer is no since the vulnerability won't show up for the month in the first tstats. You could check this in your results from just the tstats&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2020 13:21:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculate-vulnerabilty-age-by-month-with-vulnerabilities-that/m-p/523695#M147724</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-10-08T13:21:17Z</dc:date>
    </item>
  </channel>
</rss>

