Activity Feed
- Got Karma for Re: How do I set _time with collect _raw?. 07-17-2022 09:46 PM
- Got Karma for Re: How to extract timestamp from XML. 06-08-2021 06:27 AM
- Got Karma for Re: How do I set _time with collect _raw?. 06-05-2020 12:50 AM
- Karma Re: Get average from multiple field in XML for dineshraj9. 06-05-2020 12:48 AM
- Karma Re: Foreign key for gcusello. 06-05-2020 12:48 AM
- Got Karma for Re: How to extract timestamp from XML. 06-05-2020 12:48 AM
- Karma Re: How to create a dashboard with dynamic charts/panels based on the number of hosts and hide panels if there is no data? for jeffland. 06-05-2020 12:47 AM
- Karma Re: Is a Javascript event called when a SearchManager search returns no data? for dgladkikh_splun. 06-05-2020 12:46 AM
- Posted Re: Is a Javascript event called when a SearchManager search returns no data? on Dashboards & Visualizations. 02-08-2019 05:14 AM
- Posted Re: How do I set _time with collect _raw? on Getting Data In. 10-08-2018 06:24 AM
- Posted How do I set _time with collect _raw? on Getting Data In. 10-05-2018 05:29 AM
- Tagged How do I set _time with collect _raw? on Getting Data In. 10-05-2018 05:29 AM
- Tagged How do I set _time with collect _raw? on Getting Data In. 10-05-2018 05:29 AM
- Tagged How do I set _time with collect _raw? on Getting Data In. 10-05-2018 05:29 AM
- Posted Re: Multivalue field to multiple fields on Getting Data In. 04-13-2018 04:04 AM
- Posted Re: Multivalue field to multiple fields on Getting Data In. 04-12-2018 01:16 AM
- Posted Multivalue field to multiple fields on Getting Data In. 04-11-2018 06:34 AM
- Tagged Multivalue field to multiple fields on Getting Data In. 04-11-2018 06:34 AM
- Posted Multiple fields from json array on Getting Data In. 04-11-2018 06:30 AM
- Tagged Multiple fields from json array on Getting Data In. 04-11-2018 06:30 AM
Topics I've Started
Subject | Karma | Author | Latest Post |
---|---|---|---|
0 | |||
0 | |||
0 | |||
0 | |||
0 | |||
0 | |||
0 | |||
0 | |||
0 | |||
0 |
02-08-2019
05:14 AM
Splunk web framework documentation is terrible!
... View more
10-08-2018
06:24 AM
2 Karma
Thank you! I added date at begin of data "%Y-%m-%d %H:%M:%S" - it's recignized without any props defineding.
... View more
10-05-2018
05:29 AM
Hi!
I have to collect some JSON "as is" - not as key-value pair. How can I set event timestamp in this case?
... | eval _time=strptime(...) | table _time _raw | collect index="..."
... doesn't work: _time is ignored with _raw present and replaced with cirrent time. I could do:
... | eval data = _raw | table _time data | collect ...
, but it generates key-value-event with "data={my_json_from_raw}"
... View more
04-12-2018
01:16 AM
It's good idea:
eval mv1 = mvindex(temp, 0) | eval mv2 = mvindex(temp, 1) | eval mv3 = mvindex(temp, 2) | eval mv4 = mvindex(temp, 3)
, but size of value is variable and I need to create mv1..n dynamically
... View more
04-11-2018
06:34 AM
Hi!
How to split multivalue field, e.g. JSON array elements (value😞
{
"id": 4321,
"value": [
5, 6, 7, 8
]
}
.
id | value
4321 5 6 7 8
to multiple fileds with some index remaining one event:
id | value_0 | value_1 | value_2 | value_3
4321 5 6 7 8
Thank you!
... View more
- Tags:
- splunk-enterprise
04-11-2018
06:30 AM
Hi!
How to split JSON array elements (value)
{
"id": 4321,
"value": [
5, 6, 7, 8
]
}
from multivalue field:
id | value
4321 5 6 7 8
to multiple fileds with some index remaining one event:
id | value_0 | value_1 | value_2 | value_3
4321 5 6 7 8
Thank you!
... View more
- Tags:
- splunk-enterprise
11-02-2017
04:48 AM
2 Karma
Found solution:
TIME_PREFIX=<year>
TIME_FORMAT=%Y</year>%n<month>%m</month>%n<day>%d</day>%n<hour>%H</hour>%n<minute>%M</minute>%n<second>%S</second>
Problem was
1) that for normal timestamp recognition strptime() (func that works behind it) needs at minimum year+month+day for this.
2) "%n" should be used for new line instead of "[\r\n]+"
... View more
09-28-2017
05:07 AM
Sorry, it was an additional x=y line. No line is drawing while I'm disable this option:
http://oi66.tinypic.com/2dl7rq8.jpg
... View more
09-28-2017
01:04 AM
Thank you for reply! I installed ML toolkit and now scatter line chart is available.
... | table TIME RT
TIME RT
3.03 3.03
3.97 0.94
5.99 2.02
...
52.79 4.33
56.24 3.45
57.57 1.33
It's reaction time of patient during some one minute long medical test. Regular line chart for this data looks like:
https://preview.ibb.co/iP6TB5/28_09_2017_10_54_29.png
But regression looks strange:
https://preview.ibb.co/gj0zJk/28_09_2017_10_54_58.png
It seems regression is based on only first X-Y values. If I'm inverting X and Y ( ... | table RT TIME) nothing changes:
https://preview.ibb.co/i23rW5/28_09_2017_10_55_24.png
... View more
09-27-2017
04:00 AM
Hi!
Is there any way to make trend line for scatter plot like this:
Scatter plot matrix has this option, but I need single chart. Also I found article about implementation of linear regression for splunk (https://wiki.splunk.com/Community:Plotting_a_linear_trendline) but actual data in it looks like regular line chart - not scatter
... View more
07-04-2017
02:53 AM
Hi!
...
| streamstats count as SESSION by PATIENT_ID PROGRAM_NAME
| chart values(AVG_RT) over SESSION by PROGRAM_NAME limit=0
SESSION 0 A 1 A-Rhythmical 2 Inhibition 3 Diff inhibition 4 Shifting 5 Attention
__________________________________________________________________________________________________
1 0.76 0.75 0.76 1.80 1.03 0.96
0.77 0.79 1.84 1.05 1.02
0.80 0.80 1.09 1.19
0.82 0.82 1.27
0.83 0.79 1.30
1.31
2 0.79 0.78 ...
0.75
"0 A", "1 A-Rhythmical" are PROGRAM_NAMEs i.e. the name of these fields are variable. I would like to get average of its multivalues for each program name by SESSION:
SESSION 0 A 1 A-Rhythmical 2 Inhibition 3 Diff inhibition 4 Shifting 5 Attention
__________________________________________________________________________________________________
1 0.76 0.79 0.79 1.82 1.06 1.16
2 0.79 0.77 ...
... View more
- Tags:
- splunk-enterprise
06-30-2017
02:57 AM
Thx for reply!
index="dynavision"
| spath
| eval EXAM_TYPE = ...
| eval PATIENT_ID = ...
| rex max_match=0 "\"rt[\d]+\":\s\"(?<RT>[\d\.]+)\""
| mvexpand(RT)
| stats avg(RT) as AVG_RT by _time PATIENT_ID EXAM_TYPE
| eval AVG_RT = round(AVG_RT, 2)
| sort _time
| table _time PATIENT_ID EXAM_TYPE AVG_RT
2016-02-29 04:25:00 998097 *A 1.90
2016-02-29 04:26:32 998097 programm stradaniy levoi ruki 2 1.60
2016-02-29 04:28:34 998097 *B 1 Sec Fast 0.74
2016-02-29 05:15:38 762888 *A 2.06
2016-02-29 05:17:15 762888 *B 1 Sec Fast 0.83
2016-02-29 05:19:01 762888 programm stradaniy levoi ruki 2.06
2016-02-29 06:11:04 547662 small1 2.04
2016-02-29 06:13:14 547662 small1 1.61
2016-02-29 06:17:44 547662 8 1.80
2016-03-03 08:20:20 221439 *A 0.98
2016-03-03 08:22:14 221439 programm stradaniy levoi ruki 1.21
I need chart: average reaction time by session for each exam_type. Session is serial number each day of exam. For expl:
SESSION _time PATIENT_ID EXAM_TYPE
1 2016-01-01 1 A
2 2016-01-03 1 A
1 2016-01-03 2 A
2 2016-01-05 2 A
1 2016-01-07 1 B
2 2016-01-08 1 B
3 2016-01-11 1 A
3 2016-01-12 2 A
... View more
06-29-2017
05:48 AM
Hi!
_time | id | exam_type | avg_reaction_time
Patients pass several types of exams (exam_a, exam_b, exam_c...). Exams that take place in one day considered as one session.
| eval DAY = strftime(_time, "%Y%m%d")
| stats avg(avg_reaction_time) as AVG_RT_DAY by DAY
I'm trying to get a chart of avg_reaction_times (Abscissa) for an individual exam_type by sessions (Ordinate) for defined exam types.
Having variable EXAM_TYPE_REQ = "exam_a exam_b exam_c" (getting from form) I thought about foreach for each of them.
... View more
- Tags:
- splunk-enterprise
06-22-2017
05:30 AM
I solved this using token prefix-postfix:
<prefix>| where dropdown_param = "</prefix>
<suffix>"</suffix>
and blank as default value.
Thank you all!
... View more
06-21-2017
11:52 PM
Hi!
On my dashboard there is the dropdown list. I want to exlude its token criteria from search query if default value "notdef" is selected. i.e.:
if("$dropdown_token$" == "notdef")
| WHERE param1 = $param1_token$ AND param2 = $param2_token$
else
| WHERE param1 = $param1_token$ AND param2 = $param2_token$ AND dropdown_param = $dropdown_token$
I tried to use match replaceing "notdef" by empty sting while "notdef" is selected:
| eval dropdown_req = if("$dropdown_token$" == "notdef", "", "$dropdown_token$")
| WHERE param1 = $param1_token$ AND param2 = $param2_token$ AND match(dropdown_param, dropdown_req)
, but values of $dropdown_token$ include the sign "*" (e.g. "*A") and it doesn't work in regex in match().
Thank you!
... View more
06-21-2017
02:07 AM
Hi!
I have two indexes: patients and examination
patients: | id name | gender | date_of_birth |
examination: | user_id | exam_type |
How could I get a table of all examinations for males?
Thank you!
... View more
06-01-2017
01:24 AM
Thank you!
... View more
05-31-2017
04:43 AM
Found something:
index="dynavision" | eval rt_sum = 0 | eval rt_count = 0 | foreach modeBdata.red.reactiontimes.rt* [eval rt_count = rt_count + 1 | eval rt_sum = rt_sum + '<<FIELD>>' ] | eval rt_avg = rt_sum / rt_count
But it seems works only for first event((
... View more
05-31-2017
12:36 AM
Hi!
I have XML-events with different name values:
<reactiontimes>
<rt1>1.42</rt1>
<rt2>1.31</rt2>
<rt3>1.33</rt3>
...
<rtN>X.XX</rtN>
</ractiontimes>
How can I get AVG of rt* for each event?
Thank you!
... View more
05-30-2017
03:14 AM
Hi!
Find same issue but Unfortunatelly doesn't work for me.
<?xml version="1.0" encoding="utf-8" ?>
<DynavisionXML version="1.1">
<name>Fname, Sname</name>
<email></email>
<ID></ID>
<startdatetime>
<year>2016</year>
<month>3</month>
<day>4</day>
<hour>4</hour>
<minute>54</minute>
<second>55</second>
</startdatetime>
...
</DynavisionXML>
Timestamp specification:
MAX_TIMESTAMP_LOOKAHEAD=105
TIME_PREFIX=\<year\>
TIME_FORMAT=%Y\<\/year\>[\r\n\s]+\<month\>%m\<\/month\>[\r\n\s]+\<day\>%d\<\/day\>[\r\n\s]+\<hour\>%H\<\/hour\>[\r\n\s]+\<minute\>%M\<\/minute\>[\r\n\s]+\<second\>%S\<\/second\>
But Splunk returns an error:
Could not use strptime to parse timestamp from
'2016\r\n3\r\n4\r\n4\r\n54\r\n55'
Thank you!
... View more