Monitoring Splunk

cpu usage per user view fails after update to version 5

sansay
Contributor

One of the views in my Splunk health dashboard which showed the users' consumption of cpu due to searches no longer work now that we have updated to version 5.0.4.

Here is the query: index=os sourcetype=ps host=lv-snp-prdsplunk* OR host=lvp-snp-prsplnki* splunkd search pctCPU | multikv fields pctCPU USER | rex field=raw "--user=(?[^-]+)(?=)" | search USER=splunk SPL_USER=* | timechart sum(pctCPU) by SPL_USER useother=false limit=100

After reducing my query to: index=os sourcetype=ps host=lv-snp-prdsplunk* OR host=lvp-snp-prsplnki* splunkd pctCPU | multikv fields pctCPU USER | rex field=raw "--user=(?[^-]+)(?=)"

I realized that the both string "search" and value "--user=..." have disappeared.
Anybody knows another way to do this?

Tags (2)
0 Karma
1 Solution

sansay
Contributor

Well I finally found the time to investigate this issue. Here is the solution:
index=os sourcetype=ps host=lvp-snp-prsplnki* splunkd search NOT splunk-system-user | multikv fields pctCPU USER | rex field=raw "--user=(?.+)--pro" | where IsNotNull(USER) | timechart span=1m useother=false limit=0 sum(pctCPU) by SPL_USER

It seems that many things in the logs changed since this used to work.

View solution in original post

0 Karma

sansay
Contributor

Well I finally found the time to investigate this issue. Here is the solution:
index=os sourcetype=ps host=lvp-snp-prsplnki* splunkd search NOT splunk-system-user | multikv fields pctCPU USER | rex field=raw "--user=(?.+)--pro" | where IsNotNull(USER) | timechart span=1m useother=false limit=0 sum(pctCPU) by SPL_USER

It seems that many things in the logs changed since this used to work.

0 Karma
Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...