cancel
Showing results for 
Search instead for 
Did you mean: 
jcorcoran
Level 11

Sam Linux / Unix filesystem monitor only looks at root (/)

Sam Linux / Unix filesystem monitor only looks at  root - What about the other filesystems ?

How can i add them in the monitoring scripts and get back values ?

I have other people ask the question and could not find an answer ... after a few hours searching and reading in Thwack.

Please help.

0 Kudos
6 Replies
KMSigma Community Manager
Community Manager

Re: Sam Linux / Unix filesystem monitor only looks at root (/)

Are you talking about the "Linux Disk Monitoring Perl" template?

If so, you can easily change the script to change which File Systems you want to watch.

They key line is:

@stat=split(" ",`df -Pm | grep "\/\$"`);

which says "get me the partition sizes and only list out the one that matches '/' exactly"

So:

[root@CentOS-5-x64 ~]# df -Pm

Filesystem         1048576-blocks      Used Available Capacity Mounted on

/dev/mapper/VolGroup00-LogVol00     13794      1531     11552      12% /

/dev/sda1                   99        34        61      36% /boot

tmpfs                      500         1       500       1% /dev/shm

Filters to only show

/dev/mapper/VolGroup00-LogVol00     13794      1531     11552      12% /

Then the script just "extracts" the fourth column (11552) and returns that statistic.

If you wand to change which partition that you query, just change the filter that's being passed to "grep."

"Shoot for the stars to reach the moon"
0 Kudos
jcorcoran
Level 11

Re: Sam Linux / Unix filesystem monitor only looks at root (/)

Thanks -  Thats the problem - I need all the filesystems to be filtered and check for size ?  Not Just root '(/')

0 Kudos
tkitchener
Level 7

Re: Sam Linux / Unix filesystem monitor only looks at root (/)

Hello - I could use some advice on how to configure the body of the script in the template to only monitor the below location

/dev/sda1

I am looking to trigger the alert at over 85% of space used.

Can someone help? I was on the phone with SW support and they would not help me with this part.

Thank you,

Tom

0 Kudos
KMSigma Community Manager
Community Manager

Re: Sam Linux / Unix filesystem monitor only looks at  root (/)

The easier way to do this now is with the SolarWinds Agent for Linux.  No need to do any script editing.

"Shoot for the stars to reach the moon"
tkitchener
Level 7

Re: Sam Linux / Unix filesystem monitor only looks at root (/)

Thank you. I will try that.

0 Kudos
tkitchener
Level 7

Re: Sam Linux / Unix filesystem monitor only looks at root (/)

I was able to get the agent installed without issue. Unfortunately, I do not see the /dev/sda2 in the list resources volume information. Here is a df -h from the XenServer and a shot of its polling in SW. Is there something I am missing?

pastedImage_0.png

pastedImage_1.png

Thank you again! Tom

0 Kudos