Activity Feed
- Karma Re: Trying to get stats output for 2 fields after the "by" for dsong555. 06-05-2020 12:50 AM
- Karma Re: How to clear search history? for horsefez. 06-05-2020 12:50 AM
- Karma Re: Help with stats count between two urls for BainM. 06-05-2020 12:50 AM
- Got Karma for Re: Trying to get stats output for 2 fields after the "by". 06-05-2020 12:50 AM
- Karma Re: After creating a custom visualization, why am I getting error "Failed to load source for Radial Meter visualization" in Splunk Web? for timpopxpop. 06-05-2020 12:48 AM
- Karma What should I add to require in my HTML dashboard in order to import my custom JS script? for Escher. 06-05-2020 12:48 AM
- Karma Re: How to use React.js Component in Splunk Dashboard ? for splunkian. 06-05-2020 12:48 AM
- Karma Re: Eval can not concatenate fields where there is a null value for Rob. 06-05-2020 12:46 AM
- Karma Re: Eval can not concatenate fields where there is a null value for dwaddle. 06-05-2020 12:46 AM
- Posted Re: Is it possible to make a pie chart with pre calculated percentage values? on Splunk Search. 12-12-2019 12:23 PM
- Posted Re: Help with stats count between two urls on Splunk Search. 12-12-2019 11:52 AM
- Posted Re: What should I add to require in my HTML dashboard in order to import my custom JS script? on Dashboards & Visualizations. 05-23-2019 10:55 AM
- Posted Re: Trying to get stats output for 2 fields after the "by" on Splunk Search. 05-23-2019 10:39 AM
- Posted Re: Trying to get stats output for 2 fields after the "by" on Splunk Search. 05-22-2019 03:23 PM
- Posted Re: Splunk summary index script automation on Knowledge Management. 05-22-2019 03:20 PM
- Posted Re: Splunk replaces zero with null values. Chart Avg(value) omits all those null values, with this avg result is not correct. How to fix this? on Splunk Search. 05-22-2019 02:32 PM
- Posted Re: What should I add to require in my HTML dashboard in order to import my custom JS script? on Dashboards & Visualizations. 05-22-2019 02:02 PM
- Posted Re: force refresh of dropdown dynamic options on Dashboards & Visualizations. 05-22-2019 01:49 PM
- Posted Re: How to use React.js Component in Splunk Dashboard ? on Splunk Dev. 05-09-2019 11:54 AM
- Posted ITSI HTML Email Action on Splunk ITSI. 04-15-2019 09:25 AM
Topics I've Started
Subject | Karma | Author | Latest Post |
---|---|---|---|
0 |
12-12-2019
12:23 PM
Is this sort of what you're looking for?
| makeresults | eval PercentTimeOnPrem = 50 | eval PercentTimeOffPrem = 25 | eval PercentTimeOnVPN = 15 | eval PercentTimeIdle=10 | fields - _time | stats values(PercentTimeOnPrem) as "Percent in Office" values(PercentTimeOffPrem) as "Percent Out of Office" values(PercentTimeIdle) as "Percent Time Idle" values(PercentTimeOnVPN) as "Percent on VPN"| transpose
To have a pie chart, all you need is too columns. One with labels and one with values.
Your stats table should look like this:
Label | Value
~~~~
Percent in Office | 50
Percent Out of Office | 25
Percent Time Idle | 10
Percent on VPN | 15
... View more
12-12-2019
11:52 AM
Upvote BainM's answer on the transaction command. It is super helpful if you have a common identifier across events that you want to group together. You can get delta information about the time between the different events in the same transaction along with the event count which is what I think you're looking for.
... View more
05-23-2019
10:55 AM
@Escher Is this what you were looking for?
... View more
05-22-2019
03:23 PM
1 Karma
You should just be able to do :
sourcetype="sourcetype1"| where event="yes" | eval aTotal=if(myField="a", 1, 0) | eval bTotal=if(myField="b", 1, 0) | eval cTotal=if(myField="c", 1, 0) | stats sum(aTotal) as A, sum(bTotal) as B, sum(cTotal) as C by "myHost", "myCategory"
... View more
05-22-2019
03:20 PM
If you have to do a linux cron job, put the command in place using crontab. Your schedule should look something like this.
https://crontab.guru/#0_21_*_*_*
... View more
05-22-2019
02:32 PM
This is also relevant if you don't want to use the fillnull command. There's an option in the visualization tab.
https://answers.splunk.com/answers/474799/how-to-delete-data-points-with-null-values-by-host.html
... View more
05-22-2019
02:02 PM
So it should look something like this:
Javascript: my_script.js
require([
'underscore',
'jquery',
'backbone',
'../app/my_app/components/myComponent',
'splunkjs/mvc',
'splunkjs/mvc/simplexml/ready!'
], function (_,$,Backbone, myComponent, mvc) {
#Use your component
var my_comp = new myComponent();
my_comp.doStuff();
});
XML:
<form script="my_script.js">
...
</form>
... View more
05-22-2019
01:49 PM
There's a couple ways you can do this. You can use tokens and the "depends" attribute in simplexml. This will run a search any time all of the tokens defined in the "depends" list are specified. You would basically include the token value in your search that populates the lookup. I haven't tested the below, but it should be something similar to this. If you're feeling bold, you can add a custom javascript file to your simplexml dashboard and create your dropdown there with a search manager. It will work the same way with tokens as well.
<input type="text" token="my_token_to_add">
<label>sourcetype</label>
<default></default>
<initialValue>splunkd</initialValue>
</input>
<input type="dropdown" depends="$my_token_to_add$" searchWhenChanged="true">
<label>My Label</label>
<search>
<query> index=_internal | eval myfield="$my_token_to_add$" | outputlookup my_lookup append=true</query>
<earliest>-5m</earliest>
<latest>now</latest>
</search>
</input>
As a side note, you can also add this value in the form itself to refresh periodically.
<form refresh="30">
....
</form>
... View more
05-09-2019
11:54 AM
So are you able to actually leverage npm and node in development for Splunk? I've noticed there's a node instance in the bin directory that you can run using ./splunk cmd node
I'm very interested in learning how to do this if you could offer any advice.
... View more
04-15-2019
09:25 AM
Hi All,
Is it possible to actually put HTML tags in the message? I've seen some other threads that say you need to modify the underlying code for the email action, but that seems crazy that the Type says HTML & Plain Text if you can't actually have HTML in there. Whenever I've tried it, it just prints the literal text of the html without interpreting it.
Example:
Config:
Message:
<b>This is my field</b>
Output:
<b>This is my field</b>
Desired Output:
This is my field
Is there a way to do this without creating a custom action to send a custom formatted email?
Thanks!
... View more