what results do you get if you change your first search to: earliest=-7d latest=-2h sourcetype=x status=fatal | search type=delta | ctable type status
... View more
Timechart has an option that does exactly this, and it's called "minspan", and it was created precisely for summarized data:
... | timechart minspan=10m count
This will have bins that are at least 10m, but perhaps wider, depending on the timerange of the search. This option is compatible with bins, but not span, which is explicit.
... View more
Your best bet is to use the "head" command which can take a predicate instead of an absolute count.
For example, the following search only takes (all of) the events from the most recent second from index=_internal:
index=_internal | streamstats dc(_time) as dc_time | head dc_time==1
... View more
The most straightforward way is to use append:
... | stats count avg(field1) avg(field2) | append [search ... | stats count avg(field1) avg(field2)] | append [search ...] | ...
However, this isn't necessarily the most efficient.
Assuming that your initial search part is very simple, you can do something like:
(foo=A ...) OR (foo=B ...) OR (foo=C ...) | stats count avg(field1) avg(field2) by foo | fields - foo
Now, you may not have a field that cleanly splits the events. In that case you could use eval to synthesize one:
(<search A>) OR (<search B>) OR (<search C>) | eval foo = case(searchmatch("<search A>"), "A", ...) | stats count avg(field1) avg(field2) by foo | fields - foo
... View more
By default, for sourcetype=syslog, the host field will be extracted by regex from the event itself, which overwrites the host from the connection (that's set by this connection_host directive).
The easiest way to defeat this behavior is to choose a sourcetype other than syslog.
... View more
Yes, the separate stanza should take precedence for inputs that match its pattern. You must also include either the host regex or, more simply, host=10.1.1.2. It will not be inherited. There will not be data duplication. We map each input file to a single stanza. Enabling DEBUG logging of TailingProcessor should help you see what file input is doing in this case.
... View more
An explicit sourcetype in the stanza of inputs.conf should always override the source->sourcetype mapping in props.conf. Removing the inputs.conf configuration will make the props.conf configuration take effect.
Another way to fix this is to add another stanza to inputs.conf to monitor /log/syslog-ng/10.1.1.2-*.log and add the sourcetype= directive there. As of 4.1, inputs.conf supports configurations like this.
... View more
For export, output_mode=csv is a new addition to 4.2. You will have to upgrade to get this. You can replace export with "oneshot" to get csv out in 4.1.x.
... View more
You have at least one problem here with your POST. You have to escape the = with %3d in the sourcetype=...
Could you try:
curl -u admin:changeme -k https://localhost:8089/services/search/jobs -d'search=search sourcetype%3d"estore-om_app" com.symantec.ecom.ep.service.misc.impl.SymEpDataCenterServiceImpl'
You can also try the "export" mode:
curl -u admin:changeme -k https://localhost:8089/services/search/jobs/export -d'search=search sourcetype%3d"estore-om_app" com.symantec.ecom.ep.service.misc.impl.SymEpDataCenterServiceImpl'
This gives you the results directly. If you want CSV out, you can run this as:
curl -u admin:changeme -k https://localhost:8089/services/search/jobs/export -d'search=search sourcetype%3d"estore-om_app" com.symantec.ecom.ep.service.misc.impl.SymEpDataCenterServiceImpl&output_mode=csv'
... View more
You can use the SEDCMD configuration in props.conf to replace whitespace.
http://www.splunk.com/base/Documentation/4.2/Data/Anonymizedatawithsed
... View more
The output of a subsearch is a valid search expression that will match an event when it matches all the fields of any of the rows of the subsearch. So, if your subsearch only emits a single field, nonce , then it will yield a search expression like: nonce=row_1_nonce OR nonce=row_2_nonce OR ... .
With this you can compose your search like:
sourcetype="log4j" source="*server*"
| rex field=_raw "nonce created : (?<nonce>[0-9a-z-]*)"
| transaction thread startswith="startTx" endswith="closeTx"
| search [search sourcetype="log4j" failed nonce
| rex field=_raw "Failed with nonce (?<nonce>[0-9a-z-]*)"
| dedup nonce
| fields nonce]
... View more
You should probably file a support case to track this issue, as it sounds like a bug. You could try disabling JS/CSS minification by adding the following to $SPLUNK_HOME/etc/system/local/web.conf :
[settings]
minify_js = false
minify_css = false
... View more
It's trickier to apply the standard definition of entropy to a single string, and even harder to use Splunk to compute it. Writing your own search command is probably the best approach.
... View more
It looks like this is happening inthe javascript minification code path. You may want to try disabling this (and CSS minification) in etc/system/local/web.conf. In ansy case, this looks like a bug that you should file with Splunk Support.
... View more
Entropy wouldn't be a eval function since it requires all values of the field, not the value for a single event. Here would be how you'd calculate it using aggregating commands:
... | stats count as somefield_count by somefield
| eventstats sum(somefield_count) as somefield_total
| eval somefield_plogp = -1*log(somefield_count/somefield_total)*somefield_count/somefield_total
| stats sum(somefield_plogp) as entropy
... View more
I'm pretty sure that's how it has always behaved. To get more series, you need to use the limit argument like:
* | timechart span=1h count by splunk_server limit=100
... View more