<?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: Splunk search query/queries for populating splunk supported timezones in dropdown type input. in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-search-query-queries-for-populating-splunk-supported/m-p/375411#M68006</link>
    <description>&lt;P&gt;Very nice @woodcock&lt;/P&gt;</description>
    <pubDate>Mon, 03 Jul 2017 18:17:08 GMT</pubDate>
    <dc:creator>rjthibod</dc:creator>
    <dc:date>2017-07-03T18:17:08Z</dc:date>
    <item>
      <title>Splunk search query/queries for populating splunk supported timezones in dropdown type input.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-search-query-queries-for-populating-splunk-supported/m-p/375407#M68002</link>
      <description>&lt;P&gt;I have several input types in my dashboard for which I have allotted different tokens. Now I have a requirement where I need a &lt;STRONG&gt;dropdown to be populated by the timezones supported by Splunk&lt;/STRONG&gt;( The ones displayed after adjusting the user settings at &lt;EM&gt;Settings-&amp;gt; Access controls -&amp;gt; User-&amp;gt; User Name -&amp;gt; Edit account -&amp;gt; Time zone&lt;/EM&gt;). I found a query to get the current timezone in which the user is working on using the query "&lt;STRONG&gt;| stats count | eval zone = strftime(now(), "%Z")&lt;/STRONG&gt;". But I need  ** separate search queries for all other timezones from the settings** as well. This would be much helpful or at least individual queries to get the IST, EST(ET), PST, GMT timezones in the dropdown input would be sufficient bare-minimally. Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jul 2017 09:22:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-search-query-queries-for-populating-splunk-supported/m-p/375407#M68002</guid>
      <dc:creator>waltz</dc:creator>
      <dc:date>2017-07-03T09:22:17Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk search query/queries for populating splunk supported timezones in dropdown type input.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-search-query-queries-for-populating-splunk-supported/m-p/375408#M68003</link>
      <description>&lt;P&gt;According to this page (&lt;A href="http://dev.splunk.com/view/java-sdk/SP-CAAAEJ7"&gt;http://dev.splunk.com/view/java-sdk/SP-CAAAEJ7&lt;/A&gt;) all of the options are found here: &lt;A href="https://en.wikipedia.org/wiki/List_of_tz_database_time_zones"&gt;https://en.wikipedia.org/wiki/List_of_tz_database_time_zones&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;I don't think you can easily generate that list in an ad-hoc search without using a lookup table / KV Store. Since that data is static, creating a lookup search based on the wikipedia page is probably the better option.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jul 2017 12:14:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-search-query-queries-for-populating-splunk-supported/m-p/375408#M68003</guid>
      <dc:creator>rjthibod</dc:creator>
      <dc:date>2017-07-03T12:14:51Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk search query/queries for populating splunk supported timezones in dropdown type input.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-search-query-queries-for-populating-splunk-supported/m-p/375409#M68004</link>
      <description>&lt;P&gt;Thanks rjthibod for your answer. The thing is, I can even set the timezone values statically with a label and a value. But in my case, I will be needing to append another input type button's ad-hoc search/searchmanager with the timezone's search query upon changing this dropdown value onvaluechange by assigning a token value. &lt;/P&gt;

&lt;P&gt;Syntax: ** | "mysearch" |"Token onvaluechange of dropdown input"|"rest of my search" **&lt;BR /&gt;
For eg. &lt;BR /&gt;
 ** "mysearch"| stats count | eval zone = strftime(now(), "%Z") |"rest of my search" **&lt;/P&gt;

&lt;P&gt;^ by doing something similar to the above search, I need to change the timestamp field data accordingly after getting retrieved from cassandra DB. That is why I need a search query for &lt;STRONG&gt;ET,PST,GMT and IST&lt;/STRONG&gt; at least ,so that the timestamp value retrieved gets manipulated accordingly.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jul 2017 13:37:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-search-query-queries-for-populating-splunk-supported/m-p/375409#M68004</guid>
      <dc:creator>waltz</dc:creator>
      <dc:date>2017-07-03T13:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk search query/queries for populating splunk supported timezones in dropdown type input.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-search-query-queries-for-populating-splunk-supported/m-p/375410#M68005</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rest/servicesNS/-/search/data/ui/manager splunk_server=local
| regex eai:data="Time zone" 
| head 1 
| rename eai:data AS _raw 
| table _raw 
| rex mode=sed "s/(?ms)^.*Default System Timezone --\"\/&amp;gt;[\s\r\n]+(.*?)&amp;lt;\/options&amp;gt;.*$/\1/" 
| eval raw=split(_raw, "&amp;lt;opt value=") 
| mvexpand raw 
| rex field=raw "^\"(?&amp;lt;value&amp;gt;[^\"]+)\"\s+label=\"(?&amp;lt;label&amp;gt;[^\"]+)\"" 
| fields - _raw raw
| search label="*" AND value="*"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 03 Jul 2017 17:55:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-search-query-queries-for-populating-splunk-supported/m-p/375410#M68005</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-07-03T17:55:31Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk search query/queries for populating splunk supported timezones in dropdown type input.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-search-query-queries-for-populating-splunk-supported/m-p/375411#M68006</link>
      <description>&lt;P&gt;Very nice @woodcock&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jul 2017 18:17:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-search-query-queries-for-populating-splunk-supported/m-p/375411#M68006</guid>
      <dc:creator>rjthibod</dc:creator>
      <dc:date>2017-07-03T18:17:08Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk search query/queries for populating splunk supported timezones in dropdown type input.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-search-query-queries-for-populating-splunk-supported/m-p/375412#M68007</link>
      <description>&lt;P&gt;The nice thing about this that you can pass both the &lt;CODE&gt;label&lt;/CODE&gt; and the &lt;CODE&gt;value&lt;/CODE&gt; directly to the &lt;CODE&gt;fieldset&lt;/CODE&gt; and recreate the exact same presentation as exists in the source dashboard.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jul 2017 18:28:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-search-query-queries-for-populating-splunk-supported/m-p/375412#M68007</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-07-03T18:28:54Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk search query/queries for populating splunk supported timezones in dropdown type input.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-search-query-queries-for-populating-splunk-supported/m-p/375413#M68008</link>
      <description>&lt;P&gt;Thanks for your answer, @woodcock! This seems to work fine in a normal ad-hoc search. But when I use this search query for my dropdown, the entire value fields seem to be converted like a string and as a result, I get only one value as a whole, whereas I need every label and value to be dynamic and get populated one by one. Also is it possible to change/manipulate the timestamp field(including offset) setting of the virtual index upon selecting a timezone from this dropdown I'm gonna create? &lt;/P&gt;</description>
      <pubDate>Tue, 04 Jul 2017 09:39:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-search-query-queries-for-populating-splunk-supported/m-p/375413#M68008</guid>
      <dc:creator>waltz</dc:creator>
      <dc:date>2017-07-04T09:39:32Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk search query/queries for populating splunk supported timezones in dropdown type input.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-search-query-queries-for-populating-splunk-supported/m-p/375414#M68009</link>
      <description>&lt;P&gt;I forgot that &lt;CODE&gt;mvexpand&lt;/CODE&gt; does not work on &lt;CODE&gt;_raw&lt;/CODE&gt;.  See my updated answer.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jul 2017 14:37:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-search-query-queries-for-populating-splunk-supported/m-p/375414#M68009</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-07-04T14:37:03Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk search query/queries for populating splunk supported timezones in dropdown type input.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-search-query-queries-for-populating-splunk-supported/m-p/375415#M68010</link>
      <description>&lt;P&gt;Awesome @woodcock! This query will do! Thank you:)&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jul 2017 15:08:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-search-query-queries-for-populating-splunk-supported/m-p/375415#M68010</guid>
      <dc:creator>waltz</dc:creator>
      <dc:date>2017-07-04T15:08:12Z</dc:date>
    </item>
  </channel>
</rss>

