<?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: How to create a number of dummy events? in #Random</title>
    <link>https://community.splunk.com/t5/Random/How-to-create-a-number-of-dummy-events/m-p/271547#M514</link>
    <description>&lt;P&gt;please use &lt;A href="https://github.com/splunk/eventgen"&gt;Eventgen app&lt;/A&gt; for it. You can generate it in your local laptop/dev environment and then upload to Splunk web. Or try to stick a universal forwarder in your local laptop/dev environment to do it automatically to your web.&lt;/P&gt;</description>
    <pubDate>Sat, 10 Sep 2016 13:31:54 GMT</pubDate>
    <dc:creator>koshyk</dc:creator>
    <dc:date>2016-09-10T13:31:54Z</dc:date>
    <item>
      <title>How to create a number of dummy events?</title>
      <link>https://community.splunk.com/t5/Random/How-to-create-a-number-of-dummy-events/m-p/271542#M509</link>
      <description>&lt;P&gt;I was trying to find an answer for this in other threads, but unfortunately to no avail.&lt;BR /&gt;
I'm trying to create dummy events imitating log entries.&lt;BR /&gt;
Say I had two real log entries, one from 9/1/2016 of type "creation" (as in alert's creation) and the other one from 9/06/2016 of type "closure". What I want to do is create 4 dummy log entries of type "ongoing" in between the two (one for each day 2,3,4 and 5th of September).&lt;BR /&gt;
Is there a way to do this? I found the "makeresults" command, but I doubt it's the right direction as I cannot think of a way to apply it to my problem.&lt;BR /&gt;
Any help will be greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2016 14:23:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Random/How-to-create-a-number-of-dummy-events/m-p/271542#M509</guid>
      <dc:creator>wsadowy1</dc:creator>
      <dc:date>2016-09-09T14:23:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a number of dummy events?</title>
      <link>https://community.splunk.com/t5/Random/How-to-create-a-number-of-dummy-events/m-p/271543#M510</link>
      <description>&lt;P&gt;What are trying to accomplish with the dummy events?  Perhaps there's another route to your goal without them.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2016 15:37:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Random/How-to-create-a-number-of-dummy-events/m-p/271543#M510</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2016-09-09T15:37:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a number of dummy events?</title>
      <link>https://community.splunk.com/t5/Random/How-to-create-a-number-of-dummy-events/m-p/271544#M511</link>
      <description>&lt;P&gt;Have you looked into creating an eventgen.conf to create your dummy events yet?&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2016 15:50:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Random/How-to-create-a-number-of-dummy-events/m-p/271544#M511</guid>
      <dc:creator>tlelle_splunk</dc:creator>
      <dc:date>2016-09-09T15:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a number of dummy events?</title>
      <link>https://community.splunk.com/t5/Random/How-to-create-a-number-of-dummy-events/m-p/271545#M512</link>
      <description>&lt;P&gt;I need to calculate the "time to restore / actual working hours" for a ticket based on numerous conditions:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Business Hours - each week day may have them different. Everything that is not within business hours should fall into "off clock" time.&lt;/LI&gt;
&lt;LI&gt;Holidays - they should be counted entirely as "off clock".&lt;/LI&gt;
&lt;LI&gt;Status "Pending" or "Resolved" - whenever the ticket goes into one of those, the clock should be stopped for the duration of the status.&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Obviously the following conditions may overlap at times, so the only way I could think of for solving this problem was to search for "Creation", "Pending Start", "Pending End" and "Restoration" log entries and then split the days between each log entry into dummy log entries of type "Ongoing". Then I could put it all into a table and create help columns like "is_business_day", "is_pending", "is_holiday", "shift_start", "shift_end", "is_before_business_hours", "is_past_business_hours" etc with values of 0 or 1 per each log entry. This way even if two or more of the above conditions overlap (say a holiday and Pending status, they will be counted as one "off clock" time for as long as they overlap. &lt;BR /&gt;
I hope this makes sense...&lt;/P&gt;

&lt;P&gt;If you can think of a more straightforward solution then by all means please let me know &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:55:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Random/How-to-create-a-number-of-dummy-events/m-p/271545#M512</guid>
      <dc:creator>wsadowy1</dc:creator>
      <dc:date>2020-09-29T10:55:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a number of dummy events?</title>
      <link>https://community.splunk.com/t5/Random/How-to-create-a-number-of-dummy-events/m-p/271546#M513</link>
      <description>&lt;P&gt;I am using Web Splunk so I don't have access to .conf files I'm afraid &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; Unless there's a way of achieving the same goal through the web UI&lt;/P&gt;</description>
      <pubDate>Sat, 10 Sep 2016 07:39:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Random/How-to-create-a-number-of-dummy-events/m-p/271546#M513</guid>
      <dc:creator>wsadowy1</dc:creator>
      <dc:date>2016-09-10T07:39:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a number of dummy events?</title>
      <link>https://community.splunk.com/t5/Random/How-to-create-a-number-of-dummy-events/m-p/271547#M514</link>
      <description>&lt;P&gt;please use &lt;A href="https://github.com/splunk/eventgen"&gt;Eventgen app&lt;/A&gt; for it. You can generate it in your local laptop/dev environment and then upload to Splunk web. Or try to stick a universal forwarder in your local laptop/dev environment to do it automatically to your web.&lt;/P&gt;</description>
      <pubDate>Sat, 10 Sep 2016 13:31:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Random/How-to-create-a-number-of-dummy-events/m-p/271547#M514</guid>
      <dc:creator>koshyk</dc:creator>
      <dc:date>2016-09-10T13:31:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a number of dummy events?</title>
      <link>https://community.splunk.com/t5/Random/How-to-create-a-number-of-dummy-events/m-p/271548#M515</link>
      <description>&lt;P&gt;To calculate days between start and complete, you can convert creation &amp;amp; completion dates to to epoch and then subtract. However, the events you've shared don't seem to have a time for creation/completion, so not sure how you plan to calculate "off hours" or anything related to hour of day for that matter. Given that, here's one approach to add "dummy days"&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search | eval startdate=strptime(creation, "%-m/%-d/%Y")  | eval enddate=strptime(completion, "%-m/%-d/%Y") | eval workdays=mvrange(startdate, enddate, "1d") | mvexpand workdays
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;To this, if you have a lookup of holidays, you can flag those dates as "off hours" and you can exclude weekends like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval dow=strftime(workdays, "%w") | where dow&amp;lt;6 AND dow&amp;gt;0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hope this gets you started. If not, please provide more sample/complete events and desired output&lt;/P&gt;</description>
      <pubDate>Sat, 10 Sep 2016 14:52:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Random/How-to-create-a-number-of-dummy-events/m-p/271548#M515</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-09-10T14:52:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a number of dummy events?</title>
      <link>https://community.splunk.com/t5/Random/How-to-create-a-number-of-dummy-events/m-p/271549#M516</link>
      <description>&lt;P&gt;Thank you so much for suggesting the use of mvrange and mvexpand! I was looking to get dummy days between each log entry and with use of mvrange, mvexpand and delta functions I was able to achieve just that &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
Thanks again!&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2016 10:48:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Random/How-to-create-a-number-of-dummy-events/m-p/271549#M516</guid>
      <dc:creator>wsadowy1</dc:creator>
      <dc:date>2016-09-12T10:48:22Z</dc:date>
    </item>
  </channel>
</rss>

