All Posts

Find Answers
Ask questions. Get answers. Find technical product solutions from passionate members of the Splunk community.

All Posts

I can login there (using my instructor account), but see 0 events (both public and invited), any way to get the access there ? Thanks @gcusello !
Looks great, will test it, thx !
Hello Team, Pre staging environment (not production), a single server with 12 CPU + 24 GB or memory + raid0 nvme (2.5GB/s write, 5GB/s read). All in one deployment (SH + indexer). CPU cores with HT ... See more...
Hello Team, Pre staging environment (not production), a single server with 12 CPU + 24 GB or memory + raid0 nvme (2.5GB/s write, 5GB/s read). All in one deployment (SH + indexer). CPU cores with HT on dedicated server (6 cores with HT = 12 CPU -> but not used by any other VM). Splunk 9.1.1 and ES 7.1.1. Fresh install. NO data ingested (0 events in most of the indexes including main, notable, risk etc...) - so basically no data yet to be processed. Default ES configuration, i have not yet tuned any correlation searches etc. Defaults. And already performance problems: 1. MC Scheduler Activity Instance showing 22% skipped. 2. ESX reporting minimal CPU usage (the same with memory): 3. MC showing more details, many different Accelerated DM tasks are skipped, all the time: Questions: 1. obviously the first recommendation would be to disable many of correlation searches/accelerated DMs, but that not what i would like do because the aim is to test complete ES functionality (by generating a small number of different types of events). Why do i have those problems in a first place ? I can see that all the tasks are very short, finishes in 1 second, just few takes several seconds. And that is expected since i have 0 events everywhere and i do always expect to have a small number of events on this test deployment. What should i do to tune it and make sure there are no problems with skipped jobs ? Shall i increase  max_searches_per_cpu base_max_searches  Any other ideas ? Overall that seems weird, 
You can use BOTS dataset https://github.com/splunk/botsv3
@richgalloway  Thanks, As I see in some host changes has not reflected what could be the issue ?
Hi @MichalG1, have you access to Splunk Show (show.splunk.com)? if yes, you already have a complete environment for test and training with all the installed add-ons and data. Otherwise, it's reall... See more...
Hi @MichalG1, have you access to Splunk Show (show.splunk.com)? if yes, you already have a complete environment for test and training with all the installed add-ons and data. Otherwise, it's really difficoult to create a relevant data test environment. Ciao. Giuseppe
Hello Team, I have my training Splunk instance with ES 7.1. I have used it for training and experiments. Question: is there any "training/example" data i could use to import it there ? The point is... See more...
Hello Team, I have my training Splunk instance with ES 7.1. I have used it for training and experiments. Question: is there any "training/example" data i could use to import it there ? The point is: i do not want to configure dozens of TA's/collectors, create real labs with real cybersecurity attacks, instead would love to have a test data so i could learn/experiment/review Splunk ES capabilities. Anything ?
Hi Yuanliu, Yes, you're absolutely right, I do want to calculate percentage of count by status in total count. Thanks for your reply. I actually got there in the end using a subsearch but I see now... See more...
Hi Yuanliu, Yes, you're absolutely right, I do want to calculate percentage of count by status in total count. Thanks for your reply. I actually got there in the end using a subsearch but I see now this is not the correct way of doing things.  Your solution is obviously much more elegant so I'll be using that.  Thanks also for taking time to explain the correct use case for a subsearch.
To rebalance data, splunk only offers you to rebalance one single index or all the indexes but there is no option to provide a list of them. I've created the following shell script to do this and I h... See more...
To rebalance data, splunk only offers you to rebalance one single index or all the indexes but there is no option to provide a list of them. I've created the following shell script to do this and I hope it will help the community. To use it: Create an empty directory and copy the script there Change the parameters at the beginning of the script to correspond to your platform Create a file named ~/.creds containing MY_CREDS="admin:password" (you can replace admin and password with any user account with admin privileges) Create a file in the same directory as the script named indexes.conf with a list of indexes you want to rebalance (one per line) Launch the script and provide a value for the timeout in minutes ("-m" switch;  e.g. "./rebalance.sh -m 2880") Tip: if you access your manager node using ssh, consider using "screen" to keep your session open for a long period of time.   #!/bin/sh HOST=my_manager_node.example.com PORT=8089 source $HOME/.creds CURL_OPTS="-su ${MY_CREDS} --write-out HTTPSTATUS:%{http_code}" INDEXES_FILE="indexes.conf" CONFIG_CMD="/usr/bin/curl ${CURL_OPTS} https://${HOST}:${PORT}/services/cluster/config/config -d rebalance_threshold=0.9" /cluster/manager/control/control/rebalance_buckets -d action=start" START_CMD="/usr/bin/curl ${CURL_OPTS} https://${HOST}:${PORT}/services/cluster/manager/control/control/rebalance_buckets -d action=start" configuration endpoint or by normal endpoint with action=start MAXRUNTIME_OPT="-d max_time_in_min=" INDEX_OPT="-d index=" STOP_CMD="/usr/bin/curl ${CURL_OPTS} https://${HOST}:${PORT}/services/cluster/manager/control/control/rebalance_buckets -d action=stop" STATUS_CMD="/usr/bin/curl ${CURL_OPTS} https://${HOST}:${PORT}/services/cluster/manager/control/control/rebalance_buckets -d action=status" LOG="rebalance.log" MAXRUNTIME="1" while getopts ":m:" opt; do case $opt in m) MAXRUNTIME=${OPTARG} ;; echo "Missing value for argument -$OPTARG" exit 1 ;; ?) echo "Unknown option -$OPTARG" exit 1 ;; esac done if [[ "$OPTIND" -ne "3" ]]; then echo "Please specify timeout in minute with -m" exit fi echo -n "Starting $0: " >>$LOG echo $(date) >>$LOG [[ -f $INDEXES_FILE ]] || exit echo "Configuring rebalancing" echo "Configuring rebalancing" >>$LOG EPOCH=$(date +"%s") MAX_EPOCH=$(( EPOCH + ( 60 * MAXRUNTIME ) )) echo "Will end at EPOCH: $MAX_EPOCH" >>$LOG HTTP_RESPONSE=$($CONFIG_CMD) HTTP_BODY=$(echo $HTTP_RESPONSE | sed -e 's/HTTPSTATUS\:.*//g') HTTP_STATUS=$(echo $HTTP_RESPONSE | tr -d '\n' | sed -e 's/.*HTTPSTATUS://') if [[ ! $HTTP_STATUS == "200" ]]; then echo "HTTP status: $HTTP_STATUS" echo "HTTP body: $HTTP_BODY" exit fi RUNNING=0 for INDEX in `cat $INDEXES_FILE`; do EPOCH=$(date +"%s") MINS_REMAINING=$(( ( MAX_EPOCH - EPOCH ) / 60 )) if [[ "$MINS_REMAINING" -le "0" ]]; then echo "Timout reached" echo "Timout reached" >>$LOG exit fi echo "Rebalancing $INDEX" echo "Rebalancing $INDEX" >>$LOG echo "Remaining time: $MINS_REMAINING" >>$LOG echo $(date) >>$LOG #HTTP_RESPONSE=$(${START_CMD} ${INDEX_OPT}${INDEX}) HTTP_RESPONSE=$(${START_CMD} ${INDEX_OPT}${INDEX} ${MAXRUNTIME_OPT}${MINS_REMAINING}) #HTTP_RESPONSE=200 HTTP_BODY=$(echo $HTTP_RESPONSE | sed -e 's/HTTPSTATUS\:.*//g') HTTP_STATUS=$(echo $HTTP_RESPONSE | tr -d '\n' | sed -e 's/.*HTTPSTATUS://') echo "HTTP status: $HTTP_STATUS" >>$LOG echo "HTTP body: $HTTP_BODY" >>$LOG if [[ ! $HTTP_STATUS == "200" ]]; then echo "HTTP status: $HTTP_STATUS" echo "HTTP body: $HTTP_BODY" exit fi RUNNING=1 WAS_RUNNING=0 sleep 1 while [[ $RUNNING == 1 ]]; do HTTP_RESPONSE=$($STATUS_CMD) HTTP_BODY=$(echo $HTTP_RESPONSE | sed -e 's/HTTPSTATUS\:.*//g') HTTP_STATUS=$(echo $HTTP_RESPONSE | tr -d '\n' | sed -e 's/.*HTTPSTATUS://') if [[ ! $HTTP_STATUS == "200" ]]; then echo "HTTP status: $HTTP_STATUS" echo "HTTP body: $HTTP_BODY" exit fi echo "$HTTP_BODY" | grep "Data rebalance is not running" >/dev/null if [ $? -eq 0 ]; then RUNNING=0 else WAS_RUNNING=1 RUNNING=1 echo -n "." sleep 1 fi done if [[ $WAS_RUNNING == 1 ]]; then # We need a CR after the last echo -n "." echo fi done  
I don't like to use the default time-related fields. 1. They don't have to be present 2. Quoting the docs: Note: Only events that have timestamp information in them as generated by their respectiv... See more...
I don't like to use the default time-related fields. 1. They don't have to be present 2. Quoting the docs: Note: Only events that have timestamp information in them as generated by their respective systems will have date_* fields. If an event has a date_* field, it represents the value of time/date directly from the event itself. If you have specified any timezone conversions or changed the value of the time/date at indexing or input time (for example, by setting the timestamp to be the time at index or input time), these fields will not represent that.
While I wholehaeartedly agree about not using text-based tools for structured data, the problem is that you can't use spath for defining extractions - you can only use it in search. And json or xml k... See more...
While I wholehaeartedly agree about not using text-based tools for structured data, the problem is that you can't use spath for defining extractions - you can only use it in search. And json or xml kv-extractions work only if the whole event is a well-formed structure. You can't use it if you have - for example - a json event with a syslog header. There is an open idea about it somewhere on ideas.splunk.com
You haven't written much except for copy-pasting some table. I suspect you have some internal compliance project and must do an inventory of if/how you log various events across your environment and ... See more...
You haven't written much except for copy-pasting some table. I suspect you have some internal compliance project and must do an inventory of if/how you log various events across your environment and have a standardized form for it. Well, this is something you typically either do yourself or pay someone with sufficient knowledge to do this for you. This is a community driven forum where people voluntarily help each other, not do other people's work for free. It doesn't work that way. If you need pointers where to look for docs which might describe what you're looking for, we'll be happy to help if we can, just be a bit more verbose about what you're looking for. But if you got a task from your boss that you don't know even how to approach (or simply are lazy and thought someone would do it for you) then sorry, that's a consultancy job you typically pay big bucks for.
As I always warn people, do not treat structured data as text.  Using Splunk's built-in function with JSON, XML, and so on is much more robust and saves you tons of headaches in future maintenance. ... See more...
As I always warn people, do not treat structured data as text.  Using Splunk's built-in function with JSON, XML, and so on is much more robust and saves you tons of headaches in future maintenance. All you need to do is to extract the conformant JSON into its own field.  Then apply spath. (An alternative new syntax is fromjson.)   | rex "^[^{]+\s*(?<json>{.+})" | spath input=json   It's that simple.  Your sample log will give you everything in that JSON. fieldname fieldvalue Bat1Volt 7.931 BatPercent 100 BatTech Rechargeable Battery1CaliVoltage 7.931 CameraOffline 48 CameraOnline 11029337 ChargerTech QuickCharger ChargingState Off CriticalBatStatus 0 DdrFailCnt 0 FailedStreams 1 FailedUpgrades 0 HardwareRevision H6 HardwareVersion H6 ID 534 IRLEDsOn 21054 ISPOn 57564 ISPWatchdogCount 0 ISPWatchdogCount2 0 LogFrequency 2 MotionStreamed 7561 PIREvents 66 PercentAtPlug 95 PercentAtUnPlug 100 PirOorEvents 0 PoweredOn 11029385 SecsPerPercentAvg 0 SecsPerPercentCurr 0 SignalStrengthIndicator 2 SnapshotCount 0 Streamed 53395 SystemFirmwareVersion 1.096.3.2_30_0bad0df SystemSerialNumber 51D29C77A022A SystemVersionString 1.096.3.2_1.8.65.0_22 Temperature 24 TimeAtPlug 11025490 TimeAtUnPlug 10979418 TimeStamp 2023-10-12T11:23:36+0000 Type status UserStreamed 1650 WifiConnectionAttempts 2 WifiConnectionCount 2 WifiCountryDetails   carrierFw Generic json {"Type":"status","HardwareRevision":"H6","WifiCountryDetails":"","BatPercent":100,"BatTech":"Rechargeable","ChargerTech":"QuickCharger","ChargingState":"Off","Bat1Volt":7.931,"Temperature":24,"Battery1CaliVoltage":7.931,"Streamed":53395,"UserStreamed":1650,"MotionStreamed":7561,"IRLEDsOn":21054,"PoweredOn":11029385,"CameraOnline":11029337,"CameraOffline":48,"WifiConnectionCount":2,"WifiConnectionAttempts":2,"PIREvents":66,"FailedStreams":1,"FailedUpgrades":0,"SnapshotCount":0,"LogFrequency":2,"CriticalBatStatus":0,"ISPOn":57564,"TimeAtPlug":11025490,"TimeAtUnPlug":10979418,"PercentAtPlug":95,"PercentAtUnPlug":100,"ISPWatchdogCount":0,"ISPWatchdogCount2":0,"SecsPerPercentCurr":0,"SecsPerPercentAvg":0,"PirOorEvents":0,"DdrFailCnt":0,"carrierFw":"Generic","SignalStrengthIndicator":2,"SystemVersionString":"1.096.3.2_1.8.65.0_22","ID":534,"SystemFirmwareVersion":"1.096.3.2_30_0bad0df","HardwareVersion":"H6","SystemSerialNumber":"51D29C77A022A","TimeStamp":"2023-10-12T11:23:36+0000"} Here is an emulation you can play with and compare with real data   | makeresults | eval _raw="178.197.202.134 SECURITY_MONITORING_AUTOMATION CAMERA_SYSTEMS VML4 VML4030 1697109816450 INFO 51D29C77A022A KU5TFBKH-1700-316-114351851 - statusInfo {\"Type\":\"status\",\"HardwareRevision\":\"H6\",\"WifiCountryDetails\":\"\",\"BatPercent\":100,\"BatTech\":\"Rechargeable\",\"ChargerTech\":\"QuickCharger\",\"ChargingState\":\"Off\",\"Bat1Volt\":7.931,\"Temperature\":24,\"Battery1CaliVoltage\":7.931,\"Streamed\":53395,\"UserStreamed\":1650,\"MotionStreamed\":7561,\"IRLEDsOn\":21054,\"PoweredOn\":11029385,\"CameraOnline\":11029337,\"CameraOffline\":48,\"WifiConnectionCount\":2,\"WifiConnectionAttempts\":2,\"PIREvents\":66,\"FailedStreams\":1,\"FailedUpgrades\":0,\"SnapshotCount\":0,\"LogFrequency\":2,\"CriticalBatStatus\":0,\"ISPOn\":57564,\"TimeAtPlug\":11025490,\"TimeAtUnPlug\":10979418,\"PercentAtPlug\":95,\"PercentAtUnPlug\":100,\"ISPWatchdogCount\":0,\"ISPWatchdogCount2\":0,\"SecsPerPercentCurr\":0,\"SecsPerPercentAvg\":0,\"PirOorEvents\":0,\"DdrFailCnt\":0,\"carrierFw\":\"Generic\",\"SignalStrengthIndicator\":2,\"SystemVersionString\":\"1.096.3.2_1.8.65.0_22\",\"ID\":534,\"SystemFirmwareVersion\":\"1.096.3.2_30_0bad0df\",\"HardwareVersion\":\"H6\",\"SystemSerialNumber\":\"51D29C77A022A\",\"TimeStamp\":\"2023-10-12T11:23:36+0000\"}" ``` data emulation above ```    
I have a strong suspicion that your mock output is misleading.  The correct mock output most likely look like this instead: MyStartTime MyEndTime MyStartUnix MyEndUnix diff 2023... See more...
I have a strong suspicion that your mock output is misleading.  The correct mock output most likely look like this instead: MyStartTime MyEndTime MyStartUnix MyEndUnix diff 2023-10-10T14:48:39 2023-10-10T14:57:50 2023-10-10T14:15:15 2023-10-10T13:56:53 1696974519.000000 1696975070.000000 1696972515.000000 1696971413.000000     In other words, instead of the two start and end pairs in two rows, they are in the same row for a given value of AnotherField which you didn't show. This is because you use list function by AnotherField.  Very likely there are more than one start-end pairs per AnotherField.  These multivalued fields cannot be used in arithmetic operations directly.  Before I describe a method to handle multivalue fields, let me first get some clarifications. Is it really important to use list function?  Are there overlapping MyStartTime, overlapping MyEndTime, or overlapping intervals that magically end up in the correct sequence?  If not, using values is a lot cheaper and you won't be subject to memory limitations. (Because we are looking at ISO timestamps, values with order them correctly.) Is it really important to calculate diff after stats?  If you are listing/tallying values of every start-end pair, it is actually cheaper to calculate diff before stats. (If MyStartTime and MyEndTime don't appear in the same event, of course, you don't have a choice.) I cannot see real importance of listing MyStartUnix and MyEndUnix in final results, so the following will simply ignore them. With these caveats, you can use mvmap to handle multivalued field after stats.  In the following, I assume that each start is paired with an end.   MySearchCriteria index=MyIndex source=MySource | stats list(ExtractedFieldStartTime) as MyStartTime, list(ExtractedFieldEndTime) as MyEndTime by AnotherField | eval idx = mvrange(0, mvcount(MyStartTime)) | eval diff=mvmap(idx, strptime(mvindex(MyEndTime, idx), "%Y-%m-%dT%H:%M:%S")-strptime(mvindex(MyStartTime, idx), "%Y-%m-%dT%H:%M:%S")) | fields - idx   This will give you AnotherField MyStartTime MyEndTime diff another 2023-10-10T14:48:39 2023-10-10T14:57:50 2023-10-10T14:15:15 2023-10-10T13:56:53 -2004.000000 -3657.000000 (Your samples have ends before starts, hence negative diffs.)  
Yes, i need those details. I mean for suppose in our splunk application having an Authentication(successful logins, failed logins)these where data available in splunk
Hi @phanikumarcs .. As said by @ITWhisperer ... this could mean many things to many people. pls be more specific and please provide more details.  1) for which Splunk app?.. Splunk app for windows ... See more...
Hi @phanikumarcs .. As said by @ITWhisperer ... this could mean many things to many people. pls be more specific and please provide more details.  1) for which Splunk app?.. Splunk app for windows / unix linux? DB Connet?.. etc 2) are you looking to document all these details of that excel file, of a required Splunk App? 3) may i know, if you are looking to develop a new Splunk app or documenting an existing app?
The samples I provided are as follows: correlation_id: "['321e2253-443a-41f1-8af3-81dbdb8bcc77']" correlation_id: "11315ad3-02a3-419d-a656-85972e07a1a5" These are two format logs one is in array ... See more...
The samples I provided are as follows: correlation_id: "['321e2253-443a-41f1-8af3-81dbdb8bcc77']" correlation_id: "11315ad3-02a3-419d-a656-85972e07a1a5" These are two format logs one is in array format and another normal value. Thanks in advance Did you forget to provide one of samples you alluded to?  The only sample (if it is raw event) you provided would have these fields available to you by Splunk: fieldname fieldvalue correlation_id ['321e2253-443a-41f1-8af3-81dbdb8bcc77'] custom_attributes.campaign-id   custom_attributes.campaign-name   custom_attributes.country{} India custom_attributes.entity-internal-id   custom_attributes.lead-id   custom_attributes.marketing-area   custom_attributes.record_count 1 custom_attributes.root-entity-id   error   invocation_timestamp 2023-10-11T20:08:51Z invoked_component prd-ccm-incontact-ingestor-v1 invoker_agent arn:aws:sqs:eu-central-1:981503094308:prd-ccm-incontact-ingestor-queue-v1 message Deleted message from queue message_type INFO original_source_app YMKT processing_stage Deleted message from queue request_payload   response_details {'ResponseMetadata': {'RequestId': 'a04c3e82-fe3a-5986-b61c-6323fd295e18', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': 'a04c3e82-fe3a-5986-b61c-6323fd295e18', 'x-amzn-trace-id': 'Root=1-652700cc-f7ed3cf574ce28da63f6625d;Parent=865f4dad6eddf3c1;Sampled=1', 'date': 'Wed, 11 Oct 2023 20:08:51 GMT', 'content-type': 'text/xml', 'content-length': '215', 'connection': 'keep-alive'}, 'RetryAttempts': 0}} response_timestamp 2023-10-11T20:08:51Z retry_attempt 1 target_idp_application   As you can see, there is only one correlation_id; the value 11315ad3-02a3-419d-a656-85972e07a1a5 is nowhere in this sample.  The field response_details contains a pseudo JSON that can be transformed into conformant JSON, but it also does not contain any embedded key named correlation_id nor any embedded value of 11315ad3-02a3-419d-a656-85972e07a1a5. I also fail to see the significance of 11315ad3-02a3-419d-a656-85972e07a1a5 vs ['321e2253-443a-41f1-8af3-81dbdb8bcc77'].  In JSON, they are just strings.  None of them is special.  As I mentioned earlier, it is best not to use regex on structured data like this.  As your sample event is conformant JSON, using Splunk's built in function is a lot more robust and saves a lot headaches in future maintenance.
This looks like some sort of product evaluation matrix, although, to be honest, it could be almost anything! I am not sure, and, I suspect, none of the other volunteers would know, how to fill this ... See more...
This looks like some sort of product evaluation matrix, although, to be honest, it could be almost anything! I am not sure, and, I suspect, none of the other volunteers would know, how to fill this in without more detail on each criteria and what sort of answers you are expecting. Even if they did know, there is an awful lot of information that you appear to be requesting, and it seems a little unreasonable for you to expect volunteers to spend a lot of time providing you with answers.
I get a rough idea about what the OP wants: The lowest level domain in DNS must be that in Identified_Host + "-admin" or "-mgt", and All upper level domains in DNS and those in Identified_Host are... See more...
I get a rough idea about what the OP wants: The lowest level domain in DNS must be that in Identified_Host + "-admin" or "-mgt", and All upper level domains in DNS and those in Identified_Host are identical. If this is correct, here is a literal interpretation.   | foreach DNS Identified_Host [rex field=<<FIELD>> "(?<<<FIELD>>_low>[^\.]+).(?<<<FIELD>>_up>.+)"] | where match(DNS_low, "^". Identified_Host_low. "-(admin|mgt)$") AND DNS_up == Identified_Host_up | fields - *_low *_up   Pro tip: You can do volunteers here a great favor if you not just describe the data, but also demonstrate what is desired result, then explain the logic between data and desired result. Using the data emulation @yeahnah gives, the result from this search is DNS Identified_Host host1-admin.domain.com host1.domain.com host1-mgt.domain.com host1.domain.com Are these what you expect?
Hi Guys, need answers for below information which is relate to only Splunk application   Path/Query/log file/Index 1. Authentication       Conditional control not met       Disabled/... See more...
Hi Guys, need answers for below information which is relate to only Splunk application   Path/Query/log file/Index 1. Authentication       Conditional control not met       Disabled/ Locked account       Expired token/certificate       Failed logins       Invalid Credentials       MFA check failed       Successful logins       When someone is elevating their permissions and accessing mail of         another user   2. Authorization        Failed authorization       Resource does not exist       Successful authorization       User not authorized   3. Change       Add Integrated Application / Service Configuration       Change to authentication scheme       Change to IP allow list       Change to MFA requirements       Changes to Authentication or Authorization methods       Remove Integrated Application / Service Configuration   4. User Management       Add Group to Group       Add User or Group       Create certificate       Create Role       Create token       Create User       Delete Role       Delete User       Diable token       Elevate User to priviledged status       Remove Group to group       Remove user from priviledged status       Remove User or Group       Revoke certificate       Revoke Role       Revoke User       Update Role       Update User   5. Access       User accessing a sensitive data object       User accessing multiple sensitive data objects       User action performed with sensitive data   6 Jobs and activity       Activity / Performance Indicators       Debug logs       System Errors/Warnings       System Power Down       System Power Up       System Service Start       System Service Stop