<?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 every event has a hostname and respective time stamp. I want that hostname  its time to be displayed and download that as a csv in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/every-event-has-a-hostname-and-respective-time-stamp-I-want-that/m-p/265334#M176086</link>
    <description>&lt;P&gt;Like this many events are there. I just need host and TIme to be dowloaded as a report . please help me&lt;/P&gt;

&lt;P&gt;TIme&lt;BR /&gt;
12/6/16&lt;BR /&gt;
9:42:40.513 AM&lt;BR /&gt;&lt;BR /&gt;
Event&lt;BR /&gt;
[2016-12-06 09:42:40,513yyyy/MM/dd HH:mm:ss,UTC] _&lt;EM&gt;alert_time="2016/12/06 08:30:00 UTC", __sev="LOW", __ns="Storage", __app="ONTAP.HEALTH.Multipath", __uniqID=9bdeaf064afffbc8b17016cf1c09af9c, _&lt;/EM&gt;@="&lt;A href="mailto:storage-alerts@yahoo-inc.com" target="_blank"&gt;storage-alerts@yahoo-inc.com&lt;/A&gt;", _threshold_name="ONTAP.HEALTH.Multipath", &lt;STRONG&gt;host="nfsarchive16801.mail.gq1.yahoo.com",&lt;/STRONG&gt; __description="Storage configuration is Mixed-Path.Loop Details::missing loop:3b:shelf:2&lt;BR /&gt;
 missing loop:1d:shelf:5&lt;BR /&gt;
 missing loop:3d:shelf:4", __status="1", __url="&lt;A href="http://yamas.ops.yahoo.com:9999/#/ws/y63tw8/oxc" target="_blank"&gt;http://yamas.ops.yahoo.com:9999/#/ws/y63tw8/oxc&lt;/A&gt;", __url="&lt;A href="http://yamas.ops.yahoo.com:9999/v1/graph/new?start=1481005800&amp;amp;end=1481013000&amp;amp;_t.host=nfsarchive16801.mail.gq1.yahoo.com&amp;amp;_s.s0._m.m0.name=Storage.ONTAP.HEALTH.Multipath.status_ok&amp;amp;_s.s0._m.m1.name=Storage.ONTAP.HEALTH.Multipath.status_bad&amp;amp;_s.s0._t._threshold_name=ONTAP.HEALTH.Multipath" target="_blank"&gt;http://yamas.ops.yahoo.com:9999/v1/graph/new?start=1481005800&amp;amp;end=1481013000&amp;amp;_t.host=nfsarchive16801.mail.gq1.yahoo.com&amp;amp;_s.s0._m.m0.name=Storage.ONTAP.HEALTH.Multipath.status_ok&amp;amp;_s.s0._m.m1.name=Storage.ONTAP.HEALTH.Multipath.status_bad&amp;amp;_s.s0._t._threshold_name=ONTAP.HEALTH.Multipath&lt;/A&gt;", __custom_text="please check and fix"&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host = alrcons-1.yms.gq1.yahoo.com
source = /home/y/logs/alerts_splunk/alerts-email.log
sourcetype = alerts
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 29 Sep 2020 12:02:16 GMT</pubDate>
    <dc:creator>rkdasari</dc:creator>
    <dc:date>2020-09-29T12:02:16Z</dc:date>
    <item>
      <title>every event has a hostname and respective time stamp. I want that hostname  its time to be displayed and download that as a csv</title>
      <link>https://community.splunk.com/t5/Splunk-Search/every-event-has-a-hostname-and-respective-time-stamp-I-want-that/m-p/265334#M176086</link>
      <description>&lt;P&gt;Like this many events are there. I just need host and TIme to be dowloaded as a report . please help me&lt;/P&gt;

