{"id":35604,"date":"2021-04-29T12:42:03","date_gmt":"2021-04-29T12:42:03","guid":{"rendered":"https:\/\/merikebi.warrenmyers.com\/?p=35604"},"modified":"2021-04-29T12:42:03","modified_gmt":"2021-04-29T12:42:03","slug":"answer-by-warren-for-how-can-i-generate-a-visualisation-with-multiple-data-series-in-splunk","status":"publish","type":"post","link":"https:\/\/merikebi.warrenmyers.com\/?p=35604","title":{"rendered":"Answer by warren for How Can I Generate A Visualisation with Multiple Data Series In Splunk"},"content":{"rendered":"<p>I suspect you&#8217;re going to be most interested in <a href=\"https:\/\/docs.splunk.com\/Documentation\/Splunk\/latest\/SearchReference\/timechart\" rel=\"nofollow noreferrer\"><code>timechart<\/code><\/a> for this<\/p>\n<p>Something along the following lines may get you towards what you&#8217;re looking for:<\/p>\n<pre><code>index=ndx sourcetype=srctp Value=* TimeStamp=* %NStatus=* (Tag=SubstationA_T1_MW OR Tag=SubstationA_T2_MW) earliest=-2h\n| eval _time=strptime(TimeStamp,&quot;%m\/%d\/%Y %H:%M:%S.%N&quot;)\n| timechart span=15m max(Value) as Value by Tag\n<\/code><\/pre>\n<p><code>timechart<\/code> relies on the internal, hidden <code>_time<\/code> field (which is in Unix epoch time) &#8211; so if <code>_time<\/code> doesn&#8217;t match <code>TimeStamp<\/code>, you need the <code>eval<\/code> statement I added to <a href=\"https:\/\/docs.splunk.com\/Documentation\/Splunk\/8.1.3\/SearchReference\/DateandTimeFunctions#strptime.28X.2CY.29\" rel=\"nofollow noreferrer\">convert<\/a> from your <code>TimeStamp<\/code> to Unix epoch time in <code>_time<\/code> (which I&#8217;ve assumed is in mm\/dd\/yyyy format).<\/p>\n<p>Also, go take the free, self-paced <a href=\"https:\/\/www.splunk.com\/en_us\/training\/free-courses\/splunk-fundamentals-1.html\" rel=\"nofollow noreferrer\">Splunk Fundamentals 1 class<\/a><\/p>\n<p>from User warren &#8211; Stack Overflow https:\/\/stackoverflow.com\/questions\/67304621\/how-can-i-generate-a-visualisation-with-multiple-data-series-in-splunk\/67317603#67317603<br \/>\nvia <a href=\"https:\/\/ifttt.com\/?ref=da&#038;site=wordpress\">IFTTT<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I suspect you&#8217;re going to be most interested in timechart for this Something along the following lines may get you towards what you&#8217;re looking for: index=ndx sourcetype=srctp Value=* TimeStamp=* %NStatus=* (Tag=SubstationA_T1_MW OR Tag=SubstationA_T2_MW) earliest=-2h | eval _time=strptime(TimeStamp,&quot;%m\/%d\/%Y %H:%M:%S.%N&quot;) | timechart span=15m max(Value) as Value by Tag timechart relies on the internal, hidden _time field (which &hellip;<br \/><a href=\"https:\/\/merikebi.warrenmyers.com\/?p=35604\" class=\"more-link pen_button pen_element_default pen_icon_arrow_double\">Continue reading <span class=\"screen-reader-text\">Answer by warren for How Can I Generate A Visualisation with Multiple Data Series In Splunk<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4],"tags":[991],"keyring_services":[],"class_list":["post-35604","post","type-post","status-publish","format-standard","hentry","category-blih","tag-stackexchange"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts\/35604","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=35604"}],"version-history":[{"count":1,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts\/35604\/revisions"}],"predecessor-version":[{"id":35605,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts\/35604\/revisions\/35605"}],"wp:attachment":[{"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=35604"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=35604"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=35604"},{"taxonomy":"keyring_services","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fkeyring_services&post=35604"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}