<?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: How to display a chart using an alert query? in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/How-to-display-a-chart-using-an-alert-query/m-p/466424#M8276</link>
    <description>&lt;P&gt;eval=channel_error= Channel.":".Error Type | timechart span=1h count(#Errors) BY channel_error &lt;BR /&gt;
OR&lt;BR /&gt;
eval channel_error= Channel.":".Error Type | timechart span=1h count(#Errors) BY channel_error&lt;BR /&gt;
there is an = between eval and channel_error&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 02:01:26 GMT</pubDate>
    <dc:creator>Sukisen1981</dc:creator>
    <dc:date>2020-09-30T02:01:26Z</dc:date>
    <item>
      <title>How to display a chart using an alert query?</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-display-a-chart-using-an-alert-query/m-p/466422#M8274</link>
      <description>&lt;P&gt;Hi, I'm trying to modify this alert query to display a chart. Currently it displays a table with columns, channel, error type and #Errors. I'm trying to convert this query to become a timechart which counts the number of errors by channel and error type. However I'm getting an error "Error in 'eval' command: The destination key is invalid. " and even if I remove it the timechart cannnot be created? The highlighted parts are the parts I've changed.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;earliest=-1d@d latest=@d&lt;/STRONG&gt; index=appguids  host=netweba* ApplicationID=order20 ApplicationSource=&lt;EM&gt;order&lt;/EM&gt; errorguid Monster.PaymentProcessor.PaymentFailedException | rex field=Message "(?m)^Message:[^:]+:\s(?.*)$" | stats count BY type,ChannelID | lookup local=1 MonsterChannels ChannelId AS ChannelID | eval Channel=if(isnull(Channel) OR match(Channel,"^0$"),"Unknown ChannelID", Channel) . " [ChannelID: " . ChannelID . "]" | stats values(type) AS "Error Type", list(count) AS "#Errors" BY Channel | appendpipe [ stats sum("#Errors") AS "#Errors" BY Channel | eval "Error Type"="Total for Channel" ] | stats values(Channel) AS X, list("Error Type") AS "Error Type", list("#Errors") AS "#Errors" BY Channel | fields - X |   &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;eval=channel_error= Channel.":".Error Type | timechart span=1h count(#Errors) BY channel_error&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 01:57:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-display-a-chart-using-an-alert-query/m-p/466422#M8274</guid>
      <dc:creator>lsy9891</dc:creator>
      <dc:date>2020-09-30T01:57:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to display a chart using an alert query?</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-display-a-chart-using-an-alert-query/m-p/466423#M8275</link>
      <description>&lt;P&gt;Hi lsy9891,&lt;BR /&gt;
at first beware because there an &lt;CODE&gt;=&lt;/CODE&gt; after the eval in the last row!&lt;BR /&gt;
In addition I see &lt;CODE&gt;count(#Errors)&lt;/CODE&gt; , it's better &lt;CODE&gt;count("#Errors")&lt;/CODE&gt; .&lt;BR /&gt;
Then there could be a mismatch for the space in fields (Error Type), so it's better to use fields without spaces and eventually rename them at the end of the search.&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 30 Aug 2019 11:00:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-display-a-chart-using-an-alert-query/m-p/466423#M8275</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2019-08-30T11:00:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to display a chart using an alert query?</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-display-a-chart-using-an-alert-query/m-p/466424#M8276</link>
      <description>&lt;P&gt;eval=channel_error= Channel.":".Error Type | timechart span=1h count(#Errors) BY channel_error &lt;BR /&gt;
OR&lt;BR /&gt;
eval channel_error= Channel.":".Error Type | timechart span=1h count(#Errors) BY channel_error&lt;BR /&gt;
there is an = between eval and channel_error&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:01:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-display-a-chart-using-an-alert-query/m-p/466424#M8276</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2020-09-30T02:01:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to display a chart using an alert query?</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-display-a-chart-using-an-alert-query/m-p/466425#M8277</link>
      <description>&lt;P&gt;Hi I've corrected the problems but it returns no results are found when I added the timechart command? Basically I need to create a graph from the alert where the x axis is the channel and there are two y axis- one for error type and one for error count?&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2019 04:08:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-display-a-chart-using-an-alert-query/m-p/466425#M8277</guid>
      <dc:creator>lsy9891</dc:creator>
      <dc:date>2019-09-04T04:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to display a chart using an alert query?</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-display-a-chart-using-an-alert-query/m-p/466426#M8278</link>
      <description>&lt;P&gt;Okay so now my chart shows the total number of errors for each channel ID by adding this line: &lt;/P&gt;

&lt;P&gt;chart count(ErrorType) AS TotalError  BY Channel &lt;/P&gt;

&lt;P&gt;How do I get it to show the total errors for each error type as well?&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2019 05:27:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-display-a-chart-using-an-alert-query/m-p/466426#M8278</guid>
      <dc:creator>lsy9891</dc:creator>
      <dc:date>2019-09-04T05:27:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to display a chart using an alert query?</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-display-a-chart-using-an-alert-query/m-p/466427#M8279</link>
      <description>&lt;P&gt;Hi lsy9891,&lt;BR /&gt;
let me understand: in this way tou have the count of ErrorTypes for each Channel.&lt;BR /&gt;
Now you want (in a different panel) the total count of errors for each Error Type, is it correct?&lt;BR /&gt;
if this is your need you have to create a new search changing the last row.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| stats count AS TotalError BY ErrorType
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In this case it's useful to use the Post Process Search, a method to execute a search in a dashboard common to more panels only one time.&lt;BR /&gt;
In other words (see Splunk Dashboard Examples App at &lt;A href="https://splunkbase.splunk.com/app/1603/"&gt;https://splunkbase.splunk.com/app/1603/&lt;/A&gt; ), you have to creare a base search with your search without the last row, and then in each panel call the base search and adding the different last row of each panel.&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2019 07:03:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-display-a-chart-using-an-alert-query/m-p/466427#M8279</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2019-09-04T07:03:00Z</dc:date>
    </item>
  </channel>
</rss>

