No, I fear not, it's just another type of lookup, but you still wouldn't be able to make automatic.
Well, you could try to insert that information at index time, but then it's fixed, i.e. it's written to the index and can't be changed later on (without running a lookup again to overwrite that value).
Where are you getting your data from, what is your data source? Maybe you can preprocess it before indexing to add that information there?
... View more
Splunk does not (yet?) support automatic lookups on metrics data. I guess this is because you never get to see distinct events, but only statistical aggregations of that data, so you can't do index=yourmetricsindex and see all the events in there.
You can however do a manual lookup after your first metrics command, like this
| mstats WHERE index=mymetricdata AND metric_name=cpu_util BY host
| lookup hostlist.csv host OUTPUT servergroup
But - you need to do this manually in your searches, it can't be automated. I'd recommend putting this into a macro and using that macro in your searches, for easier management.
... View more
Hey, so you created a script (something.ps1) and put that into the bin directory of your app, then created a scripted input that refers to that filename? Or did you put the script itself right into the input? Can you maybe show some screenshots or copy-paste the actual script ans inputs.conf?
You might want to take a look at the Powershell add on for Splunk - check this out:
https://splunkbase.splunk.com/app/1477/
... View more
Okay, your connections time out. In 99% of all cases, this is a firewall related problem, because firewalls tend to silently drop requests that are not allowed, creating timeouts when trying to connect.
You should check with your network security people, they're most likely able to help you.
... View more
DB Connect recognizes data types in the columns, however data in Splunk is always indexed as a string, therefore the original data type doesn't matter. The string "123" uses as much space/license as the integer 123.
Only when data is ingested into one of the new metrics indexes, it's saved as a numeric value, as metrics indexes only allow for numbers. The license usage on metrics indexes however is fixed on 150 bytes per event, therefore the stored data size doesn't matter for license usage.
Hope that helps - if it does I'd be happy if you would upvote/accept this answer, so others could profit from it. 🙂
... View more
You could try it like this:
index=whatever your-search-terms
| transaction 52634 startswith=eval(isnotnull(cs_uri_query)) endswith=eval(like(cs_method, "POST"))
You might need to fine tune the transaction, find more details here: transaction docs
... View more
Good message:
It's a known issue, it's been tested, verified and logged into the issue tracker.
It's not on purpose or anything, but seems to be a bug that only hits the combination of realtime, 7.1 and free license.
Bad message:
Seems there is no workaround or fix yet.
... View more
Port 8884 isn't any default port used by Splunk in any way. Just to make sure I searched the docs and Google for it, but there is absolutely zero about it (as you might already have noticed).
I'd search through all .conf files on the affected servers for the string "8884" - it must be mentioned anywhere.
Did you, by any chance, install a certain add-on or app that might have opened that port?
You could also do this from the CLI: splunk btool inputs list and check the output for 8884 anywhere.
Besides that, I'm a little out of ideas on this.
... View more
Your search should most likely look like this:
index=* sourcetype="*WinEventLog:Security" (4624 OR 4647 OR 4648 OR 551 OR 552 OR 540 OR 528 OR 4768 OR 4769 OR 4770 OR 4771 OR 4768 OR 4774 OR 4776 OR 4778 OR 4779 OR 672 OR 673 OR 674 OR 675 OR 678 OR 680 OR 682 OR 683) (EventCode=4624 OR EventCode=4647 OR EventCode=4648 OR EventCode=551 OR EventCode=552 OR EventCode=540 OR EventCode=528 OR EventCode=4768 OR EventCode=4769 OR EventCode=4770 OR EventCode=4771 OR EventCode=4768 OR EventCode=4774 OR EventCode=4776 OR EventCode=4778 OR EventCode=4779 OR EventCode=672 OR EventCode=673 OR EventCode=674 OR EventCode=675 OR EventCode=678 OR EventCode=680 OR EventCode=682 OR EventCode=683)
| lookup windows_event_lookup.csv EventID AS EventCode OUTPUT Event_Desc
| table user Event_Desc
Putting the search parameters in the first line will make Splunk fetch only those relevant events from the beginning, and also only do the lookup on those events instead of all events. Twice the performance improvement.
The thing about EventCode/EventID being twisted has already been said by others. 😉
... View more
Basically - the initial sourcetype determines the props.conf rules that are being applied to the data at index time.
Therefore, you can rewrite the sourcetype at index-time, but Splunk will not use index-time rules for that new sourcetype. It will however use search-time rules for that new sourcetype.
Therefore, you either need to get data in with the right sourcetype from the very beginning - best practice is not to let Splunk receive on port 514, but a syslog server like syslog-ng, that writes the data to disk, split by hostname/IP of sender.
You can then built proper file monitors for every device and assign them the proper sourcetype. 🙂
... View more
Yeah, that's right, if it does index-time stuff, that won't happen, because the rules that are applied are only determined once for the very first sourcetype that the data is ingested with. You can rewrite the sourcetype at index-time, but it won't use the new sourcetype's props rules - so yeah, it doesn't fix your problem.
In that case, writing that stuff to disk and using proper file monitors seems to be the only way to do it right.
... View more
@Yorokobi is right - if you add the HFs as search peers on your Monitoring console, the MC will contact them via port 8089 and you can use it's built-in alert to get a notification when one of them goes down. Actually works for all Splunk instances, be they indexers, search heads, HFs...
... View more
There is no built-in mechanism in Splunk that allows you to urldecode() before writing to an index, so you can't easily manipulate it like this.
You can either stick with the "Decode during search time" approach, but that might making fast searches impossible because the data is simply written to index encoded.
Preprocessing would mean running a scripted input, or something like this. The script would have to ingest the data, urldecode it, and then output it, so Splunk gets the proper data. If the encoded data is important to your use case, that's the way I would go. 🙂
... View more
To build a proper regex, you need to describe your data properly, it has to have some reliable characteristics.
With your example above, multiple characteristics are possible, but without further example data it's hard to find those similarities.
This is an example: ^[^:]+:[^:]+:(?<yourfield>[^:]+:)
This one would assume that there is always to parts in that field, seperated by : , and the value you want to extract is between the second and third : . If that's true - here's your regex 😉
... View more
Basically - all data that comes to a certain UDP/TCP port looks the same to Splunk, so you can only give it a single sourcetype for everything that comes in.
Best practice would be to fire up a syslog server (like syslog-ng), and have it write all data to disk, split by hostname/IP.
You can then create file monitor inputs for single device, with it's own sourcetype and other settings.
There are a few examples for best practices out there, e.g. here.
If that's not possible at all, try this:
You'll have to seperate it by the only identifier you get - the hostname/IP address of the sender.
Set up a props.conf like this:
[host::your_hostname_or_IP]
TRANSFORMS-rewrite-sourcetype1 = rewrite-sourcetype1
and a transforms.conf like this:
[rewrite-sourcetype1]
FORMAT = sourcetype::fgt_log
DEST_KEY = MetaData:Sourcetype
... View more
Try this:
| makeresults
| eval host="host3.CA.domain.com"
| eval host=if(match(host, "^\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3}$"), host, replace(host, "^([^\.]+)\..*$", "\1"))
More explanation here in the docs, explanation of the regex here.
... View more
Did you try setting KV_MODE=JSON in the corresponding sourcetype in props.conf?
That should actually extract fields from JSON on it's own.
To access certain fields without changing KV_MODE, take a look at | spath here:
http://docs.splunk.com/Documentation/Splunk/6.3.3/SearchReference/Spath
... View more
Can you please add some details to your question? I don't really get what are trying to do, so maybe adding screenshots, example data etc. makes it easier to grasp it.
... View more