Activity Feed
- Got Karma for How to optimize a search performance of a slow, composite search. 11-18-2020 04:52 AM
- Got Karma for How to optimize a search performance of a slow, composite search. 06-05-2020 12:47 AM
- Got Karma for How to optimize a search performance of a slow, composite search. 06-05-2020 12:47 AM
- Got Karma for How to optimize a search performance of a slow, composite search. 06-05-2020 12:47 AM
- Got Karma for Is it possible to get the time it took to search from a SearchManager?. 06-05-2020 12:47 AM
- Got Karma for Re: Is it possible to get the time it took to search from a SearchManager?. 06-05-2020 12:47 AM
- Posted Re: How to optimize a search performance of a slow, composite search on Splunk Search. 01-28-2015 10:20 AM
- Posted Re: How to optimize a search performance of a slow, composite search on Splunk Search. 01-28-2015 02:44 AM
- Posted Re: How to optimize a search performance of a slow, composite search on Splunk Search. 01-28-2015 02:32 AM
- Posted How to optimize a search performance of a slow, composite search on Splunk Search. 01-27-2015 10:22 AM
- Tagged How to optimize a search performance of a slow, composite search on Splunk Search. 01-27-2015 10:22 AM
- Tagged How to optimize a search performance of a slow, composite search on Splunk Search. 01-27-2015 10:22 AM
- Tagged How to optimize a search performance of a slow, composite search on Splunk Search. 01-27-2015 10:22 AM
- Tagged How to optimize a search performance of a slow, composite search on Splunk Search. 01-27-2015 10:22 AM
- Tagged How to optimize a search performance of a slow, composite search on Splunk Search. 01-27-2015 10:22 AM
- Posted Re: Is it possible to send host grouping information from a forwarder? on Getting Data In. 01-16-2015 06:52 AM
- Posted Re: Is it possible to set monitor paths dynamically without the use of wildcards? on Getting Data In. 01-15-2015 10:37 AM
- Posted Re: Is it possible to set monitor paths dynamically without the use of wildcards? on Getting Data In. 01-15-2015 10:27 AM
- Posted Is it possible to set monitor paths dynamically without the use of wildcards? on Getting Data In. 01-15-2015 10:09 AM
- Tagged Is it possible to set monitor paths dynamically without the use of wildcards? on Getting Data In. 01-15-2015 10:09 AM
Topics I've Started
Subject | Karma | Author | Latest Post |
---|---|---|---|
4 | |||
0 | |||
0 | |||
0 | |||
1 |
01-28-2015
10:20 AM
I did read up on multisearch, but it seems it would collide with the dedups and transactions, right?
... View more
01-28-2015
02:44 AM
Sounds reasonable 🙂
Inspection of the first part of the search looks like this:
... View more
01-28-2015
02:32 AM
From my minimal understanding of Splunk internals: Wouldn't APPENDing the results from 2 searches be cheaper than a SET (UNION) operation? But we'll check that, should be easy enough.
"Summary Index", I think that might be where we're heading. Thanks!
... View more
01-27-2015
10:22 AM
4 Karma
I'd like to have some opinions on the following search. We're not thrilled with it's performance, and I'm sure theres a lot of potential to improve it.
What is the search supposed to do: This is a kind of "service check", on each server we're checking CPU, memory and the disk space. The data comes from different indexes, needs different result calculation and so on. So our approach was to use append quite heavily, basically constructing different searches with the same result fields, that we could combine and put into the same table. The search is limited to look only for data within the last 5 minutes. It is used within an app that uses the Javascript framework, all $parameters$ defaulting to "*".
The search inspector says "This search has completed and has returned 19 results by scanning 25,204 events in 85.338 seconds." The components taking the most time are:
1. dispatch.evaluate.append
2. command.transaction
3. command.search
4. dispatch.stream.remote
5. dispatch.fetch
Any general remarks or hints on inspection and improvement strategies for searches are highly appreciated. Thanks!
There it is (I cut a lot of evals):
search host="$filterHost$" host_category="build-servers" host_group="$filterHostGroup$" index="perfmon" (object="LogicalDisk" (instance = "C:" OR instance ="D:") (counter="% Free Space" OR counter="Free Megabytes")) OR (object="Processor" counter="% Processor Time" instance="_Total")
| 2x eval ..
| eval transactionKey="" + host + ":" + instance + ":" + _time
| transaction maxevents=4 transactionKey
| eval dedupKey=host + ":" + instance
| dedup dedupKey sortby -_time
| 12x eval
| append [
search host="$filterHost$" host_category="build-servers" host_group="$filterHostGroup$" index=perfmon sourcetype="base_pagefile"
| dedup host sortby -_time
| rex field=_raw max_match=0 "AllocatedBaseSize=(?<alloc>.*)"
| rex max_match=0 field=_raw "CurrentUsage=(?<usage>.*)"
| eval tmpCounter=mvcount(alloc)
| stats max(tmpCounter) sum(alloc) as Total, sum(usage) as Used by _time, host
| 9x eval
]
| append [
search index="os" host="$filterHost$" host_category="build-servers" host_group="$filterHostGroup$"
(source=df (MountedOn=/ OR MountedOn=/tmp OR MountedOn=/data OR MountedOn=/net/x OR MountedOn=/mnt/y OR MountedOn=/mnt/z OR MountedOn=/mnt/w))
OR (source=cpu CPU="all")
OR (sourcetype="vmstat")
| eval 2x
| dedup dedupKey sortby -_time
| 14x eval
]
| append [
search index="perfmon" sourcetype="base_systeminfo" host="$filterHost$" host_category="build-servers" host_group="$filterHostGroup$"
| dedup host sortby -_time
| eval 9x
]
| search $filterStatus$ service="$filterService$"
| eval statusNumber=case(status=="CRITICAL", 0, status=="WARNING", 1, status=="OK", 2)
| sort statusNumber -host, -service
| eval "Last Check"=strftime(_time, "%F %T")
| rename host as "Host" service as "Service" status as "Status" value AS "Description"
| table Host Service Status "Description" "Last Check"
... View more
01-16-2015
06:52 AM
I almost suspected that. Thanks for summarizing my options ... "host" and "source" won't work because those are outside my jurisdiction (I don't own the monitorees) and I agree, abusing "sourcetype" for that purpose would harm "sourcetype" as a more or less well-known concept in my Splunk deployment.
... View more
01-15-2015
10:37 AM
Very interesting attributes, thanks! But I'm afraid it's the other way round: With those attributes it seems I can extract the host value from the source field, while instead I need to construct a path from a given host. But I'm wondering ... maybe I could approach my problem differently using those attributes -- I guess I'll have to do some experimenting. Thanks for the inspiration though.
... View more
01-15-2015
10:27 AM
Unfortunately not. We have a deployment server and we want to deploy the app without having to do additional editing in any of the forwarder's local/inputs.conf .
... View more
01-15-2015
10:09 AM
I want to create an app that will be deployed on a few forwarders to monitor log files. Problem is with the paths of these log files. They contain the host name (e.g. /path/<hostname>/logfile.log ). I don't want to create an individual app for each host and I can not use wildcards, because defining /path/*/logfile.log in the inputs.conf would bring up a lot of unwanted data - unfortunately, other server's log directories are mounted too. I know that in a configuration stanza I can use $SPLUNK_HOME, so my question is: Is there a way to use variables in the configuration, like
[monitor:///path/$HOSTNAME/logfile.log]
... View more
01-15-2015
09:46 AM
In an inputs.conf I can define a forwarder's host field which I can use in searches. Identifying a single host is not always enough, e.g., we have build servers, source code management servers, filers etc. to monitor - a kind of grouping would come in handy in order to limit searches to a certain group of hosts. We could do that by maintaining lists and using them as look-ups, but I was wondering whether there's the possibility to achieve that on the forwarder with just configuration. Example:
inputs.conf on host A:
host=hosta
group=build_servers
inputs.conf on host B:
host=hostb
group=git_servers
I want to be able to search for something like search host=* group="build_servers" sourcetype="df" ... | ...
Is there a way to do this?
... View more
12-06-2014
05:59 AM
1 Karma
I was looking for a way to do it in JS. But thanks anyway. Just for the record, finally I came up with this, which is exactly what I needed:
searchManager.on('search:done', function(properties) {
var duration = properties.content.runDuration;
// ...
... View more
11-21-2014
09:40 AM
We're not sure whether it's safe to use the deployment server feature for all our apps, especially those with lookup files.
We want to deploy an app that has several lookup files as csv in its $appname/lookups/ directory. These apps will be rolled out to several search heads. On the search heads the csv files will be updated with data regularly.
Will there be a redeployment once the search head phones home to the deployment server, thus overwriting the csv? When and how is the check sum of the deployed app computed?
Thanks!
... View more
11-19-2014
11:00 AM
1 Karma
I'm coding some custom dashboards and I have javascript code:
var searchMan = new SearchManager({
"id": "search",
"search": mvc.tokenSafe('*'),
"earliest_time": "-10m@m",
"latest_time": "now",
"preview": true,
"cache": false,
"autostart": false
});
var res = searchMan.data("results");
res.on("data", function() {
console.log(res.data());
});
How do I fetch the time it took Splunk to search from res?
Any help appreciated, thanks!
... View more