<?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: Timechart based off of a search and an appended inputlookup in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Timechart-based-off-of-a-search-and-an-appended-inputlookup/m-p/687400#M234449</link>
    <description>&lt;P&gt;This is a data analytics forum. &amp;nbsp;So, you cannot just say "I know is missing" without data to substantiate. &amp;nbsp;My mock data actually includes conditions where a group of pods are missing in both current interval and previous intervals. They are shown as missing in all intervals in which they are missing in the chart screenshot. &amp;nbsp;If you need concrete help, always post sample data that will demonstrate all features necessary. (Anonymize as needed.)&lt;/P&gt;&lt;P&gt;Speaking of pod groups, you still haven't confirmed whether it is the pod groups you are trying to mark. &amp;nbsp;As I said, there is no logic that will support detecting missing of individual instances of any pod by using lookup table with wildcards.&lt;/P&gt;</description>
    <pubDate>Tue, 14 May 2024 05:47:32 GMT</pubDate>
    <dc:creator>yuanliu</dc:creator>
    <dc:date>2024-05-14T05:47:32Z</dc:date>
    <item>
      <title>Timechart based off of a search and an appended inputlookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-based-off-of-a-search-and-an-appended-inputlookup/m-p/686746#M234217</link>
      <description>&lt;P&gt;I have the following query that gives me a list of pods that are missing based off the comparison of what should be deployed as defined in the pod_list.csv inputlookup.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=abc sourcetype=kubectl importance=non-critical
