All Posts

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

All Posts

We moved from Splunk Enterprise to Splunk Cloud a few years ago. To migrate all our objects we packaged all apps with the CLI package command and uploaded them to Splunk Cloud. This command merges ... See more...
We moved from Splunk Enterprise to Splunk Cloud a few years ago. To migrate all our objects we packaged all apps with the CLI package command and uploaded them to Splunk Cloud. This command merges everything from the local to the default folder as stated here: Package apps | Documentation | Splunk Developer Program  Unfortunately the consequence is that these objects are not editable via UI anymore. A number of changes don't apply, even though the UI doens't provide me an error. (e.g. re-assigning an orphaned search, or deleting an old object). To work around this issue, we asked for an export of the app via Splunk Support (there is no way of doing this via API as far as I can find) so we could change the app. But if we change the app and repackage it, than all local objects again will move to the default folder, making our problem in the future even worse. I always used the "package" CLI command which does this local to default folder merge. Is the Packaging Toolkit working in the same way? I don't have experience with it. If it is able to keep objects in the local folder, than it might save us... Any other idea to overcome this situation welcome as well... Thanks!
Hi @imarri , I have encountered this error before and I solved it by refreshing the credentials i.e the Api token. try entering a new token and see if it works.
Thanks @manjunathmeti  For some reason thought that would not work but it does!
Hi, hopefully this is the right place to ask. I am pretty new to MS SQL as well as Splunk, so am curious what is the simplest way to pipe MS SQL data (the Change Data Capture data/table in particular... See more...
Hi, hopefully this is the right place to ask. I am pretty new to MS SQL as well as Splunk, so am curious what is the simplest way to pipe MS SQL data (the Change Data Capture data/table in particular) to Splunk, and wondering if anyone here has done/tried it? I currently have Universal Forwarder set up on my Windows machine, and able to pipe Event Viewer stuffs to Splunk. Looked into Splunk DB Connect, but the setup process seems to be a little too complicated for me (installed Java, but not sure how to go from there). I am unsure if I am able to achieve what I want through Universal Forwarder (as my MS SQL uses Windows Authentication and from what I've read it says Windows Authentication is not supported in Universal Forwarder. Do correct me if I am wrong.). Appreciate any help.
Check splunkd.log and splunkd_ui_access.log for any errors/warnings.
Hi @abhishekpatel2 , try to create your search using Pivot, starting from your DataModel. Then see in Job Inspector the generated search, maybe there's an error in field names. Ciao. Giuseppe
You can refresh the Splunk configurations without restarting by running the URL: https://SPLUNK_DEPLOYMENT_SERVER:8000/debug/refresh
I tried that too, but in that I am getting no results.
Hi @jbv , you can use the now() funtion, for more infos see at https://docs.splunk.com/Documentation/SCS/current/SearchReference/DateandTimeFunctions You can try something like this: | makeresults... See more...
Hi @jbv , you can use the now() funtion, for more infos see at https://docs.splunk.com/Documentation/SCS/current/SearchReference/DateandTimeFunctions You can try something like this: | makeresults | eval current_time=now() | table current_time it's in epochtime, then you can convert in the format you like. Ciao. Giuseppe
Hello @jbv, You can get the current time using the now() function. By default it is returned in epoch  format only. You can use eval to call a field and you'll get what you want. | eval current_tim... See more...
Hello @jbv, You can get the current time using the now() function. By default it is returned in epoch  format only. You can use eval to call a field and you'll get what you want. | eval current_time_epoch=now()   Thanks, Tejas.   --- If the above solution helps, an upvote is appreciated.!! 
Hi, Tre this : | inputlookup yourlookuo // Read data from the lookup file | search NOT $empty$ trigger_email=true // Filter for records with email trigger enabled | eval email_subject = "<field_Mo... See more...
Hi, Tre this : | inputlookup yourlookuo // Read data from the lookup file | search NOT $empty$ trigger_email=true // Filter for records with email trigger enabled | eval email_subject = "<field_MotherYear> - <field_Customer> - <field_Device>- <field_CheckName> - <field_SelfHealCount>-<field_Status>- <field_Timestamp>" // Construct subject using all fields subject = $email_subject // Use the dynamically generated subject
There are a couple of functions to returns time, now() which returns the time the search started, and time() which returns the time the function is executed. Both of these functions already return th... See more...
There are a couple of functions to returns time, now() which returns the time the search started, and time() which returns the time the function is executed. Both of these functions already return the time in epoch format.
It is not clear what your actual requirement is - Which avg are you want to compare to? The average VALUE for that time period (15m) across all cpus, or the average for that cpu across the whole time... See more...
It is not clear what your actual requirement is - Which avg are you want to compare to? The average VALUE for that time period (15m) across all cpus, or the average for that cpu across the whole time period? Assuming the former, a "standard" way of looking for a "fiddle factor" is to determine the standard deviation (for the VALUEs in the time period - 15m), and determine for each cpu how many stdevs the VALUE is above the mean. You might do this like this | eventstats mean(VALUE) as MeanV stdev(VALUE) as StDevV by _time | eval exceedFactor=if(VALUE > MeanV,(VALUE - MeanV)/StDevV, 0) | timechart values(exceedFactor) span=15m by cpu limit=0
no, that not right putting  the cpu into by clause for the stats command doesn't   give the mean value for cluster Its performing the stats  on the individual cpu's
Hi, Is there a way to get current time on Splunk and then convert it to epoch? Im trying to create a dashboard to show inactivity from my data sources and plan to use info from | metadata command.
Hi @sarlacc , at first it isn't a good idea to have the Deployment server on Indexers or Search Heads, have you another server? You can use a shared (with other roles) server only if the DS has to ... See more...
Hi @sarlacc , at first it isn't a good idea to have the Deployment server on Indexers or Search Heads, have you another server? You can use a shared (with other roles) server only if the DS has to manafe up to 50 clients, more it requires a dedicated server. About data, at first check the TIME_FORMAT: what's the format of your date: european (dd/mm/yyyy) or american (mm/dd/yyyy), by default Splunk uses the american format. About the only Universal Forwarder with issues, have you internal Splunk logs (_* indexes)? if yes, it's an issue of that data source, if not there's a connection issue. Ciao. Giuseppe
Hi @abhishekpatel2, try adding the BY clause: | tstats summariesonly=false count FROM datamodel=Cisco_Catalyst_App WHERE where nodename=Cisco_Catalyst_Dataset.Cisco_Security_Adviso... See more...
Hi @abhishekpatel2, try adding the BY clause: | tstats summariesonly=false count FROM datamodel=Cisco_Catalyst_App WHERE where nodename=Cisco_Catalyst_Dataset.Cisco_Security_Advisories_Events BY Catalyst_Dataset.Security_Advisories_Events.Category | table Catalyst_Dataset.Security_Advisories_Events.Category Ciao. Giuseppe
Hi @jhuysing , I don't know which data are you monitoring, but anyway, youcan add the CPU name to the stats BY clause. Then you can create your own rule to fire an alert: e.g. max value more than 3... See more...
Hi @jhuysing , I don't know which data are you monitoring, but anyway, youcan add the CPU name to the stats BY clause. Then you can create your own rule to fire an alert: e.g. max value more than 30% of the average, etc... using a where condition. in your case (using 30% more than MeanV): <your_search> | bin span=15m _time | stats max(VALUE) AS MaxV mean(VALUE) AS MeanV range(VALUE) AS Delta BY _time CPU | where MaxV>MeanV*1.3 If you use _time in the stats command, remember to add the bin command before. Ciao. Giuseppe
Hi @orendado , you can tag your data using tags and eventtypes (https://docs.splunk.com/Documentation/SplunkCloud/latest/Knowledge/Abouteventtypes) but maintaining the sourcetype of each data source... See more...
Hi @orendado , you can tag your data using tags and eventtypes (https://docs.splunk.com/Documentation/SplunkCloud/latest/Knowledge/Abouteventtypes) but maintaining the sourcetype of each data source, in this way you have all the parsing rules up and running. I usually define a sorcetype for each type of data, eventually cloning an existing one: e.g. if I have a custom data source in csv format, I'll clone it from the standard csv and I call it "my_sourcetype" (or the name you like). In this way I have all the parsing rules of the csv, eventually adding other specific, and I recognize those logs also by sourcetype. Remember that this is useful only for custom data sources, if you have standard data sources (e.g. Fortinet or Cisco or Checkpoint), it's always better to use the sourcetypes in the add-ons from Splunkbase. This is relevant also because it isn't sufficient to parse the data, but it's also important to normalize data to use them in apps as Enterprise Security. In addition, in these add-ons tags and eventtypes are already defined. Ciao. Giuseppe
We have datamodel which has 2 level DataSet(Datamodel-> Parent Dataset -> Child Dataset). We have defiend a field in Child Dataset and we are able to see that field value on preview.  Datamodel: Cat... See more...
We have datamodel which has 2 level DataSet(Datamodel-> Parent Dataset -> Child Dataset). We have defiend a field in Child Dataset and we are able to see that field value on preview.  Datamodel: Catalyst_App Parent Dataset: Catalyst_Dataset Child Dataset: Security_Advisories_Events Field: Category So when we are trying to run the following tstats query: | tstats summariesonly=false values(Catalyst_Dataset.Security_Advisories_Events.Category) from datamodel=Catalyst_App where nodename=Catalyst_Dataset.Security_Advisories_Events We are getting no results. But at the same time when we run the following datamodel query: | datamodel Catalyst_App Security_Advisories_Events search | fillnull value="-" | table Catalyst_Dataset.Security_Advisories_Events.Category We are getting category values in datamodel query.