Activity Feed
- Karma Re: Why is the S.o.S - Splunk on Splunk auditd.service giving errors when running rlog.sh in the Splunk Add-on for Unix and Linux? for elvisior. 06-05-2020 12:47 AM
- Got Karma for Re: Why am I unable to change this datetime string to a time formatted field?. 06-05-2020 12:47 AM
- Karma Re: Real Time search for Today() for Ayn. 06-05-2020 12:46 AM
- Karma Re: How do I reload csv lookup files? for bmunson_splunk. 06-05-2020 12:46 AM
- Got Karma for Re: What is the complete list of tokens available for the message in the new 6.1 alerts. 06-05-2020 12:46 AM
- Got Karma for Re: What is the complete list of tokens available for the message in the new 6.1 alerts. 06-05-2020 12:46 AM
- Karma Re: After upgrade to 4.2 the Events from Windows Eventslogs are partially not working, lines broken at random positions for Ellen. 06-05-2020 12:45 AM
- Got Karma for Windows Event Log collection via Microsoft SCOM 2007?. 06-05-2020 12:45 AM
- Got Karma for Windows Event Log collection via Microsoft SCOM 2007?. 06-05-2020 12:45 AM
- Got Karma for Re: Windows Event Log collection via Microsoft SCOM 2007?. 06-05-2020 12:45 AM
- Got Karma for Re: REGEX problem transforms.conf WinEventLog:Security. 06-05-2020 12:45 AM
- Posted Re: What is the complete list of tokens available for the message in the new 6.1 alerts on Alerting. 08-10-2017 04:33 AM
- Posted Re: What is the complete list of tokens available for the message in the new 6.1 alerts on Alerting. 08-10-2017 04:32 AM
- Posted Re: I cannot connect to splunk after downloading and installing the Splunk for Excel Export app. on All Apps and Add-ons. 07-18-2017 06:20 AM
- Posted Re: Why am I unable to change this datetime string to a time formatted field? on Splunk Search. 12-14-2015 09:00 AM
- Posted Re: Why am I unable to change this datetime string to a time formatted field? on Splunk Search. 12-14-2015 02:37 AM
- Posted Graphing windows system from uptime to downtime on Splunk Search. 07-03-2014 11:58 AM
- Tagged Graphing windows system from uptime to downtime on Splunk Search. 07-03-2014 11:58 AM
- Tagged Graphing windows system from uptime to downtime on Splunk Search. 07-03-2014 11:58 AM
- Posted Re: How do I reload csv lookup files? on Splunk Search. 07-25-2013 07:40 AM
Topics I've Started
Subject | Karma | Author | Latest Post |
---|---|---|---|
0 | |||
0 | |||
0 | |||
2 |
08-10-2017
04:33 AM
This link now redirects to the main splunk doc page.
... View more
08-10-2017
04:32 AM
2 Karma
In case anyone else's search brings them here first - the new token documentation is here: http://docs.splunk.com/Documentation/Splunk/6.6.2/Alert/EmailNotificationTokens
... View more
07-18-2017
06:20 AM
Check the splunk log for errors:
\opt\splunk\var\log\splunk\splunkd.log
... View more
12-14-2015
09:00 AM
Ah! Looks like it was fixed in 2008 R2. So now there are 2 different timestamp formats in the logs.
e.g.
Message=The system time has changed to ?2015?-?12?-?13T13:28:07.492000000Z from ?2015?-?12?-?13T13:18:04.893874600Z.
and
Message=The system time has changed to 2015-12-12T09:09:14.198Z from 2015-12-12T09:09:14.198Z.
So here is my fixed rex (only to the second - decided not to bother with milliseconds):
.*to\D+(?<StartYear>\d+)\D+(?<StartMonth>\d+)\D+(?<StartDay>\d+)T(?<StartTime>[^.]+).* from\D+(?<EndYear>\d+)\D+(?<EndMonth>\d+)\D+(?<EndDay>\d+)T(?<EndTime>[^.]+)
Here is the full search:
source="WinEventLog:System" "system time has changed" | rex field=Message ".*to\D+(?<StartYear>\d+)\D+(?<StartMonth>\d+)\D+(?<StartDay>\d+)T(?<StartTime>[^.]+).* from\D+(?<EndYear>\d+)\D+(?<EndMonth>\d+)\D+(?<EndDay>\d+)T(?<EndTime>[^.]+)" | strcat StartYear "-" StartMonth "-" StartDay "T" StartTime StartTime | strcat EndYear "-" EndMonth "-" EndDay "T" EndTime EndTime | eval StartUnix=strptime(StartTime, "%Y-%m-%dT%H:%M:%S") | eval EndUnix=strptime(EndTime, "%Y-%m-%dT%H:%M:%S") | eval TotalTime=EndUnix - StartUnix | table _time host StartTime EndTime TotalTime
... View more
12-14-2015
02:37 AM
1 Karma
I think I hit this weirdness as well - this is from Windows system event logs isn't it? I wanted to check how well (or not) our NTP system was working.
I used this search:
source="WinEventLog:System" "system time has changed" | rex field=Message ".*to (?<StartTime>[^.]+).*from (?<EndTime>[^.]+)\." | eval StartUnix=strptime(StartTime, "%Y-%m-%dT%H:%M:%S") | eval EndUnix=strptime(EndTime, "%Y-%m-%dT%H:%M:%S") | table _time host StartTime EndTime StartUnix EndUnix
However, like Lukas, the strptime wasn't doing the conversion.
Copying and pasting the text from Splunk into Notepad++ then actually the Message line is:
Message=The system time has changed to ?2015?-?12?-?13T13:28:07.492000000Z from ?2015?-?12?-?13T13:18:04.893874600Z.
Notice the hidden control codes around the date fields? What on earth were Microsoft thinking? Anyway I have a solution using the rex command.
rex field=Message ".*to \D(?<StartYear>\d+)\D-\D(?<StartMonth>\d+)\D-\D(?<StartDay>\d+)T(?<StartTime>.*)Z from \D(?<EndYear>\d+)\D-\D(?<EndMonth>\d+)\D-\D(?<EndDay>\d+)T(?<EndTime>.*)Z"
The full search string I used is:
source="WinEventLog:System" "system time has changed" | rex field=Message ".*to \D(?<StartYear>\d+)\D-\D(?<StartMonth>\d+)\D-\D(?<StartDay>\d+)T(?<StartTime>.*)Z from \D(?<EndYear>\d+)\D-\D(?<EndMonth>\d+)\D-\D(?<EndDay>\d+)T(?<EndTime>.*)Z" | strcat StartYear "-" StartMonth "-" StartDay "T" StartTime StartTime | strcat EndYear "-" EndMonth "-" EndDay "T" EndTime EndTime | eval StartUnix=strptime(StartTime, "%Y-%m-%dT%H:%M:%S.%9N") | eval EndUnix=strptime(EndTime, "%Y-%m-%dT%H:%M:%S.%9N") | eval TotalTime=EndUnix - StartUnix | table _time host StartTime EndTime StartUnix EndUnix TotalTime
... View more
07-03-2014
11:58 AM
I have a query that provides windows startup, ending and duration - however I was looking for a way to graph this?
The query is:
SourceName=EventLog EventCode=6005 OR EventCode=6006 | transaction host startswith=6005 endswith=6006
I'm looking for a graphical representation of when the small number of PC's are switched on until they are switched off.
Any ideas?
Matt
... View more
- Tags:
- graphing
- transactions
07-25-2013
07:40 AM
Hmmm - Thanks BMunson. I will look into that on our hot standby system - it's not a massive file to be honest - only 147 lines so a bit surprised by that (I know some customers have thousands).
Can't find anything called tsidxstats under /opt/splunk/var/lib/splunk - although obviously a lot of *.tsidx files in the db dirs. No real documentation out there (just a scattering of tags on here - http://splunk-base.splunk.com/tags/tsidxstats/) but is it generated when I use tscollect or search accelleration?
Will see if I can goad a server into caching and then try the transforms.conf change.
... View more
07-25-2013
06:48 AM
On Splunk indexer, 5.0.2. We have just had a case where the lookup file was definitely being cached (it was feeding to an event creator into our Zenoss monitoring system). Ran the above debug command successfully and it now seems to be reporting back the correct values without having to restart our main Splunk instance (lots of change requests needed for that).
I can imagine it was done for speed but I wish I had known that this caching was going on beforehand. Not sure it always caches the file either - I can remember some changes worked without having to restart the Splunk.
... View more
02-19-2013
08:47 AM
Unfortunately our production Splunk was connected to a test system splunkforwarder by mistake and according to the Summary 9.5 million test events were uploaded into our main index.
Unfortunately every single one had the same timestamp of _time="1346149418" (Tue, 28 Aug 2012 10:23:38 GMT) so when I try to view or delete them then it fails with a red bar and a "Error in 'IndexScopedSearch': The search failed. More than 1000000 events found at time".
I understand the error from the other questions but I want to delete all these events and that host - but I can't clear the production index due to the error. All the events are the same (I think - we can't see them!) so I can't subdivide the search to less than 1,000,000.
Is there any other way to delete this host and these events?
Many thanks,
Matt
... View more
02-01-2013
06:21 AM
I agree if we switch to syslog then that would have kept us independent but the splunk feed includes failover, buffering in case of network disconnect and fast reconfig of the agents with the deployment host. Depends if you can make a case for your IT budget and management priorities really. I could have set syslogs to forward direct to zenoss but we're hoping for a budget for something better later on.
... View more
02-01-2013
06:16 AM
Forward another year and a half - we have Splunk Universal agents out everywhere and are about to phase out Scom. We now have an eventtype.conf,tags.conf and lookup table solution that allows us to specify which events we are interested in and then launch a script to raise a relevant alert in our Zenoss monitoring system based on severity and event description in the lookup file. Someday I might document this up here if there is any interest - let me know.
... View more
01-19-2012
06:39 AM
I guess they stopped requiring Splunk engineers to answer these questions? Certainly there seem to be a lot more unanswered questions on here now.
Anyway I found out that I can stop the audit events by filtering by index. Thanks to Ken Frew @ Eqalis for the hints to get me started.
In the outputs.conf then change the [tcpout:LiveOutput] to:
[tcpout:LiveOutput]
server=customeripaddress:9012
disabled=false
heartbeatFrequency=30
maxQueueSize=20MB
forwardedindex.1.blacklist = .*
forwardedindex.2.whitelist = newindex
forwardedindex.filter.disable = false
Where newindex is the index holding what you want to forward. Note that if it's a splunktcp connection then the events will want a "newindex" index at the receiving customer side too (although I guess they could change their inputs.conf to specify a certain index).
Matt
... View more
01-03-2012
08:25 AM
Hi,
I have a splunk feed I want to forward to a customer - it has it's own index which it fills from Windows Events matching a transform which I then want to forward to the customer's splunk system. Rather than create a syslog stream (and have to talk the customer through an inputs.conf to decode it, stop it adding timestamps, etc) I thought I could use the Splunk-to-Splunk tcp feed which also incorporates buffering, heartbeats and other good stuff. I managed to get it to work to a test Splunk system perfectly but then discovered it was also forwarding all the internal audit logs!
How do I stop anything going to them apart from the data I want? I try a regex on the output transform which should limit it but a packettrace on the connection shows lots of other stuff going too. I see refs to audit trace so I'm assuming it's internal audit logs (which I still want locally of course but not sent to customers!).
props.conf:
[TelcoEvents]
...this is filled from another other feed...
...here is some SED stuff to censor the feed too...
#Now to send to customer
TRANSFORMS-LiveTransform=LiveTransformOutput
transforms.conf:
[LiveTransformOutput]
REGEX=.
DEST_KEY=_TCP_ROUTING
FORMAT=LiveOutput
outputs.conf:
[tcpout:LiveOutput]
server=customeripaddress:9012
disabled=false
heartbeatFrequency=30
maxQueueSize=20MB
On the other side then 9012 is set to a receiving port on the customer splunk.
Running 4.2.4 on linux.
Any ideas?
Matt
... View more
- Tags:
- forwarding
- regex
09-23-2011
06:02 AM
1 Karma
Try one at a time - then try and expand it, also I notice you have spaces in your regex?
If you need 2 then do something like this:
props.conf:
TRANSFORMS-set = setnullevents1,setnullevents2
and then transforms.conf:
[setnullevents1]
blah
[setnullevents2]
blah
From our working one to filter out specific hosts and events:
[setnullevents]
REGEX = (?ms)(EventCode=(17503|6105|6107|6106|6201)\D).*(ComputerName=(COMP-001|COMP-002|COMP-003))
DEST_KEY = queue
FORMAT = nullQueue
... View more
07-28-2011
02:12 AM
1 Karma
Forward about a year - we have deployed Lightweight forwarders to all our systems - and are consistently more stable than the Scom agents. Now upgrading them all to Universal Forwarders.
It's all working well - they are forwarding from each host to 2 "hot" Splunk heads. We have visability and graphs of windows events from our entire infrastructure and can quickly set up emergency alerts if we need to.
It doesn't directly compete with Scom - we have hundreds of rule sets on Scom that would mean hundreds of Searches on Splunk that which would be unweildy. Great for debugging and views though.
... View more
04-01-2011
03:51 PM
We tried both and we continued to get events collated into bigger splunk events - i.e. 1 big splunk event that contains a random number of windows events together with no spacing between them. So no splitting on the time/date field.
However we found a solution with the help of a splunk tech, Guillaume:
I used the shotgun method of creating a props.conf in /etc/system/local
With:
[source::WinEventLog:Application]
LINE_BREAKER=([\r\n](?=\d{2}/\d{2}/\d{2,4} \d{2}:\d{2}:\d{2} [aApPmM]{2}))
SHOULD_LINEMERGE=false
[source::WinEventLog:System]
LINE_BREAKER=([\r\n](?=\d{2}/\d{2}/\d{2,4} \d{2}:\d{2}:\d{2} [aApPmM]{2}))
SHOULD_LINEMERGE=false
[source::WinEventLog:...]
LINE_BREAKER=([\r\n](?=\d{2}/\d{2}/\d{2,4} \d{2}:\d{2}:\d{2} [aApPmM]{2}))
SHOULD_LINEMERGE=false
It works for system and application but not for WinEventLog:Directory Service and WinEventLog:DNS Server – so I presume the globbing ability of the ellipsis isn't grokked by the Splunk engine anymore too? (I apologise - it has been a long day).
Anyway - this should hold people until the patch.
... View more
07-21-2010
03:29 PM
I moved from this to a separate question here:
http://answers.splunk.com/questions/4785/windows-event-log-collection-via-microsoft-scom-2007
Basically it looks like if I want all the events in there then I have to use a Splunk install as a forwarder - with the option of making it a Light Forwarder after it's configured.
... View more
07-21-2010
03:27 PM
Yes - I had looked at that but unfortunately it only forwards alerts (or events) depending on the rules set. So in order to get all the Application events I would have to get SCOM to look at all the events (instead of just the ones I am interested in).
It looks like SCOM prefers to use remote access to the events and doesn't pull them all to the central server - which I can understand but it's annoying to have to deploy another forwarder!
... View more
07-21-2010
03:24 PM
Hmmmm - have tried a test splunk forwarder - will probably convert to a light forwarder when I have finished configuration testing...
This is certainly useful - probably more than using Snare.
It does appear to be the only way unless anyone else knows better. Looks like I will just have to have the hassle of a remote forwarder. I assume the remote WMI event log access is even more of an event hog and I like the idea of the buffering after failure.
Many thanks!
... View more
07-19-2010
09:15 AM
2 Karma
In connection to my question at the end of here: (http://answers.splunk.com/questions/1636/windows-event-log-collection-on-11000-devices/4739#4739)...
I thought I should split this off as a new question.
Basically we have a set of Windows platforms with custom software logging to the Application Event Log.
SCOM is going to be taking over from MOM and will be monitoring the systems. I am interested in Splunk getting a feed of all the logs in the Application Event Log too - I know that SCOM stores the event logs into a database - does anyone know how to either bend Splunk so it can read them from SCOM or to bend SCOM so it can produce logs that Splunk can read?
I am trying to avoid the hassle of putting Snare out onto the Windows servers as added resource load - but is this the only way? Also it is mentioned (in passing) on a few webpages that Snare converts Event Logs into text and loses a bit of the detail - are there any guides or examples of the differences between a Snare'd event and the full event using the Event Log Viewer?
Any help appreciated!
Matt
... View more
07-16-2010
01:05 PM
Ok - here is a different route...
We have Microsoft SCOM (well - we will do - currently migrating from MOM) installed. It has agents on all the windows systems that collect data/events/etc and forward to a central SCOm system.
I see from here http://www.splunkbase.com/apps/All/4.x/app:System+Center+Operations+Manager+%28SCOM%29+integration that I can get data from SCOM into Splunk.
However I was under the impression that only certain events are forwarded to SCOM for an alert depending upon what you set up.
Does anyone know if SCOM can collect all the events which can then be sucked in by Splunk? Or is it only some of them?
In which case I need to install Snare as well as Scom agents on all the platforms...
Matt
... View more