| dedup pod_name
| eval Observed=1
| append
[| inputlookup pod_list.csv
| eval Observed=0
| eval importance=if(isnull(importance), "critical", importance)
| search importance=non-critical]
| lookup pod_list pod_name_lookup as pod_name OUTPUT pod_name_lookup
| eval importance=if(isnull(importance), "critical", importance
| stats max(Observed) as Observed by pod_name_lookup, importance
| where Observed=0 and importance="non-critical"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The data in the pod_list.csv looks like so:&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;namespace&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;pod_name_lookup&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;importance&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;ns1&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;kafka-*&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;critical&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;ns1&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;apache-*&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;critical&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;ns2&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;grafana-backup-*&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;non-critical&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This works as expected.&lt;/P&gt;&lt;P&gt;I am now having difficulties creating a timechart with this data to be able to see when a pod wasnt deployed, not just what is currently missing.&lt;/P&gt;&lt;P&gt;Any help is greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2024 14:52:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-based-off-of-a-search-and-an-appended-inputlookup/m-p/686746#M234217</guid>
      <dc:creator>fishn</dc:creator>
      <dc:date>2024-05-07T14:52:21Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart based off of a search and an appended inputlookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-based-off-of-a-search-and-an-appended-inputlookup/m-p/686843#M234253</link>
      <description>&lt;P&gt;The timechart command neeeeeeeeeeeeeds a _time field for the time bucketing. With your stats command you have not done a "by _time" and with that ignored / "eliminated" the _time field from the results. That means the field is no longer available for any command after the stats line.&lt;BR /&gt;&lt;BR /&gt;You would have to at least add the _time field to the by clause of the stats command. With that said... I think your "append" with the inputlookup would create results where there is no "_time" field at the end of the resultset. So it will be funny to see what stats does with those results.&lt;BR /&gt;&lt;BR /&gt;My recommendation is to either try to just do the lookup without the append or eval some _time field with a value that makes sense to the inputlookup append.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2024 06:45:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-based-off-of-a-search-and-an-appended-inputlookup/m-p/686843#M234253</guid>
      <dc:creator>apietsch</dc:creator>
      <dc:date>2024-05-08T06:45:07Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart based off of a search and an appended inputlookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-based-off-of-a-search-and-an-appended-inputlookup/m-p/686854#M234257</link>
      <description>&lt;P&gt;Let me first point out that you can only determine if a group of pods as denoted in pod_name_lookup is completely absent (missing), not any individual pod_name. &amp;nbsp;As such, your "timechart" can only have values 1 and 0 for each missing pod_name_lookup. &amp;nbsp;Second, I want to note that calculations to fill null importance values is irrelevant to the problem in hand, therefore I will ignore them.&lt;/P&gt;&lt;P&gt;The way to think through a solution is as follows: You want to populate a field that contains all non-critical pod_name_lookup values in &lt;EM&gt;every&lt;/EM&gt; event so you can compare with running ones in each time interval. (Hint: &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Eventstats" target="_blank" rel="noopener"&gt;eventstats&lt;/A&gt;.) &amp;nbsp;In other words, if you have these pods&lt;/P&gt;&lt;TABLE width="518px"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;_time&lt;/TD&gt;&lt;TD&gt;pod_name&lt;/TD&gt;&lt;TD&gt;sourcetype&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="187.734375px" height="25px"&gt;2024-05-08 01:42:10&lt;/TD&gt;&lt;TD width="177.6875px" height="25px"&gt;apache-12&lt;/TD&gt;&lt;TD width="151.59375px" height="25px"&gt;kubectl&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="187.734375px" height="25px"&gt;2024-05-08 01:41:58&lt;/TD&gt;&lt;TD width="177.6875px" height="25px"&gt;apache-2&lt;/TD&gt;&lt;TD width="151.59375px" height="25px"&gt;kubectl&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="187.734375px" height="25px"&gt;2024-05-08 01:41:46&lt;/TD&gt;&lt;TD width="177.6875px" height="25px"&gt;kakfa-8&lt;/TD&gt;&lt;TD width="151.59375px" height="25px"&gt;kubectl&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="187.734375px" height="25px"&gt;2024-05-08 01:41:00&lt;/TD&gt;&lt;TD width="177.6875px" height="25px"&gt;apache-13&lt;/TD&gt;&lt;TD width="151.59375px" height="25px"&gt;kubectl&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="187.734375px" height="25px"&gt;2024-05-08 01:40:52&lt;/TD&gt;&lt;TD width="177.6875px" height="25px"&gt;someapp-6&lt;/TD&gt;&lt;TD width="151.59375px" height="25px"&gt;kubectl&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="187.734375px" height="25px"&gt;2024-05-08 01:39:40&lt;/TD&gt;&lt;TD width="177.6875px" height="25px"&gt;grafana-backup-11&lt;/TD&gt;&lt;TD width="151.59375px" height="25px"&gt;kubectl&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="187.734375px" height="25px"&gt;2024-05-08 01:39:34&lt;/TD&gt;&lt;TD width="177.6875px" height="25px"&gt;apache-4&lt;/TD&gt;&lt;TD width="151.59375px" height="25px"&gt;kubectl&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="187.734375px" height="25px"&gt;2024-05-08 01:39:32&lt;/TD&gt;&lt;TD width="177.6875px" height="25px"&gt;kafka-6&lt;/TD&gt;&lt;TD width="151.59375px" height="25px"&gt;kubectl&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="187.734375px" height="25px"&gt;2024-05-08 01:39:26&lt;/TD&gt;&lt;TD width="177.6875px" height="25px"&gt;someapp-2&lt;/TD&gt;&lt;TD width="151.59375px" height="25px"&gt;kubectl&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="187.734375px" height="25px"&gt;2024-05-08 01:38:16&lt;/TD&gt;&lt;TD width="177.6875px" height="25px"&gt;apache-12&lt;/TD&gt;&lt;TD width="151.59375px" height="25px"&gt;kubectl&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="187.734375px" height="25px"&gt;2024-05-08 01:38:10&lt;/TD&gt;&lt;TD width="177.6875px" height="25px"&gt;grafana-backup-6&lt;/TD&gt;&lt;TD width="151.59375px" height="25px"&gt;kubectl&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;and pod_list lookup contains the following&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;importance&lt;/TD&gt;&lt;TD&gt;namespace&lt;/TD&gt;&lt;TD&gt;pod_name_lookup&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;critical&lt;/TD&gt;&lt;TD&gt;ns1&lt;/TD&gt;&lt;TD&gt;kafka-*&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;critical&lt;/TD&gt;&lt;TD&gt;ns1&lt;/TD&gt;&lt;TD&gt;apache-*&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;non-critical&lt;/TD&gt;&lt;TD&gt;ns2&lt;/TD&gt;&lt;TD&gt;grafana-backup-*&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;non-critical&lt;/TD&gt;&lt;TD&gt;ns2&lt;/TD&gt;&lt;TD&gt;someapp-*&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;(As you can see, I added "someapp-*" because in your illustration, only one app is "non-critical". &amp;nbsp;This makes data nontrivial.) You will want to produce an intermediate table like this (please ignore the time interval differences just focus on material fields):&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;_time&lt;/TD&gt;&lt;TD&gt;pod_name_lookup&lt;/TD&gt;&lt;TD&gt;pod_name_all&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2024-05-08 01:35:00&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2024-05-08 01:36:00&lt;/TD&gt;&lt;TD&gt;&lt;DIV class=""&gt;apache-*&lt;/DIV&gt;&lt;DIV class=""&gt;grafana-backup-*&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV class=""&gt;grafana-backup-*&lt;/DIV&gt;&lt;DIV class=""&gt;someapp-*&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2024-05-08 01:37:00&lt;/TD&gt;&lt;TD&gt;&lt;DIV class=""&gt;kafka-*&lt;/DIV&gt;&lt;DIV class=""&gt;someapp-*&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV class=""&gt;grafana-backup-*&lt;/DIV&gt;&lt;DIV class=""&gt;someapp-*&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2024-05-08 01:38:00&lt;/TD&gt;&lt;TD&gt;&lt;DIV class=""&gt;apache-*&lt;/DIV&gt;&lt;DIV class=""&gt;grafana-backup-*&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV class=""&gt;grafana-backup-*&lt;/DIV&gt;&lt;DIV class=""&gt;someapp-*&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2024-05-08 01:39:00&lt;/TD&gt;&lt;TD&gt;&lt;DIV class=""&gt;apache-*&lt;/DIV&gt;&lt;DIV class=""&gt;someapp-*&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV class=""&gt;grafana-backup-*&lt;/DIV&gt;&lt;DIV class=""&gt;someapp-*&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2024-05-08 01:40:00&lt;/TD&gt;&lt;TD&gt;&lt;DIV class=""&gt;apache-*&lt;/DIV&gt;&lt;DIV class=""&gt;kakfa-*&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV class=""&gt;grafana-backup-*&lt;/DIV&gt;&lt;DIV class=""&gt;someapp-*&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;(This illustration assumes that you are looking for missing pods in each calendar minute; I know this is ridiculous, but it is easier to emulate.) &amp;nbsp;From this table, you can calculate which value(s) in pod_name_all is/are missing from pod_name_lookup. (Hint:&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/MultivalueEvalFunctions#mvmap.28.26lt.3Bmv.26gt.3B.2C.26lt.3Bexpression.26gt.3B.29" target="_blank" rel="noopener"&gt;mvmap&lt;/A&gt;&amp;nbsp;can be an easy method.)&lt;/P&gt;&lt;P&gt;In SPL, this thought process can be implemented as&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=abc sourcetype=kubectl importance=non-critical
| lookup pod_list pod_name_lookup as pod_name OUTPUT pod_name_lookup
| dedup pod_name
| append
    [inputlookup pod_list where importance = non-critical
    | rename pod_name_lookup as pod_name_all]
| eventstats values(pod_name_all) as pod_name_all
| where sourcetype == "kubectl"
| timechart span=1h@h values(pod_name_lookup) as pod_name_lookup values(pod_name_all) as pod_name_all
| eval missing = mvappend(missing, mvmap(pod_name_all, if(pod_name_all IN (pod_name_lookup), null(), pod_name_all)))
| where isnotnull(missing)
| timechart span=1h@h count by missing&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;In the above, I changed time bucket to 1h@h&amp;nbsp;&amp;nbsp;(as opposed to 1m@m&amp;nbsp;used in illustrations). &amp;nbsp;You need to change that to whatever suits your needs.&lt;/P&gt;&lt;P data-unlink="true"&gt;Here is an emulation used to produce the above tables and this chart:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="missing-pods.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/30734iFAD2D4F70FE260F5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="missing-pods.png" alt="missing-pods.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults format=csv data="_time, pod_name
10,apache-12
22,apache-2
34,kakfa-8
80,apache-13
88,someapp-6
160,grafana-backup-11
166,apache-4
168,kafka-6
174,someapp-2
244,apache-12
250,grafana-backup-6"
| eval _time = now() - _time
| eval sourcetype = "kubectl", importance = "non-critical"
| eval pod_name_lookup = replace(pod_name, "\d+", "*")
``` the above emulates
index=abc sourcetype=kubectl importance=non-critical
| lookup pod_list pod_name_lookup as pod_name OUTPUT pod_name_lookup
| dedup pod_name
```
| append
    [makeresults format=csv data="namespace,	pod_name_lookup,	importance
ns1,	kafka-*,	critical
ns1,	apache-*,	critical
ns2,	grafana-backup-*,	non-critical
ns2,	someapp-*,	non-critical"
    | where importance = "non-critical"
    ``` subsearch thus far emulates
    | inputlookup pod_list where importance = non-critical
    ```
    | rename pod_name_lookup as pod_name_all]
| eventstats values(pod_name_all) as pod_name_all
| where sourcetype == "kubectl"
| timechart span=1m@m values(pod_name_lookup) as pod_name_lookup values(pod_name_all) as pod_name_all
| eval missing = mvappend(missing, mvmap(pod_name_all, if(pod_name_all IN (pod_name_lookup), null(), pod_name_all)))
| where isnotnull(missing)
| timechart span=1m@m count by missing&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2024 09:03:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-based-off-of-a-search-and-an-appended-inputlookup/m-p/686854#M234257</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2024-05-08T09:03:58Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart based off of a search and an appended inputlookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-based-off-of-a-search-and-an-appended-inputlookup/m-p/687383#M234442</link>
      <description>&lt;P&gt;Thank you for this. I feel it is close but I am getting some inconsistent/incomplete findings in the search. I have a pod that I know is "missing" it is in the pod lookup table , but is not deployed.&lt;/P&gt;&lt;P&gt;The Line chart shows that it is missing in the current hour but not in the previous hours that i know that it was missing.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2024 20:32:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-based-off-of-a-search-and-an-appended-inputlookup/m-p/687383#M234442</guid>
      <dc:creator>fishn</dc:creator>
      <dc:date>2024-05-13T20:32:43Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart based off of a search and an appended inputlookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-based-off-of-a-search-and-an-appended-inputlookup/m-p/687400#M234449</link>
      <description>&lt;P&gt;This is a data analytics forum. &amp;nbsp;So, you cannot just say "I know is missing" without data to substantiate. &amp;nbsp;My mock data actually includes conditions where a group of pods are missing in both current interval and previous intervals. They are shown as missing in all intervals in which they are missing in the chart screenshot. &amp;nbsp;If you need concrete help, always post sample data that will demonstrate all features necessary. (Anonymize as needed.)&lt;/P&gt;&lt;P&gt;Speaking of pod groups, you still haven't confirmed whether it is the pod groups you are trying to mark. &amp;nbsp;As I said, there is no logic that will support detecting missing of individual instances of any pod by using lookup table with wildcards.&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2024 05:47:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-based-off-of-a-search-and-an-appended-inputlookup/m-p/687400#M234449</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2024-05-14T05:47:32Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart based off of a search and an appended inputlookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-based-off-of-a-search-and-an-appended-inputlookup/m-p/687509#M234475</link>
      <description>&lt;P&gt;Some context: I have a scripted input that sends the output of kubectl get po -A --show-labels into the abc index and kubectl sourcetype. Each pod has the importance label with a value of either critical or non-critical. Some pods havent had that label applied as of yet, that is why I had the fill null importance lines in my original query. Agree that they can be ignored for this task. An event in the index would look something like this:&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1" width="69.44444663237843%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%"&gt;_time&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;namespace&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;pod_name&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;importance&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;etc....&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;The other fields are irrelevant to this search. This data gets ingested into splunk every minute.&lt;/P&gt;&lt;P&gt;Each pod's name is unique (one container per pod) so i believe the lookup table wildcard pod groups will map to the individual pod. For example, there would only be one apache pod, not apache-2 and apache-12. I dont believe there are any concerns with the grouping.&lt;/P&gt;&lt;P&gt;When I say that I know the data is missing, I mean that there is a pod (kafka) that hasnt been deployed for over a week. It is not being reported by the scripted input I mentioned earlier. That pod is listed in the pod lookup as (kafka-*) Unfortunately I am unable to provided screenshots.&lt;/P&gt;&lt;P&gt;The trouble I am having with the query you generously shared is that when it runs and gets visualized as a line chart with the 24h time range picked, the kafka pod shows a count of 1(missing) 24 hours ago, then goes to 0 for the rest of time up until the current hour, where it returns to 1. Nothing changed during that time with the actual deployment status of that pod.&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2024 15:47:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-based-off-of-a-search-and-an-appended-inputlookup/m-p/687509#M234475</guid>
      <dc:creator>fishn</dc:creator>
      <dc:date>2024-05-14T15:47:46Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart based off of a search and an appended inputlookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-based-off-of-a-search-and-an-appended-inputlookup/m-p/687563#M234502</link>
      <description>&lt;P&gt;Do you mean to say that some periods have no data about pods? (Or rather, no data about pods with importance value "non-important".) &amp;nbsp;My initial suggestion was based on the assumption that during any given interval, there are some pods. &amp;nbsp;Now that I think about it, it is possible that that assumption is still true but some intervals may only get important pods and all non-important ones are missing.&lt;/P&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=abc sourcetype=kubectl importance=non-critical
| lookup pod_list pod_name_lookup as pod_name OUTPUT pod_name_lookup
| dedup pod_name
| where sourcetype == "kubectl"
| timechart span=1m@m values(pod_name_lookup) as pod_name_lookup values(pod_name_all) as pod_name_all
| append
    [makeresults format=csv data="namespace,	pod_name_lookup,	importance
ns1,	kafka-*,	critical
ns1,	apache-*,	critical
ns2,	grafana-backup-*,	non-critical
ns2,	someapp-*,	non-critical"
    | where importance = "non-critical"
    ``` subsearch thus far emulates
    | inputlookup pod_list where importance = non-critical
    ```
    | rename pod_name_lookup as pod_name_all]
| eventstats values(pod_name_all) as pod_name_all
| eval missing = if(isnull(pod_name_all), pod_name_all, mvappend(missing, mvmap(pod_name_all, if(pod_name_all IN (pod_name_lookup), null(), pod_name_all))))
| where isnotnull(missing)
| timechart span=1m@m count by missing&lt;/LI-CODE&gt;&lt;P&gt;Exactly the same idea, just fill intervals with no non-important pod groups. &amp;nbsp;Those intervals will see all pod groups marked as missing.&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2024 06:11:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-based-off-of-a-search-and-an-appended-inputlookup/m-p/687563#M234502</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2024-05-15T06:11:29Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart based off of a search and an appended inputlookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-based-off-of-a-search-and-an-appended-inputlookup/m-p/687655#M234528</link>
      <description>&lt;P&gt;In my environment, unless something catastrophic happens, there will always be data from critical and non-critical pods being ingested into this index/sourcetype. I dont have an environment to test the addition you suggested to account for a period of time where no "non-critical" pods reporting, but as soon as i do i will test your updated query.&lt;/P&gt;&lt;P&gt;Removing the dedup from your original suggestion seems to have cleared up the weird issue i was seeing where i was getting anamolous results in the timechart.&amp;nbsp; This seems to be working now which is great. Huge thanks!!&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=abc sourcetype=kubectl importance=non-critical
| lookup pod_list pod_name_lookup as pod_name OUTPUT pod_name_lookup
| append
    [inputlookup pod_list where importance = non-critical
    | rename pod_name_lookup as pod_name_all]
| eventstats values(pod_name_all) as pod_name_all
| where sourcetype == "kubectl"
| timechart span=1h@h values(pod_name_lookup) as pod_name_lookup values(pod_name_all) as pod_name_all
| eval missing = mvappend(missing, mvmap(pod_name_all, if(pod_name_all IN (pod_name_lookup), null(), pod_name_all)))
| where isnotnull(missing)
| timechart span=1h@h count by missing&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Is there an easy way to instead of&amp;nbsp; having a individual line for each "missing" pod, to either have a single line with the total count of "non-critical" pods and possibly also have two lines for "critical" and "non-critical"?&lt;/P&gt;&lt;P&gt;I guess im also looking to have a timechart summary of the total count of missing non-critical and critical pods. Hope that makes sense.&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2024 20:21:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-based-off-of-a-search-and-an-appended-inputlookup/m-p/687655#M234528</guid>
      <dc:creator>fishn</dc:creator>
      <dc:date>2024-05-15T20:21:11Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart based off of a search and an appended inputlookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-based-off-of-a-search-and-an-appended-inputlookup/m-p/687779#M234579</link>
      <description>&lt;P&gt;Was able to get this to give me one line for the non-critical pods total missing count over time.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=abc sourcetype=kubectl importance=non-critical
| lookup pod_list pod_name_lookup as pod_name OUTPUT pod_name_lookup
| append
    [inputlookup pod_list where importance = non-critical
    | rename pod_name_lookup as pod_name_all]
| eventstats values(pod_name_all) as pod_name_all
| where sourcetype == "kubectl"
| timechart span=1h@h values(pod_name_lookup) as pod_name_lookup values(pod_name_all) as pod_name_all
| eval missing = mvappend(missing, mvmap(pod_name_all, if(pod_name_all IN (pod_name_lookup), null(), pod_name_all)))
| timechart span=1h@h count(missing) as non-critical-pods-missing&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Working towards the goal of being able to get another line for critical.&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2024 18:41:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-based-off-of-a-search-and-an-appended-inputlookup/m-p/687779#M234579</guid>
      <dc:creator>fishn</dc:creator>
      <dc:date>2024-05-16T18:41:38Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart based off of a search and an appended inputlookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-based-off-of-a-search-and-an-appended-inputlookup/m-p/687820#M234587</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;Removing the dedup from your original suggestion seems to have cleared up the weird issue i was&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I should have noticed that dedup counters your goal. (I copied from your original illustration without considering implications in time interval.) &amp;nbsp;You are correct, this is one more reason you don't want to throw dedup around.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;P&gt;&amp;nbsp;Is there an easy way to instead of&amp;nbsp; having a individual line for each "missing" pod, to either have a single line with the total count of "non-critical" pods and possibly also have two lines for "critical" and "non-critical"?&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;First, let's clarify that your goal is to count the &lt;EM&gt;number of&lt;/EM&gt; missing pod groups by importance. &amp;nbsp;Something like this should do:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=abc sourcetype=kubectl
| lookup pod_list pod_name_lookup as pod_name OUTPUT pod_name_lookup
| where sourcetype == "kubectl"
| bin span=1h@h _time
| stats values(pod_name_lookup) as pod_name_lookup values(pod_name_all) as pod_name_all by importance _time
| append
    [ inputlookup pod_list
    | rename pod_name_lookup as pod_name_all]
| eventstats values(pod_name_all) as pod_name_all importance
| eval missing = if(isnull(pod_name_all), pod_name_all, mvappend(missing, mvmap(pod_name_all, if(pod_name_all IN (pod_name_lookup), null(), pod_name_all))))
| where isnotnull(missing)
| timechart span=1m@m dc(missing) by importance&lt;/LI-CODE&gt;&lt;P&gt;Here is an emulation.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="missing-by-importance.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/30852iF55FC8B80D5628FD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="missing-by-importance.png" alt="missing-by-importance.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults format=csv data="_time, pod_name, importance
10,apache-12, critical
22,apache-2, critical
34,kakfa-8, critical
80,superapp-13, critical
88,someapp-6
160,grafana-backup-11
166,apache-4, critical
168,kafka-6, critical
566,apache-4, critical
568,kafka-6, critical
174,someapp-2
250,grafana-backup-6
374,anotherapp-10"
| fillnull importance value=non-critical
| eval _time = now() - _time
| eval sourcetype = "kubectl"
| eval pod_name_lookup = replace(pod_name, "\d+", "*")
``` the above emulates
index=abc sourcetype=kubectl
| lookup pod_list pod_name_lookup as pod_name OUTPUT pod_name_lookup
| dedup pod_name
```
| where sourcetype == "kubectl"
| bin span=1m@m _time
| stats values(pod_name_lookup) as pod_name_lookup values(pod_name_all) as pod_name_all by importance _time
| append
    [makeresults format=csv data="namespace,	pod_name_lookup,	importance
ns1,	kafka-*,	critical
ns1,	apache-*,	critical
ns2,	grafana-backup-*,	non-critical
ns2,	someapp-*,	non-critical"
    ``` subsearch thus far emulates
    | inputlookup pod_list
    ```
    | rename pod_name_lookup as pod_name_all]
| eventstats values(pod_name_all) as pod_name_all by importance
| eval missing = if(isnull(pod_name_all), pod_name_all, mvappend(missing, mvmap(pod_name_all, if(pod_name_all IN (pod_name_lookup), null(), pod_name_all))))
| where isnotnull(missing)
| timechart span=1m@m dc(missing) by importance&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 May 2024 05:51:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-based-off-of-a-search-and-an-appended-inputlookup/m-p/687820#M234587</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2024-05-17T05:51:21Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart based off of a search and an appended inputlookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-based-off-of-a-search-and-an-appended-inputlookup/m-p/687907#M234602</link>
      <description>&lt;P&gt;This is perfect. Thank you! Only had to add the missing "by" in&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eventstats values(pod_name_all) as pod_name_all importance&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;index=abc sourcetype=kubectl
| lookup pod_list pod_name_lookup as pod_name OUTPUT pod_name_lookup
| where sourcetype == "kubectl"
| bin span=1h@h _time
| stats values(pod_name_lookup) as pod_name_lookup values(pod_name_all) as pod_name_all by importance _time
| append
    [ inputlookup pod_list
    | rename pod_name_lookup as pod_name_all]
| eventstats values(pod_name_all) as pod_name_all by importance
| eval missing = if(isnull(pod_name_all), pod_name_all, mvappend(missing, mvmap(pod_name_all, if(pod_name_all IN (pod_name_lookup), null(), pod_name_all))))
| where isnotnull(missing)
| timechart span=1m@m dc(missing) by importance&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 17 May 2024 16:07:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-based-off-of-a-search-and-an-appended-inputlookup/m-p/687907#M234602</guid>
      <dc:creator>fishn</dc:creator>
      <dc:date>2024-05-17T16:07:50Z</dc:date>
    </item>
  </channel>
</rss>

