All Apps and Add-ons

Unix App and /tmp

mcomfurf
Path Finder

We're monitoring a large number of RHEL boxes with the Unix App, and I notice that on some in the df sourcetype the MountedOn=/tmp information does not get forwarded. I think this depends on what filesystem /tmp is a part of - perhaps the unix App's implementation of df ignores some filesystems?

0 Karma
1 Solution

jkat54
SplunkTrust
SplunkTrust

I'm looking at the df.py code in the 'nix TA. Over here: splunk-app-for-unix-and-linux_510.tgz\splunk_app_for_nix\install\Splunk_TA_nix\bin\df.py

if [ "x$KERNEL" = "xLinux" ] ; then
    assertHaveCommand df
    CMD='df -TPh'
    FILTER_POST='($2 ~ /^(tmpfs)$/) {next}'

Yes, the FILTER_POST is filtering /tmpfs

Lines 22 - 25. FIlter post is used in the AWK command on lines 73 & 74.

The tmp filesystem is apparently filtered for all the versions of 'nix that the app supports. You can tell by viewing the code when the kernel matches sunOS on line 39 for example.

As I have no idea if this was requested by the community or just what the developer chose to do, I'd make edits as needed and document the changes in an SOP and link it to the build & upgrade documentation i maintained.

View solution in original post

0 Karma

mcomfurf
Path Finder

Yes, I think if needed we can hand-edit that on the few servers where it matters.

0 Karma

jkat54
SplunkTrust
SplunkTrust

I'm looking at the df.py code in the 'nix TA. Over here: splunk-app-for-unix-and-linux_510.tgz\splunk_app_for_nix\install\Splunk_TA_nix\bin\df.py

if [ "x$KERNEL" = "xLinux" ] ; then
    assertHaveCommand df
    CMD='df -TPh'
    FILTER_POST='($2 ~ /^(tmpfs)$/) {next}'

Yes, the FILTER_POST is filtering /tmpfs

Lines 22 - 25. FIlter post is used in the AWK command on lines 73 & 74.

The tmp filesystem is apparently filtered for all the versions of 'nix that the app supports. You can tell by viewing the code when the kernel matches sunOS on line 39 for example.

As I have no idea if this was requested by the community or just what the developer chose to do, I'd make edits as needed and document the changes in an SOP and link it to the build & upgrade documentation i maintained.

0 Karma
Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...