Activity Feed
- Karma Re: Calculate percentage total over time using timewrap for DalJeanis. 06-05-2020 12:48 AM
- Karma Re: Calculate percentage total over time using timewrap for woodcock. 06-05-2020 12:48 AM
- Karma Re: Calculate percentage total over time using timewrap for DalJeanis. 06-05-2020 12:48 AM
- Karma Re: Calculate percentage total over time using timewrap for woodcock. 06-05-2020 12:48 AM
- Got Karma for Re: How to hide a field in a chart?. 06-05-2020 12:47 AM
- Posted Cron Expression: Run every 5 minutes at 3pm every day on Alerting. 01-22-2018 09:15 AM
- Posted Re: how to display decline rate per specified fields over a period of time on Splunk Search. 05-01-2017 02:37 PM
- Posted how to display decline rate per specified fields over a period of time on Splunk Search. 04-30-2017 06:30 PM
- Tagged how to display decline rate per specified fields over a period of time on Splunk Search. 04-30-2017 06:30 PM
- Posted Re: Add link to another dashboard on Dashboards & Visualizations. 04-18-2017 10:07 AM
- Posted How to edit my search to sort by month in chronological order? on Getting Data In. 03-17-2017 12:10 PM
- Posted Re: Calculate percentage total over time using timewrap on All Apps and Add-ons. 03-10-2017 09:51 AM
- Posted Re: Calculate percentage total over time using timewrap on All Apps and Add-ons. 03-09-2017 08:52 PM
- Posted Re: Calculate percentage total over time using timewrap on All Apps and Add-ons. 03-09-2017 08:52 PM
- Posted Re: Compare total by today with yesterday and against the 7dayavg for the last week on Splunk Search. 03-09-2017 01:47 PM
- Posted Re: Calculate percentage total over time using timewrap on All Apps and Add-ons. 03-08-2017 06:19 PM
- Posted Re: Calculate percentage total over time using timewrap on All Apps and Add-ons. 03-08-2017 06:09 PM
- Posted Compare total by today with yesterday and against the 7dayavg for the last week on Splunk Search. 03-08-2017 05:48 PM
- Posted Re: Calculate percentage total over time using timewrap on All Apps and Add-ons. 03-08-2017 05:34 PM
- Posted Add "Text" Input in Dashboard that changes base query on Dashboards & Visualizations. 03-08-2017 04:53 PM
Topics I've Started
Subject | Karma | Author | Latest Post |
---|---|---|---|
0 | |||
0 | |||
0 | |||
0 | |||
0 | |||
0 | |||
0 | |||
0 | |||
0 | |||
0 |
01-22-2018
09:15 AM
Hi, I am struggling to create a cron expression to run my alert every 5 minutes at 3pm every day.
I found the following expression online: 0 0/5 15 * * ? However, Splunk is not accepting this as a valid Cron.
Also, could you please explain the reasoning behind the correct answer? I often struggle with cron expressions ..
Thank you so much.
... View more
05-01-2017
02:37 PM
ahh I see, thank you! Looks like that did it
... View more
04-30-2017
06:30 PM
Hello,
I am struggling to write a query that displays the decline rate per payment_method over a period of 7 days (with span=1d).
Ideally, I would like to display in one graph - a stacked bar chart of total volume of approved and declined transactions, and overlay that with the decline rate per payment_method (where payment method is in the legend) displayed over time (span=1d for 1 week).
base query...
| bin _time span=1d
| stats count(eval(success="false")) as declined, count(eval(success="true")) as approved, count as total by payment_method _time
| eval percent_declined=round(declined / total * 100, 1)
| table _time payment_method approved declined percent_declined
| eval _time=strftime(_time,"%b %e, %Y")
| sort -_time
Any help is greatly appreciated.
... View more
04-18-2017
10:07 AM
Hello,
Is it possible within the above html snippet to add a command that will open the other dashboard in a new window/tab? I would like to keep the original dashboard open at all times and would love it if I can make it so that the other dashboard opens in a new window.
thank you!
@justinatpnnl
... View more
03-17-2017
12:10 PM
I have the following search, and it is currently displaying a graph grouped by day of the month but not in chronological order.
base query |bucket _time span=1d | eval day=strftime(_time,"%b %d, %y") | stats count as total by day | streamstats avg(total) | sort -day
How can I tweak this to add in the x-axis the months going from Dec 1, 16; Dec 2, 16 ..... Jan 1, 17; Jan 2, 17; .... Feb .... Mar.
It is currently displaying, December, Feb, Jan, Mar (in alphabetical order).
Thank you
Best,
... View more
03-10-2017
09:51 AM
Can you please explain your reasoning for the untable and first command within the query? It is much appreciated, thank you.
... View more
03-09-2017
08:52 PM
thank you for your advice
... View more
03-09-2017
08:52 PM
I appreciate both of your inputs, thank you. I was initially using the custom timewrap extension but am seeing that timechart could be an easier method sometimes.
... View more
03-09-2017
01:47 PM
Thank you for your response. I realize I wasn't very clear in my question. To clarify, I am using the custom timewrap extension and would like a graph to display on the x-axis the hours against today, yesterday, and the 7-day average.
Essentially, I would see three lines going across with a data point at each hour (01, 02, 03, 04...- .. 22, 23).
... View more
03-08-2017
06:19 PM
It seems that when I try to use the sample query's from the "Timewrap Chart Gallery" in the custom timewrap app, I am not able to translate the SPL correctly to fit my data. I am having the same struggles with trying to plot the percent, hour over hour, for March 8, 2017 for example.
base search |
| eval _time=strptime(Date_Time, "%D %R")
| timechart span=1h count(eval(payment_method="credit_card")) as creditcard, count(payment_method) AS total
| eval percent=(creditcard*100/total)
| fields _time, percent
... View more
03-08-2017
06:09 PM
Yes, precisely! I see now. If I wanted to see a week-over-week view for the month of February, would I tweak the above with the following?:
base search | where match(Date, "Feb")
| eval _time = strptime(Date, "%d-%b-%y")
| timechart span=1h count(eval(payment_method="credit_card")) as creditcard, count(payment_method) AS total
| eval percent=(creditcard*100/total)
| fields _time, percent
... View more
03-08-2017
05:48 PM
I have the following query where I am trying to utilize timewrap to display the total number of credit cards used as a payment method today, yesterday, and compare it to the 7 day average.
base search...
| payment_method=credit_card
| timechart count span=1h
| timewrap d series=short
| addtotals s*
| eval 7dayavg=Total/7.0
| table _time, _span, s0, s1, 7dayavg
| rename s0 as now, s1 as yesterday
The problem is currently that the legend shows 4 data series labeled 6:00 PM - 12:00 AM, 12:00 AM - 6:00 AM, 6:00 AM - 12:00 PM, 12:00 PM - 6:00 PM when I would like for it to be today, yesterday, and 7dayavg. The x-axis barely starts from 6:00 pm however I would like it to start from the beginning of the day today (midnight) compared to the beginning of the day yesterday (midnight), with the 7 day average at midnight.
Thank you
... View more
03-08-2017
05:34 PM
Thank you so much for your response, this result is really wonderful to have. However, it doesn't show week-over-week for only the PaymentMethod=cc. I am trying to see the % of total for PaymentMethod=cc for this week as compared to the last week as compared to 2 weeks ago. Essentially in the x-axis I should have Monday, Tuesday, Wednesday, etc...and the legend will be this week, last week. 2 weeks ago.
What this will tell me is that out of all payment methods used (cc, dc, dd, ach), credit cards were used 40% of the time on Wednesday of this week, but 36% of the time on Wednesday of last week, etc...
... View more
03-08-2017
04:53 PM
Hello,
I am wondering if it is possible to ADD INPUT of "text" in my dashboard and then when user types in a specific text, say the name of a country, that it changes the base search of all the panels in my dashboard. For example:
assume one of my panels has in the base search written:
source=A amount=B type=C country=Italy | stats count .....
I would like a user of this dashboard to be able to enter a different country (example: Germany) in the textbox (which is located above all the panels in the dashboard) and for it to change the base query in each panel where country does not equal L anymore, but country=Germany. And let the search run normally with this new input.
... View more
- Tags:
- splunk-enterprise
03-08-2017
03:55 PM
Hello,
Here is an example of what the data looks like:
DATE PaymentMethod
02/01/2017 cc
02/01/2017 cc
02/01/2017 cc
02/01/2017 dc
02/01/2017 dc
02/01/2017 r
02/01/2017 r
02/02/2017 cc
02/02/2017 dc
02/02/2017 ach
02/03/2017 ach
02/03/2017 dp
02/04/2017 dp
02/04/2017 dp
I would like to plot only the percent where payment_method=cc was used for week-over-week or day-over-day. The total will be adding up all the columns (maybe using eventstats?). In the example above, essentially total for 02/01/2017=7 and therefore percent_creditcard=3/7=43% for that day.
... View more
03-08-2017
11:05 AM
Hello there,
I am struggling to incorporate the eval command into a timewrap command. I would like to calculate the percent_total, over time. Specifically, day over day, for the last 4 weeks. Using the example provided in the custom timewrap app is not super helpful:
| inputlookup rides-by-hour.csv | eval _time=strptime(Date_Time, "%D %R") | timechart span=1h sum(Rides) as "Uber Rides"
I tried to tweak it as shown below, however, it is not broken down by Month as nicely as in the example from above.
base search |
| bucket _time span=1h
| stats count(eval(payment_method="credit_card")) as creditcard, count(payment_method) AS total by _time
| eval percent=(creditcard*100/total)
Any help is much appreciated.
... View more
02-17-2017
09:37 AM
This is great, thank you for your feedback. I didn't notice that I was able to state a custom time (earliest and latest) within the alert itself.
... View more
02-16-2017
01:53 PM
Hi, is it possible to run a cron job with the following schedule: 15 7-23/6 *** but have it run for events that happened only in the last 24 hours?
Many thanks!
Daria
... View more
- Tags:
- cron
- cron_schedule
02-02-2017
05:25 PM
base search | bin span=1d _time | stats sum(total_cards) as Total by _time
This did it! I feel like I was missing the concept of "bin". Can you please explain how this command works? I guess I don't really understand the use case?
Thank you!
... View more
02-02-2017
03:14 PM
Hi all,
I am having trouble figuring out how to multiply the number of events by the values that are given in the fields of those events and then plotting those results for the last 7 days.
For example: I have 3 logs for February 1 where each log has event=total_cards and the value for total_cards is 1000, 500, 400.
I would like to be able to essentially add the value of total_cards (1000+500+400) and display that result for each day in the last 7 days.
base search |stats count by total_cards | eval total = (total_cards*count) | eventstats sum(total) AS Total | table Total | table _time Total
My code from above is essentially giving me the result that I was (example: 1,900) but now I need calculation to be done for each day in the last 7 days...
... View more
12-09-2016
07:50 PM
Actually, if you have some time, could you also please explain this line of command to me?
| eval time_marker = if(info_max_time - 3600 <= _time, "Last Hour", "Last Week")
What is info_max_time? And why 3600? Many thanks!
... View more
12-09-2016
09:52 AM
One tiny comment - I noticed when I click on "Last Hour" to view only those results the time stamp says:
(12/2/16 9:45:09.000 AM to 12/9/16 9:45:09.949 AM)
(I double checked the data for last hour individually and it does seem like something is not being calculated correctly for that time frame.)
Should I tweak this line of command somehow?
| eval time_marker = if(info_max_time - (24*3600) <= _time, "Last Hour", "Last Week")
I'm sorry for the hassle.
... View more
12-09-2016
09:42 AM
It's totally fine, thank you so much for your help. It works perfect now! If it's not too much trouble to ask - could you explain what the "appendpipe" command is doing here in our case?
... View more
12-08-2016
03:53 PM
Hi @rjthibod
Ideally, I was looking to have three columns where;
field1: Error Type
field2: Decline Rate (Last Hour)
field 3: Decline Rate (Last Week)
The query you suggested seems to only calculate "Last Hour" (leaving out Last Week for some reason) where I have 11 fields (columns) with
field 1: time_marker
field 2: error type #1
field 3: error type #2
field 4: error type #3
...
...
field 11: error type #10
I guess essentially I wanted the "transpose" of your solution.
I managed to get what I was looking for by doing the following search:
base search earliest=-7d
| eval marker = if(event="transaction", 1, 0)
| eventstats sum(marker) as TotalTransactions
| stats count(eval(success="false")) as Failures max(TotalTransactions) as TotalTransactions by failure_type
| eval percent_failure=round(Failures*100/TotalTransactions , 1)
| sort -percent_failure
| head 10
| streamstats count as WeekRank
| append
[ base search earliest=-1h
| eval marker = if(event="transaction", 1, 0)
| eventstats sum(marker) as TotalTransactions
| stats count(eval(success="false")) as Failures max(TotalTransactions) as TotalTransactions by failure_type
| eval percent_failure_lasthour=round(Failures*100/TotalTransactions , 1)
| sort -percent_failure_lasthour
| head 10
| streamstats count as HourRank ]
| stats first(WeekRank) as WeekRank first(HourRank) as HourRank values(Failures) as Failures values(percent_failure_lasthour) as percent_failure_lasthour values(percent_failure) as percent_failure by failure_type
| sort -percent_failure
| table failure_type percent_failure_lasthour percent_failure
| rename percent_failure as "Decline Rate (Last Week)", failure_type as "Error Type", percent_failure_lasthour as "Decline Rate (Last Hour)"
| fillnull value="-"
I am still very interested in learning how I can use YOUR query to get the same results. Is there a way to simply transpose the table and have it calculate "Last Week" since it is not displaying currently.
I also need to brush up on the documentation since I am not too clear with the command "appendpipe" and "addinfo"
thanks so much for your help!
... View more
12-08-2016
09:17 AM
This is great, thank you! @rjthibod
I would actually like to display the information on the same table compared to the last 7 days as well. Is there any way to align the results that belong to the same failure type to be on the same row? For example right now it displays "insufficient funds" on two individual rows where one result is in the failure type last hour column and the other is in the failure type last week column. I believe the command "streamstats" should do the trick, is there an easier way? Also, is there a way to have the query be faster? I am only parsing 7 days and my base search shouldn't have that much to parse either. Any insights would be much appreciated.
Below is my query:
base search... earliest=-7d
| eval marker = if(event="transaction", 1, 0)
| eventstats sum(marker) as TotalTransactions
| stats count(eval(success="false")) as Failures max(TotalTransactions) as TotalTransactions by failure_type
| eval percent_failure=round(Failures*100/TotalTransactions , 1)
| sort -percent_failure
| head 10
| append
[ base search... earliest=-1h
| eval marker = if(event="transaction", 1, 0)
| eventstats sum(marker) as TotalTransactions
| stats count(eval(success="false")) as Failures max(TotalTransactions) as TotalTransactions by failure_type
| eval percent_failure_lasthour=round(Failures*100/TotalTransactions , 1)
| sort -percent_failure_lasthour
| head 10 ]
| sort -percent_failure
| table failure_type percent_failure_lasthour percent_failure
| rename percent_failure as "Decline Rate (Last Week)", failure_type as "Error Type", percent_failure_lasthour as "Decline Rate (Last Hour)"
| fillnull value="-"
... View more