LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-22-2012, 06:58 AM   #1
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,784

Rep: Reputation: 49
Question Disk space monitoring through webmin


Hi guys. I just recently discovered webmin, which is very nice. I was wondering if anyone knows if (or how to do it) webmin can send out disk space info on a regular schedule, and also alert if it's below a certain threshold of free space.

What I'm thinking would be cool is if
1)I could get an email every morning basically showing me a "df -h", then
2) have it check on a regular basis (like every 15 minutes or something) throughout the day for if each file system gets past a certain % used, then it would email me letting me know, so I could avoid a file system filling up, which happens quite often on my old servers i cant replace yet
 
Old 08-22-2012, 11:23 AM   #2
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
I'm running Webmin 1.530, and I see a module that was installed by default: "System and Server Status"

Use that to "Add Monitor of Type" -> "Disk Space".

Should be fairly straightforward to configure. Email notification is an option.
 
1 members found this post helpful.
Old 08-27-2012, 10:59 AM   #3
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,784

Original Poster
Rep: Reputation: 49
Thanks anomie. I found the disk space one. Looks like i have to set up a monitor for each volume on here, but i have another question.

Minimum free space, Absolute size OR Percentage of total
Minimum free Inodes

I'm not really sure what to set either of those to in order to get it to report how i want it.
 
Old 08-27-2012, 10:24 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.10, Centos 7.5
Posts: 17,705

Rep: Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496
Well, that's the qn only you can answer; at what point do you want to be notified?
Easiest thing is to use df cmd manually to see what you've got now, then set the values in Webmin to whatever you think is the warning threshold.
You can even deliberately set it below current usage, so Webmin will warn you immediately & you'll see what the output email looks like.
 
1 members found this post helpful.
Old 08-28-2012, 10:00 AM   #5
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,784

Original Poster
Rep: Reputation: 49
Well, i was hoping to setup like a standard daily notification just showing a df -h (so I dont have to manually do them), then i guess i could look at what the levels are now then set up the thresholds like you said. guess % of total might be what i want to use.
 
Old 08-28-2012, 10:38 AM   #6
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,784

Original Poster
Rep: Reputation: 49
I still must be doing something wrong. I set the % to something that should have triggered right away, webmin even changed the font to red since it was below the threshold, but it never set me an email. I had it set to check every 5 minutes, and put my email address in as the send to.
 
Old 08-29-2012, 07:17 AM   #7
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.10, Centos 7.5
Posts: 17,705

Rep: Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496
Well, if the Webmin docs say it should send an email, check the settings for emails, then check the logs eg /var/log/messages, /var/log/maillog and Webmin logs if it has any.
I'm afraid that's where I'd start; I've never used it for that myself.
 
1 members found this post helpful.
Old 08-29-2012, 07:31 AM   #8
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590
Quote:
Originally Posted by rjo98 View Post
I could get an email every morning basically showing me a "df -h", then have it check on a regular basis (like every 15 minutes or something) throughout the day for if each file system gets past a certain % used, then it would email me letting me know
IMHO even if it is part of your daily routine you do not want to have to look at email each morning to confirm disk space status you want to be alerted when usages goes over a preset percentage and possibly have the software Do Something. That sounds (as in using the right tool for the job) like Monit to me. It's light on resources, easily configurable and can watch all sorts of things for you.

Here's an example configuration for checking disk space and running some script:
Code:
# set daemon  60  # 60 second intervals
check filesystem var with path /dev/hdb6
if space usage > 80% for 3 times within 15 cycles then alert
if space usage > 95% for 6 times within 10 cycles then exec '/path/to/some/script'
group server
...and an example for checking (remote) status and DNS, NTP and IMAPS services:
Code:
check host somehost with address 192.168.1.1 every 120 cycles
 if failed icmp type echo count 1 with timeout 30 seconds then alert
 if failed port 53 proto dns with timeout 30 seconds then alert
 if failed port 123 proto ntp3 with timeout 30 seconds then alert
 if failed port 993 type TCPSSL proto imap with timeout 30 seconds then alert
 
1 members found this post helpful.
Old 08-29-2012, 11:45 AM   #9
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,784

Original Poster
Rep: Reputation: 49
Chris, i'll take a look there, thanks.

unSpawn, i'll have ot look at Monit, never heard of it before. I think out of paranoia/habit I'd like to have an email every morning, just so i know where a servers at, then still have some sort of alerting once a volume gets low on space.
 
Old 08-29-2012, 12:00 PM   #10
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,784

Original Poster
Rep: Reputation: 49
nothing in messages or maillog, and i'm not sure where webmin logs are.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Disk Space Monitoring Image1 Linux - Newbie 2 08-09-2010 04:39 AM
Monitoring disk space scottyp55 Red Hat 5 03-22-2010 11:32 AM
script for disk space monitoring jmmo1981 Red Hat 1 05-24-2008 12:25 PM
Monitoring disk space on webserver!!! apache Linux - Software 2 07-27-2004 08:47 AM
monitoring disk space cuss Linux - General 26 02-25-2003 01:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration