Splunk Search

How do you display the ulimit values for a group of servers in a chart so that they can be compared?

rholm01
Explorer

index=_internal host=* source=*splunkd.log ulimit is what I found that works. I would to make sure that certain groups of servers have the same ulimit settings for consistency and to meet or exceed Splunk recommendations.

Tags (1)
0 Karma
1 Solution

valiquet
Contributor
|rest /services/server/sysinfo  | stats  values(ulimit) by splunk_server 

Straing from Splunk web UI in 2 seconds

View solution in original post

0 Karma

valiquet
Contributor
|rest /services/server/sysinfo  | stats  values(ulimit) by splunk_server 

Straing from Splunk web UI in 2 seconds

0 Karma

FrankVl
Ultra Champion

You'd first have to write a few rex commands to extract the ulimit values from those events, for example:

| rex field=event_message "cpu time: (?<cpu_time>\S+)"

And then the same for the other limits.

then add something like:

| stats latest(cpu_time) latest(open_files) by host

adding such a latest() for each extracted limit field.

0 Karma

rholm01
Explorer

I did not get any results for the following:
| rex field=event_message "cpu time: (?\S+)" | stats latest(cpu_time) by host

Running the following command I get the ulimits value for one of my hosts (blanked out the host name:
index=_internal source=*splunkd.log ulimit host="xxxxxxxxxxxx.com"

event_message
Linux vm.overcommit setting, value="0"
Linux transparent hugepage support, enabled="never" defrag="never"
Limit: cpu time: unlimited
Limit: user processes: 16000 processes
Limit: open files: 64000 files [hard maximum: 1048576 files]
Limit: data file size: unlimited
Core file generation disabled.
Limit: core file size: 0 bytes [hard maximum: unlimited]
Limit: stack size: 8388608 bytes [hard maximum: unlimited]
Limit: resident memory size: unlimited
Limit: data segment size: unlimited
Limit: virtual address space size: unlimited

0 Karma

FrankVl
Ultra Champion

So index=_internal source=*splunkd.log ulimit host="xxxxxxxxxxxx.com" gives the result as you are showing, with that data in the event_message field?

Then I don't follow why the below wouldn't work.

index=_internal source=*splunkd.log ulimit host="xxxxxxxxxxxx.com"
| rex field=event_message "cpu time: (?<cpu_time>\S+)"
| stats latest(cpu_time) by host
0 Karma
Get Updates on the Splunk Community!

Splunk Mobile: Your Brand-New Home Screen

Meet Your New Mobile Hub  Hello Splunk Community!  Staying connected to your data—no matter where you are—is ...

Introducing Value Insights (Beta): Understand the Business Impact your organization ...

Real progress on your strategic priorities starts with knowing the business outcomes your teams are delivering ...

Enterprise Security (ES) Essentials 8.3 is Now GA — Smarter Detections, Faster ...

As of today, Enterprise Security (ES) Essentials 8.3 is now generally available, helping SOC teams simplify ...