Activity Feed
- Karma Re: Extract text from message field for richgalloway. 11-15-2023 06:53 AM
- Posted Extract text from message field on Splunk Search. 11-14-2023 11:38 AM
- Posted How to search to exclude part of DIR from windows log? on Getting Data In. 07-26-2023 09:39 AM
- Got Karma for loop to create new dashboard panels. 07-27-2022 09:04 AM
- Posted Re: Multiple conditions case statements on Alerting. 02-12-2021 11:08 AM
- Karma Re: Multiple conditions case statements for scelikok. 02-12-2021 11:08 AM
- Posted Multiple conditions case statements on Alerting. 02-11-2021 09:34 AM
- Tagged Multiple conditions case statements on Alerting. 02-11-2021 09:34 AM
- Karma Re: How to automatically rerun failed alerts for richgalloway. 02-05-2021 10:23 AM
- Posted How to automatically rerun failed alerts on Splunk Search. 02-05-2021 09:44 AM
- Posted Word wrap column names in a table on Splunk Search. 10-22-2020 08:12 AM
- Karma Re: I want to continuously rerun an alert that fails until it is successful for Richfez. 10-15-2020 12:08 PM
- Karma Re: I want to continuously rerun an alert that fails until it is successful for Richfez. 10-15-2020 12:08 PM
- Posted Re: I want to continuously rerun an alert that fails until it is successful on Splunk Search. 10-15-2020 05:30 AM
- Posted I want to continuously rerun an alert that fails until it is successful on Splunk Search. 10-14-2020 11:45 AM
- Posted Re: combine two evals in to a single case statement on Splunk Search. 09-25-2020 06:38 AM
- Posted combine two evals in to a single case statement on Splunk Search. 09-24-2020 09:38 AM
- Tagged combine two evals in to a single case statement on Splunk Search. 09-24-2020 09:38 AM
- Tagged combine two evals in to a single case statement on Splunk Search. 09-24-2020 09:38 AM
- Karma Re: Reason field using multiple criteria for ITWhisperer. 09-16-2020 09:09 AM
Topics I've Started
Subject | Karma | Author | Latest Post |
---|---|---|---|
0 | |||
0 | |||
0 | |||
0 | |||
0 | |||
0 | |||
0 | |||
0 | |||
0 | |||
0 |
11-14-2023
11:38 AM
I need to extract a string from a message body, and make a new field for it. <Junk_Message> #body | Thing1 | Stuff2 | meh4 | so on 1 | extra stuff3 | Blah4 </Junk_Message> I just need the text that start with #body and end with Blah4. To make things more fun everything after #body generates randomly.
... View more
Labels
- Labels:
-
field extraction
07-26-2023
09:39 AM
Hello All, I'm trying to run query that will allow me to exclude events with part of a file path built in a windows event. The event looks like this alert: %PlaceStuffIsStored%\ANYTHING\STUFF\And\Things\Blah\Blah\Blah\Blah.EXE was allowed to run but would have been prevented from running if the AppLocker policy were enforced. I was able to Rex out the file path to now I have a new field called path which is Dir Dir=%PlaceStuffIsStored%\ANYTHING\STUFF\And\Things\Blah\Blah\Blah\Blah.EXE I've tried the basics but no luck Search!="*ANYTHING\STUFF\*" |mysearch Not (Dir="*ANYTHING\STUFF\*") Thanks
... View more
02-12-2021
11:08 AM
That was it, sometimes staring at your own code can make you miss the simple stuff.
... View more
02-11-2021
09:34 AM
I'm running a query to label memory thresholds for our app clusters, I would like to create a field called "eff_mem_threshold" based off the number of blades app name. But for the life of me I can't figure out why this case statement isn't working. What I mean is that it only returns the eff_mem_threshold value of the first pair for each app and blade count. I've added an example below the case statement Case statement query|eval eff_mem_threshold =case(APP_NAME="EXCH_AD" and Blades<=5, 40,APP_NAME="EXCH_AD" and Blades>=17,46,APP_NAME="EXCH_AD" and Blades>=6 and Blades<=16,44,APP_NAME="VCO" and Blades<=5, 56,APP_NAME="VCO" and Blades>=17,64,APP_NAME="VCO" and Blades>=6 and Blades<=16,61,APP_NAME="SQL" and Blades<=5, 68,APP_NAME="SQL" and Blades>=17,78,APP_NAME="SQL" and Blades>=6 and Blades<=16,74) what I see APP_NAME Blades eff_mem_threshold EXCH_AD 15 40 EXCH_AD 4 40 SQL 17 68 SQL 9 68 VCO 17 56 VCO 4 56 What I'd want to see APP_NAME Blades eff_mem_threshold EXCH_AD 15 44 EXCH_AD 4 40 SQL 17 64 SQL 9 61 VCO 78 56 VCO 4 56
... View more
- Tags:
- eval
02-05-2021
09:44 AM
Hi, I have 14 alerts that cover all the infrastructure, my company uses. I get my data from a data bus every 60 minutes, but when that fails and it can for (several hours at a time). I would like to not have to rerun the alerts manually. As a note I don't any elevated access to the Splunk instance or the environment so I can't install apps, add-ins, or update any conf files, but I do have access to the audit and internal indexes. Ideally I'd like my conditional trigger to be something like this: index=_internal sourcetype=scheduler status=!success savedsearch_name="Stuff to search" | table _time search_type status user app savedsearch_name result_count |where result_count=0 then <search/commands to rerun alert every hour until results are in>
... View more
Labels
- Labels:
-
subsearch
10-22-2020
08:12 AM
I have an email alert that is set to go out every morning. I have a bunch of long field names that get cut off randomly in the inline table that is in the body of the email. For example I have a field named "Provisioning Status" in the email alerts it is displayed as "Provision ing Status" I'd like the field to be displayed as "Provisioning Status" What can I do?
... View more
10-15-2020
05:30 AM
@Richfez We have the alert in place if something breaks, and our api calls are configured to go out and collect the data that they missed during the outage. What I'm trying to do is have these reports rerun and send out when the data that was delayed hits my index. I'm just lazy and want to avoid manually rerunning each report when this happens.
... View more
10-14-2020
11:45 AM
I have something like 20+ alerts that give my team telemetric data on our ESX and Storage clusters. We collect our metrics from a data bus via API calls and then send them into splunk for analysis. Sometimes when the team that manages the data bus has an issue my reports don't trigger unless I manually run them. I want to know if there is a way that I can create a query that will continuously run every hour until that alert completes with results.
... View more
Labels
- Labels:
-
search job inspector
-
subsearch
09-25-2020
06:38 AM
@ITWhisperer unfortunately they are not mutually exclusive. I was thinking something like this should work but I can't seem to get it right. eval TP=case(((storage-model="A" OR storage-model="B"), (TCap*1.5)-LProv))
... View more
09-24-2020
09:38 AM
I have 1600+ storage arrays and they are from multiple vendors, each with different thin provisioning levels. I currently have two columns one called TP at 1.2 and one called TP at 1.5. I'd like to combine them into a single column. I tried an if statement, but I couldn't get it right, I'm thinking I need to use a case statement but I'm not sure. Here is an example eval "Thin Prov"=Case(((SV='vendorA' AND SM='MODEL1' OR SM='Model2'),(TC*1.5), (SV='vendorb' AND SM='Model3' or SM='Model4',TC*1.2))
... View more
Labels
- Labels:
-
eval
09-15-2020
10:34 AM
I can get one group values fine, but when I add another set of values, the eval command gets malformed.
... View more
09-15-2020
08:04 AM
Hello all, I trying to get a reason field to generate based on field values as to why a system is showing up in a report. This is the example of the where clause I'm using, that defines what I'm looking for. | where ((system_class="Echo") AND ('Mem_Util'>=83 OR 'CPU_Util'>=83 OR 'Mem_Al'>=100 OR 'CPU_Al'>=110)) For example if I Mem_Util is the reason it shows up on the report, I want a reason field to display at the end of the output that says Memory Util. What makes it more interesting is that I have 5 different system_classes with 5 different levels of of values for each of the 4 metrics.
... View more
Labels
- Labels:
-
eval
09-02-2020
08:11 AM
@Nisha18789 Thank you so much, that helped a ton. My next question is how do I get it to build off a list for all of these? class Green Yellow Red DB <60.0 >=68.0 >=75.0 WEB <55.0 >=63.0 >=93.0 APP <50.0 >=80.0 >=90.0 ZFS <45.0 >=66.0 >=85.0
... View more
09-02-2020
05:52 AM
Hello Everyone, I have a really simple question but I can'f figure it out for the life of me. I have a query set up that gives me the utilization of an array, and I want to have a text based field for its RAG status. This is what I'm using | eval RAG=(Class='DB' AND Utilization >= 62, "Red", Utilization >= 50, "Yellow", Utilization < 40, "Green") I've tried to run it and I keep getting the eval statement is malformed error. Any help you can give would be appreciated.
... View more
Labels
- Labels:
-
eval
07-13-2020
09:50 AM
I like to use an If or case statement ideally based of the vendor or storage array name. something along the lines like this query|eval if(vendor="vendor 1(then eval Capacity(TiB) = (((Capacity_GB)*1.1)/1024)*0.909495 | eval "provisioned (TiB)" = (((provisionedGB)*1.1)/1024)*0.909495 | eval "Written(TiB)" = ((((usedGB)*1.1)/1024)*0.909495)/2
... View more
07-13-2020
08:42 AM
I have a bunch of storage clusters that we monitor, 60% of the envrioment uses normal GB, the other 40% uses GiB. I need to show all of the storage arrays in 1 report and normalize the storage to GB, and the only field that is different between the storage besides the array name is "storage vendor" . I need to create an If statement if vendor is like "X" run these evals |eval _GB_TiB = (((Capacity_GB)*1.1)/1024)*0.909495 | eval "Prov(TiB)" = (((prov_GB)*1.1)/1024)*0.909495 | eval "Written(TiB)" = ((((writtedGB)*1.1)/1024)*0.909495)/2
... View more
Labels
- Labels:
-
eval
04-21-2020
08:56 AM
I have a search that looks at the output of a few scripts and lets me know if they are not running. These scripts cover our data collection for the instance, from our data lake. For example if the asset script fails I like to see something in status field showing "Asset Collector broke!" in the status field. I want to create a status field to update for each scenario of the 3 different scenarios based on the avg number of results returned. This is what I tried so far in various forms, thanks for the help.
basesearch|stats avg(assets_collected) as ac avg(metrics_returned) as metrics avg(no_metrics) as not_returned
|eval status=case(ac==0, "Asset Collector broke!", assets==not_returned,"Cron Failure!",metrics==0,"Data Lake Failure!"
... View more
11-20-2019
10:35 AM
That worked, how would I repeat the process for Tier_3 where the values are different from Tier_1 and Tier 2 in the same query?
... View more
11-20-2019
08:54 AM
Hello,
I'm building a search that tracks the use of memory allocated(mem_alloc), memory in use(mem_used), CPU in use(CPU_used) CPU allocated (CPU_alloc) along with the Cluster type (CT) for our vmware envrioment. My base query works perfect but when I try to build the logic behind it using where, and , or. I keep getting false positives, like the example below.
where CT=Tier_1 or CT=Tier_2 and CPU_used>=50 or mem_used>=50 or mem_alloc>=0.9 or CPU_alloc>=0.9
I end up getting results that have different cluster tiers in them
|CT | |CPU_used| |mem_used| |mem_alloc| |CPU_alloc|
|Tier_2 |50.01| |25.35| |.82 | |.82 |
|Tier_1 |62.23| |72.33| |.90 | |.65 |
|Tier_2 |45.53| |32.55| |.97 | |.55 |
|Tier_4 |23.25| |36.58| |1.01| |3.25|
|Tier_5 |40.32| |85.15| |3.25| |1.11|
I need to find a way to be able to narrow it down to Tier_1 or Tier_2 clusters only, and alert if any of the values break the thresholds in the where statements.
... View more
09-30-2019
11:16 AM
Giuseppe,
I want to pass the clicked value of the stats table(POOL_NAME) through as a search for a time chart. so that it can do this
search STUFF POOL_NAME="$THING_CLICKED_ON$" |timechart avg(PCT_UTILIZED) as PCT |predict PCT as Growth.
... View more
09-30-2019
08:47 AM
I want to create a drill down that will go from a value on a stats table a time chart for the clicked pool name in a new tab, I've been at this for a few hours now and I can't seem to get it to work.
Here is the current XML:
<panel>
<table>
<title>Pool Stats</title>
<search>
<query>index=Stuff| SERVER_NAME="$SERVER_NAME$"|dedup POOL_NAME|stats avg(eval(if(PCT_UTILIZED==0,null(),PCT_UTILIZED))) as Used by POOL_NAME|sort -Used | head 10</query>
<earliest>0</earliest>
<latest></latest>
</search>
<option name="drilldown">row</option>
</table>
Thanks in advance.
... View more
09-30-2019
08:40 AM
I want to create a drill down that will go from a value on a stats table a time chart for the clicked pool name in a new tab, I've been at this for a few hours now and I can't seem to get it to work.
Here is the current XML:
<table>
<title>Pool Stats</title>
<search>
<query>index=Stuff| SERVER_NAME="$SERVER_NAME$"|dedup POOL_NAME|stats avg(eval(if(PCT_UTILIZED==0,null(),PCT_UTILIZED))) as Used by POOL_NAME|sort -Used | head 10</query>
<earliest>0</earliest>
<latest></latest>
</search>
<option name="drilldown">row</option>
</table>
</panel>
... View more
09-19-2019
06:29 AM
Hey so I have a list of of values, that need to be standardized. The values I'm need to transform look like this:
Pool1-dp
Pool2-dp
Pool3_MSDP
Pool4_MSDP
Pool5-dp
I need to trim the values to just have their proper pool names (Pool1). Here is the SPL
MySearch|rex mode=sed field="Field1" s/"(-dp)|(_MSDP)" but, when I run it in my instance I keep getting errors like this one.
Error in 'rex' command: Failed to initialize sed. Failed to parse the regex to replace.
I've spent about 4 hours trying to figure this out and I jut cant seem to do it. I wrote the REX in regex101, and it works there with no problem there. I did a bunch of googling and I tried most of the posts here at splunk answers, any help would be very appreciated.
Disclaimer I do not have access to the server where the instance is hosted, just the instance itself.
... View more
08-30-2019
08:36 AM
1 Karma
I have a list of 51 locations, and I want to create dashboard that displays the results of the query below in a separate panel for each site.
index= index cluster=""site=""| bin _time span=1d|eval time=(time)|eventstats sum(dscapacityGB) as capacity sum(dsfreeGB) as free sum(dsgarbageGB) as garbage sum(vmdkallocGB) as vmdkallocated sum(vmdkusedGB) as vmdkused by cluster, _time|eval allocated = round((capacity),2)|eval utilization= round(((vmdkused+garbage)-capacity),2)|chart sum(allocated) as allocated avg(capacity) as capacity by site|eval capacity=round(capacity,2)|eval allocated=round(allocated,2)
I could do this manually, but I wanted to know if there was a for loop that can do it for me.
... View more
08-29-2019
06:59 AM
This worked thank you
index=test cluster="*"| bin _time span=1d|eval time=(time)|eventstats sum(dscapacityGB) as capacity sum(dsfreeGB) as free sum(dsgarbageGB) as garbage sum(vmdkallocGB) as vmdkallocated sum(vmdkusedGB) as vmdkused by cluster, _time|eval over_allocated = round((vmdkallocated/free),2)|eval utilization= round(((vmdkused+garbage)/capacity),2)|eval capacity = round((capacity),2)|eval free = round((free),2)|
eval garbage = round((garbage),2)|eval vmdkallocated = round((vmdkallocated),2)|eval vmdkused = round((vmdkused),2)|dedup _time cluster|table _time cluster capacity free garbage vmdkallocated vmdkused over_allocated utilization|where utilization>=0.75|sort -utilization
... View more