<?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: Help with looping in Splunk (getting column names along with field values) in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/Help-with-looping-in-Splunk-getting-column-names-along-with/m-p/579847#M13352</link>
    <description>&lt;P&gt;The foreach command will iterate through a list of field names.&lt;/P&gt;&lt;P&gt;An alert is based on the results of a search - it looks like you already have a search, what more do you need for your alert?&lt;/P&gt;</description>
    <pubDate>Tue, 04 Jan 2022 09:18:06 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2022-01-04T09:18:06Z</dc:date>
    <item>
      <title>Help with looping in Splunk (getting column names along with field values)</title>
      <link>https://community.splunk.com/t5/Alerting/Help-with-looping-in-Splunk-getting-column-names-along-with/m-p/579846#M13351</link>
      <description>&lt;P&gt;Hi everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to retrieve all the column names and the field values for each row and put them in an alert, without manually doing it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="yoshilog_0-1641286314132.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/17406i6EEFB3C1593FAEDD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="yoshilog_0-1641286314132.png" alt="yoshilog_0-1641286314132.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;yoshilog_0-1641286314132.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you let me know if it is possible to iterate through each column name in splunk?&lt;/P&gt;&lt;P&gt;My desired output looks like this:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;① [This is for Row labeled ①]&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;journal.status_id.old_value:&lt;/STRONG&gt; 90&lt;BR /&gt;&lt;STRONG&gt;journal.status_id.new_value:&lt;/STRONG&gt; 95&lt;/P&gt;&lt;P&gt;②[This is for Row labeled ②]&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;journal.assigned_to_id.old_value: &lt;/STRONG&gt;113&lt;BR /&gt;&lt;STRONG&gt;journal.assigned_to_id.new_value:&amp;nbsp;&lt;/STRONG&gt;99&lt;/P&gt;&lt;P&gt;③[This is for Row labeled ③]&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;journal.status_id.old_value: &lt;/STRONG&gt;73&lt;BR /&gt;&lt;STRONG&gt;journal.status_id.new_value:&amp;nbsp;&lt;/STRONG&gt;90&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;journal.assigned_to_id.old_value: &lt;/STRONG&gt;null&lt;BR /&gt;&lt;STRONG&gt;journal.assigned_to_id.new_value:&amp;nbsp;&lt;/STRONG&gt;113&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;It is possible for other columns to be present so I would like to do it via a loop.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jan 2022 08:59:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Help-with-looping-in-Splunk-getting-column-names-along-with/m-p/579846#M13351</guid>
      <dc:creator>yoshilog</dc:creator>
      <dc:date>2022-01-04T08:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: Help with looping in Splunk (getting column names along with field values)</title>
      <link>https://community.splunk.com/t5/Alerting/Help-with-looping-in-Splunk-getting-column-names-along-with/m-p/579847#M13352</link>
      <description>&lt;P&gt;The foreach command will iterate through a list of field names.&lt;/P&gt;&lt;P&gt;An alert is based on the results of a search - it looks like you already have a search, what more do you need for your alert?&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jan 2022 09:18:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Help-with-looping-in-Splunk-getting-column-names-along-with/m-p/579847#M13352</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-01-04T09:18:06Z</dc:date>
    </item>
  </channel>
</rss>

