- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to configure one script to send mail alert...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-06-2010 10:56 AM
тАО07-06-2010 10:56 AM
Re: How to configure one script to send mail alerts if filesystem is reaching 90%
If memory serves me, you could set to notify for CPU,swap,disk I/O, and Filesystem utilization. Maybe, you could just add a line (under red alert) that sends an email when it hits red.
Just a thought,
Rita
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-06-2010 11:19 AM
тАО07-06-2010 11:19 AM
Re: How to configure one script to send mail alerts if filesystem is reaching 90%
#-----------Variables
RD1=/tmp/script/check.log
#-----------Truncate
cat /dev/null > $RD1
#------------Logic
df -h | grep dev | awk '{if($5 > 90)print $5, " ", $6}' > $RD1
exec < $RD1
i=0
while read line
do
x=`cat check.log | awk '{print $1}'`
if [ "$x" > 90 ]
then
mailx # Email ID of the Person and File name $RD1
fi
i=`expr $i + 1`
done
Regards
Ishwar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-06-2010 11:23 AM
тАО07-06-2010 11:23 AM
Re: How to configure one script to send mail alerts if filesystem is reaching 90%
Bill Hassell offers a nice filesystem monitoring script with notifications here:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1130400
See his commentary and attachment in the thread above.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-06-2010 10:34 PM
тАО07-06-2010 10:34 PM
Re: How to configure one script to send mail alerts if filesystem is reaching 90%
Hi Senthil,
Below is a part of my script that monitor filesystem. Hope it helps.
df -l |awk '{print $1}' > /tmp/mountlist
cat /tmp/mountlist | while read LINE
do
PERC=`df -k ${LINE} | grep allocation| awk '{print $1}'`
if [ $PERC -gt 95 ]; then
if [ $PERC -gt 98 ]; then
echo "CRITICAL ${PERC}%" | mailx -s "CRITICAL: ${LINE} on `hostname` is almost full ${PERC}%" ${SYSADM2}
else
echo "WARNING ${PERC}%" | mailx -s "WARNING: ${LINE} on `hostname` is almost full ${PERC}%" ${SYSADM2}
fi
fi
Regards
Mohan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-07-2010 03:26 AM
тАО07-07-2010 03:26 AM
Re: How to configure one script to send mail alerts if filesystem is reaching 90%
I have changed my script as follows.
#!/bin/sh
RESULTS=$(bdf | awk 'z[split($5,z,"%")-1]>90' | grep -v Filesystem)
[ -z "${RESULTS}" ] || echo "$RESULTS" | mailx -r abc@company.com -s "$HOST Filesystems > 90%" abc@company.com
Now it working fine.
Thanks a lot for all.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-07-2010 03:28 AM
тАО07-07-2010 03:28 AM
Re: How to configure one script to send mail alerts if filesystem is reaching 90%
- « Previous
-
- 1
- 2
- Next »