&lt;P&gt;TIme&lt;BR /&gt;
12/6/16&lt;BR /&gt;
9:42:40.513 AM&lt;BR /&gt;&lt;BR /&gt;
Event&lt;BR /&gt;
[2016-12-06 09:42:40,513yyyy/MM/dd HH:mm:ss,UTC] _&lt;EM&gt;alert_time="2016/12/06 08:30:00 UTC", __sev="LOW", __ns="Storage", __app="ONTAP.HEALTH.Multipath", __uniqID=9bdeaf064afffbc8b17016cf1c09af9c, _&lt;/EM&gt;@="&lt;A href="mailto:storage-alerts@yahoo-inc.com" target="_blank"&gt;storage-alerts@yahoo-inc.com&lt;/A&gt;", _threshold_name="ONTAP.HEALTH.Multipath", &lt;STRONG&gt;host="nfsarchive16801.mail.gq1.yahoo.com",&lt;/STRONG&gt; __description="Storage configuration is Mixed-Path.Loop Details::missing loop:3b:shelf:2&lt;BR /&gt;
 missing loop:1d:shelf:5&lt;BR /&gt;
 missing loop:3d:shelf:4", __status="1", __url="&lt;A href="http://yamas.ops.yahoo.com:9999/#/ws/y63tw8/oxc" target="_blank"&gt;http://yamas.ops.yahoo.com:9999/#/ws/y63tw8/oxc&lt;/A&gt;", __url="&lt;A href="http://yamas.ops.yahoo.com:9999/v1/graph/new?start=1481005800&amp;amp;end=1481013000&amp;amp;_t.host=nfsarchive16801.mail.gq1.yahoo.com&amp;amp;_s.s0._m.m0.name=Storage.ONTAP.HEALTH.Multipath.status_ok&amp;amp;_s.s0._m.m1.name=Storage.ONTAP.HEALTH.Multipath.status_bad&amp;amp;_s.s0._t._threshold_name=ONTAP.HEALTH.Multipath" target="_blank"&gt;http://yamas.ops.yahoo.com:9999/v1/graph/new?start=1481005800&amp;amp;end=1481013000&amp;amp;_t.host=nfsarchive16801.mail.gq1.yahoo.com&amp;amp;_s.s0._m.m0.name=Storage.ONTAP.HEALTH.Multipath.status_ok&amp;amp;_s.s0._m.m1.name=Storage.ONTAP.HEALTH.Multipath.status_bad&amp;amp;_s.s0._t._threshold_name=ONTAP.HEALTH.Multipath&lt;/A&gt;", __custom_text="please check and fix"&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host = alrcons-1.yms.gq1.yahoo.com
source = /home/y/logs/alerts_splunk/alerts-email.log
sourcetype = alerts
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Sep 2020 12:02:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/every-event-has-a-hostname-and-respective-time-stamp-I-want-that/m-p/265334#M176086</guid>
      <dc:creator>rkdasari</dc:creator>
      <dc:date>2020-09-29T12:02:16Z</dc:date>
    </item>
    <item>
      <title>Re: every event has a hostname and respective time stamp. I want that hostname  its time to be displayed and download that as a csv</title>
      <link>https://community.splunk.com/t5/Splunk-Search/every-event-has-a-hostname-and-respective-time-stamp-I-want-that/m-p/265335#M176087</link>
      <description>&lt;P&gt;if these are events that are being generated, can you just create a search like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=alerts|table host _time alert_time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and then save it as a report and schedule it if needed?&lt;BR /&gt;
if you don't have the fields extracted yet, some regex commands that might work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=alerts |rex field=_raw host="(?&amp;lt;host&amp;gt;.*)", |rex field=_raw \[(?&amp;lt;time&amp;gt;.*)\]|rex field=_raw alert_time="(?&amp;lt;alertTime&amp;gt;.*)", __sev|table host time alertTime
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 06 Dec 2016 18:40:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/every-event-has-a-hostname-and-respective-time-stamp-I-want-that/m-p/265335#M176087</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2016-12-06T18:40:49Z</dc:date>
    </item>
    <item>
      <title>Re: every event has a hostname and respective time stamp. I want that hostname  its time to be displayed and download that as a csv</title>
      <link>https://community.splunk.com/t5/Splunk-Search/every-event-has-a-hostname-and-respective-time-stamp-I-want-that/m-p/265336#M176088</link>
      <description>&lt;P&gt;Since host is a metadata index-time extracted field for any sourcetype, you will need to provide a separate field extraction name. Since Splunk is case sensitive for Field names, I am using Host as the extracted field name in following options:&lt;/P&gt;

&lt;P&gt;Option 1) Use &lt;STRONG&gt;Extract New Fields&lt;/STRONG&gt;  option from your Search results. Interactive Field Extractor will give you options to use Splunks regular expression or define your own. You can define your own extraction as &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host\=\"(?P&amp;lt;Host&amp;gt;[^,]+)\"\,
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Option 2) Use inline &lt;STRONG&gt;rex&lt;/STRONG&gt; command to extract host. (PS: rex command should only be used for initial testing, ideally you should use Option 1 or 3 to create a Field Extraction Knowledge Object.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;rex field=_raw "host\=\"(?P&amp;lt;Host&amp;gt;[^,]+)\"\,"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Option 3) Modify &lt;STRONG&gt;props.conf&lt;/STRONG&gt; to create your own extraction for sourcetype alerts&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;EXTRACT-Host = host\=\"(?P&amp;lt;Host&amp;gt;[^,]+)\"\,
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;PS: Other fields should be automatically extracted by Splunk. If not you can apply above options with respective regular expressions. In order to test your regular expressions you can try regex101 website.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2016 19:19:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/every-event-has-a-hostname-and-respective-time-stamp-I-want-that/m-p/265336#M176088</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2016-12-06T19:19:12Z</dc:date>
    </item>
  </channel>
</rss>

