All Posts

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

All Posts

Hi @livehybrid  The screenshot I sent is from the Search Head and shows the exact same configuration deployed to the Heavy Forwarder. This is the first Heavy Forwarder that the data lands on. The da... See more...
Hi @livehybrid  The screenshot I sent is from the Search Head and shows the exact same configuration deployed to the Heavy Forwarder. This is the first Heavy Forwarder that the data lands on. The data is sent to the Heavy Forwarder using rsyslog, and the Heavy Forwarder uses [monitor:] to monitor the logs.
Hi @livehybrid    I checked with the query and it worked, I made little change to display DD:MM:YYYY HH:MM:SS using below query and it worked as expected. I am marking your answer as solution since... See more...
Hi @livehybrid    I checked with the query and it worked, I made little change to display DD:MM:YYYY HH:MM:SS using below query and it worked as expected. I am marking your answer as solution since it gave me base query to develop from, thank you very much !   |eval timestamp=strftime(now(), "%d/&m/%Y %H:%M:%S") |table timestamp,<<intented fields>>
@hrawat  The email sent titled "Splunk Service Bulletin Notification" was very poorly written. It explicitly states to upgrade to one of the following versions, it doesn't say "or later". We have r... See more...
@hrawat  The email sent titled "Splunk Service Bulletin Notification" was very poorly written. It explicitly states to upgrade to one of the following versions, it doesn't say "or later". We have recently upgraded all our forwarders to be running 9.4.1, which according to the service bulletin email isn't fixed, only 9.4.0 is (was there regression, or is the email wrong?).  
Hi @ranafge  Okay, this is progress in terms of diagnosing. So - you see events if you search index="wazuh-alerts"  ? If you search index="wazuh-alerts"  "Medium" - do you get any result then? Im ... See more...
Hi @ranafge  Okay, this is progress in terms of diagnosing. So - you see events if you search index="wazuh-alerts"  ? If you search index="wazuh-alerts"  "Medium" - do you get any result then? Im trying to determine if its a field extraction issue or if the data is actually missing.   Did this answer help you? If so, please consider: Adding karma to show it was useful Marking it as the solution if it resolved your issue Commenting if you need any clarification Your feedback encourages the volunteers in this community to continue contributing
Hi @Alan_Chan  Ive checked this config locally and it does work for your sample event so something else isnt right here. I think there is a typo in what you posted so I used the value from the scree... See more...
Hi @Alan_Chan  Ive checked this config locally and it does work for your sample event so something else isnt right here. I think there is a typo in what you posted so I used the value from the screenshot, but please confirm you have the asterisk in your SEDCMD that is deployed? Is the screenshot you sent from the Searchhead? Is the exact same config deployed to the Heavy Forwarder? And is this the only (or first) HF that the data lands on?  How is the data arriving into the HF? If it is via HEC using the event endpoint then this configuration will not work and you would need to use INGEST_EVAL or move to the raw HEC endpoint.  Did this answer help you? If so, please consider: Adding karma to show it was useful Marking it as the solution if it resolved your issue Commenting if you need any clarification Your feedback encourages the volunteers in this community to continue contributing
Hi @pjac1029  Simply add "<prefix>production</prefix>" within your <input></input> block like this:    Did this answer help you? If so, please consider: Adding karma to show it was use... See more...
Hi @pjac1029  Simply add "<prefix>production</prefix>" within your <input></input> block like this:    Did this answer help you? If so, please consider: Adding karma to show it was useful Marking it as the solution if it resolved your issue Commenting if you need any clarification Your feedback encourages the volunteers in this community to continue contributing
that worked ! Thanks so much for your help. I really appreciate it !
If I were to be nitpicky I'd say that it captures stuff like 000.999.123.987, which is not a valid IP
Actually, I believe the docs are correct since BREAK_ONLY_BEFORE applies to the line-merging stage which - if enabled - happens after line breaking. Anyway, @jackin  unless you have a very, very pec... See more...
Actually, I believe the docs are correct since BREAK_ONLY_BEFORE applies to the line-merging stage which - if enabled - happens after line breaking. Anyway, @jackin  unless you have a very, very peculiar use case, as a rule of thumb you should never enable line-merging. It is resource-intensive and most often you can achieve the same result by simply chosing a proper line breaker. So, how I would approach this - I'd firstly try to use the default ([\r\n]+) linebreaker and check if the stream gets broken into separate lines (disable SHOULD_LINEMERGE!). If it does, you can start searching how to anchor the breaker to the opening bracket. If it doesn't, that means you have some other characters in your data stream and you have to check what it is.
@pjac1029  I reviewed the XML and implemented the solution using a token prefix strategy combined with test data via makeresults (since I currently don't have real firewall data). I replaced the <d... See more...
@pjac1029  I reviewed the XML and implemented the solution using a token prefix strategy combined with test data via makeresults (since I currently don't have real firewall data). I replaced the <done> block with a <change> block in the dropdown input to ensure that the prefix logic (e.g., "prod\") applies every time the user changes the selection. This resolved the issue where the token was only set once. I also validated the dropdown behavior and confirmed that event filtering works as expected based on the selected username. <dashboard version="1.1"> <label>Firewall Blocks Dashboard (Test Data)</label> <fieldset submitButton="false" autoRun="true"> <input type="dropdown" token="raw_username" searchWhenChanged="true"> <label>Select Username</label> <fieldForLabel>username</fieldForLabel> <fieldForValue>username</fieldForValue> <search> <query>| inputlookup test_users.csv | table username</query> </search> <change> <set token="username">prod\\$value$</set> </change> </input> </fieldset> <row> <panel> <table> <search> <query> | makeresults | eval user="prod\\john.doe", action="blocked" | append [| makeresults | eval user="prod\\jane.smith", action="allowed"] | append [| makeresults | eval user="prod\\bob.jones", action="blocked"] | search user="$username$" | table user action </query> <earliest>-7d@h</earliest> <latest>now</latest> </search> </table> </panel> </row> </dashboard>        
I created a  dashboard with an input  that allows the user to select a user field from a dropdown that's populated by a lookup table.   I want to prefix the selected user with "production\" and r... See more...
I created a  dashboard with an input  that allows the user to select a user field from a dropdown that's populated by a lookup table.   I want to prefix the selected user with "production\" and run a query In a panel that retrieves firewall events  where the user = the new token value (prefixed with "production\") since the user in the firewall index is prefixed with "production". The first time I select the user from the lookup the query retrieves  events. the next time I select another user the set token does not prefix the token with "production". instead it searches with the user selected value and returns no events. the done block apparently only executes the first time through below is xml. Thanks in advance. <label>firewall blocks</label> <fieldset submitButton="false" autoRun="true"> <input type="dropdown" token="username" searchWhenChanged="true"> <label>username</label> <fieldForLabel>username</fieldForLabel> <fieldForValue>username</fieldForValue> <search> <query>| inputlookup test_users.csv | table username</query> <earliest>-24h@h</earliest> <latest>now</latest> <done> <set token="username">prod\\$username$</set> </done> </search> </input> </fieldset> <row> <panel> <table> <search> <query> index=firewall sourcetype=firewall user = "$username$" | table $username$ user action </query> <earliest>-7d@h</earliest> <latest>now</latest> </search> <option name="drilldown">none</option> </table> </panel>
I contend the documentation is incorrect.  LINE_BREAKER and BREAK_ONLY_BEFORE are contradictory and shouldn't be used together.  At the very least, great care should be used to ensure the two setting... See more...
I contend the documentation is incorrect.  LINE_BREAKER and BREAK_ONLY_BEFORE are contradictory and shouldn't be used together.  At the very least, great care should be used to ensure the two settings work properly.
First of all thanks for your reply. I ran the following search in Splunk: index="wazuh-alerts" "data.vulnerability.severity"="Medium" | stats count I also tested for other severity levels like "Hi... See more...
First of all thanks for your reply. I ran the following search in Splunk: index="wazuh-alerts" "data.vulnerability.severity"="Medium" | stats count I also tested for other severity levels like "High" and "Low," but the result was always 0. This indicates that no vulnerability detection events are being indexed in Splunk. Even though other types of data are coming through, there are currently no events where data.vulnerability.severity is populated with "High," "Medium," or "Low." It suggests that either: Vulnerability Detector is not generating results, The events are not being forwarded to Splunk properly, Or the events are being indexed but under a different sourcetype, index, or field structure. Would appreciate any guidance on how to dig deeper into this!
Hi @Alan_Chan , this transformation is unuseful on the SH, but it must be localized in the first HF that dara pass trhough, are you sure that you applied it in the first HF? Then check if the sourc... See more...
Hi @Alan_Chan , this transformation is unuseful on the SH, but it must be localized in the first HF that dara pass trhough, are you sure that you applied it in the first HF? Then check if the sourcetype where you associated the SEDCMD command is the correct one, and that there isn't any transformation on this sourcetype. Then, are you sure that is useful to remove these few chars? Ciao. Giuseppe
Hi @kunalsingh , good for you, see next time! Ciao and happy splunking Giuseppe P.S.: Karma Points are appreciated by all the contributors
I am trying to remove everything before the { character to preserve the JSON format. I am using SEDCMD-keepjson = s/^[^{]{/{/ in the sourcetype configuration, but it fails to apply correctly. However... See more...
I am trying to remove everything before the { character to preserve the JSON format. I am using SEDCMD-keepjson = s/^[^{]{/{/ in the sourcetype configuration, but it fails to apply correctly. However, when I use the search command | rex mode=sed "s/^[^{]{/{/", it successfully removes the unwanted text. I am wondering what could be causing this issue. The sourcetype settings are configured on both the Search Head (SH) and Heavy Forwarder (HF) Mar 28 13:11:57 abcdeabcdev01w.abcdabcd.local {<json_log>}  
Hi @kunalsingh  Use a REPORT transform in props.conf and transforms.conf to define the field extractions based on your delimiters. ==props.conf== [your_sourcetype] # Replace your_sourcetype with t... See more...
Hi @kunalsingh  Use a REPORT transform in props.conf and transforms.conf to define the field extractions based on your delimiters. ==props.conf== [your_sourcetype] # Replace your_sourcetype with the actual sourcetype of your data REPORT-kv_pairs = extract_custom_kv ==transforms.conf== [extract_custom_kv] REGEX = ([^=\^]+)=([^\^]*) FORMAT = $1::$2 MV_ADD = true This configuration defines a field extraction named extract_custom_kv. REGEX = ([^=\^]+)=([^\^]*): This regular expression finds key-value pairs separated by =. ([^=\^]+) captures the key (any character except = or ^). = matches the literal equals sign. ([^\^]*) captures the value (any character except ^, including an empty string). This correctly handles fields like documentName= where the value is empty. FORMAT = $1::$2: This assigns the captured key (group 1) and value (group 2) to a Splunk field. MV_ADD = true: Ensures that if multiple key-value pairs are found in a single event, they are all extracted. Check a working example at https://regex101.com/r/yAjRVa/1 This method correctly identifies the ^ character as the delimiter between pairs and = as the separator within a pair, handling empty values appropriately. The regex you provided, ^([^=]+)=([^^\]), likely failed because the ^ anchor restricts it to the start of the string, and the character class [^^\*] might not behave as expected compared to [^\^].   Did this answer help you? If so, please consider: Adding karma to show it was useful Marking it as the solution if it resolved your issue Commenting if you need any clarification Your feedback encourages the volunteers in this community to continue contributing
Hi @luminousplumz  You need to apply the mqtttopic transform before the mqtttojson transform overwrites the _raw field. The order in TRANSFORMS-* matters. Also, adjust the mqtttopic regex and format... See more...
Hi @luminousplumz  You need to apply the mqtttopic transform before the mqtttojson transform overwrites the _raw field. The order in TRANSFORMS-* matters. Also, adjust the mqtttopic regex and format for correct field extraction. transforms.conf: [mqtttojson] REGEX = msg\=(.+) FORMAT = $1 DEST_KEY = _raw [mqtttopic] # Extract from the original _raw field containing 'topic=' REGEX = topic=tgw\/data\/0x155f\/([^\/]+) FORMAT = Topic::$1 WRITE_META = true props.conf: [mqtttojson_ubnpfc_all] # Apply mqtttopic first, then mqtttojson TRANSFORMS-topic_then_json = mqtttopic, mqtttojson # The rest of your props.conf settings remain the same DATETIME_CONFIG = LINE_BREAKER = ([\r\n]+) NO_BINARY_CHECK = true TIME_PREFIX = \"ts\": TZ = Europe/London category = Custom pulldown_type = 1 # Ensure KV_MODE=none if you don't want Splunk's default key-value extraction # KV_MODE = none # Ensure JSON extraction runs after transforms if needed # INDEXED_EXTRACTIONS = json Transform Order: The TRANSFORMS-topic_then_json line in props.conf should have mqtttopic first. This ensures it runs on the original event data before mqtttojson overwrites _raw with the JSON payload. mqtttopic REGEX: The regex topic=tgw\/data\/0x155f\/([^\/]+) specifically looks for the topic= string, skips the known prefix tgw/data/0x155f/, and captures the next segment of characters that are not a forward slash (/) into capture group 1. mqtttopic FORMAT: FORMAT = Topic::$1 creates a new field named Topic containing the value captured by the regex (the desired topic segment, e.g., "TransportContextTracking"). mqtttopic WRITE_META: WRITE_META = true ensures the extracted field (Topic) is written to the index metadata, making it available for searching even though the original _raw field is later overwritten. mqtttojson: This transform runs second. It extracts the JSON part from the msg= field (which still exists in the original event data at this stage) and overwrites _raw with just the JSON content. Splunk's automatic JSON parsing (or INDEXED_EXTRACTIONS = json) will then parse this new _raw. Some useful tips: Restart the Splunk instance or reload the configuration for changes in props.conf and transforms.conf to take effect. Ensure the sourcetype mqtttojson_ubnpfc_all is correctly assigned to your MQTT data input. Test the regex using Splunk's rex command in search or on regex testing websites against your raw event data to confirm it captures the correct value. If Splunk's automatic key-value extraction interferes before your transforms run, you might need KV_MODE = none in props.conf. If Splunk isn't automatically parsing the final JSON _raw, add INDEXED_EXTRACTIONS = json to your props.conf stanza. Did this answer help you? If so, please consider: Adding karma to show it was useful Marking it as the solution if it resolved your issue Commenting if you need any clarification Your feedback encourages the volunteers in this community to continue contributing
| rex "(?<ip>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})(?=:\d+)"
I would like to extract an ip address from a text field where the ip address has a trailing port number. The text is like so:  X-Upstream:"11.111.11.11:81" The extraction would provide only the ip ... See more...
I would like to extract an ip address from a text field where the ip address has a trailing port number. The text is like so:  X-Upstream:"11.111.11.11:81" The extraction would provide only the ip address. Thanks.