Big news! The community will be moving to a new platform April 21. Read more.
Big news! The community will be moving to a new platform April 21. Read more.
Absent Member.
Absent Member.
1252 views

Useed percent email alert on NSS volumes

I was wondering if there is a way to setup OES to send email alerts when a drive gets to a specified % free in space?

Sincerely,
Ken
Labels (2)
0 Likes
6 Replies
Absent Member.
Absent Member.

kheinz;2343040 wrote:
I was wondering if there is a way to setup OES to send email alerts when a drive gets to a specified % free in space?

Sincerely,
Ken



OES11 Sp2 already include a built-in nagios so it's possible to configure it to do what you need.

https://www.novell.com/documentation/oes11/mgmt_remotemgr_lx/data/nagios-view.html


Martin Dallaire
0 Likes
Knowledge Partner Knowledge Partner
Knowledge Partner

On Fri, 19 Dec 2014 17:06:02 GMT, kheinz
<kheinz@no-mx.forums.novell.com> wrote:

>
>I was wondering if there is a way to setup OES to send email alerts when
>a drive gets to a specified % free in space?
>
>Sincerely,
>Ken


I used to have a Taskmaster script that did this on my Netware
servers. I imagine somebody somewhere has a bash script that would do
the same thing on OES. Then you could cron it to run on whatever type
schedule you want. I'm still learning my way around scripting on
linux, but maybe someone more knowledgeable has one to share.

Ken
--
Ken
Knowledge Partner

Create and vote for enhancements in the Idea Exchange forums!
Don't forget to Like helpful posts and mark Solutions!
0 Likes
Absent Member.
Absent Member.

A simple script like that can maybe do the job for you. You can modify it to your need

--------------------------------------------
#!/bin/bash
VOLUMENAME="DATA"
SENDER="sender@email.com"
ADMINEMAIL="admin@email.com"
VAR=`df -h | grep $VOLUMENAME | awk '{print $5}'`
RESULT=`echo $VAR | sed "s/%$//"`
SPACELEFT=$((100-$RESULT))

if [ "$SPACELEFT" -le "30" ]
then
echo "The space left on volume $VOLUMENAME is $SPACELEFT%" | mailx -r $SENDER -s "Space left alert on $HOSTNAME" $ADMINEMAIL

fi
----------------------------------------

Martin Dallaire
0 Likes
Knowledge Partner Knowledge Partner
Knowledge Partner

On Fri, 19 Dec 2014 21:46:01 GMT, mdallair
<mdallair@no-mx.forums.novell.com> wrote:

>
>A simple script like that can maybe do the job for you. You can modify
>it to your need
>
>--------------------------------------------
>#!/bin/bash
>VOLUMENAME="DATA"
>SENDER="sender@email.com"
>ADMINEMAIL="admin@email.com"
>VAR=`df -h | grep $VOLUMENAME | awk '{print $5}'`
>RESULT=`echo $VAR | sed "s/%$//"`
>SPACELEFT=$((100-$RESULT))
>
>if [ "$SPACELEFT" -le "30" ]
>then
>echo "The space left on volume $VOLUMENAME is $SPACELEFT%" | mailx -r
>$SENDER -s "Space left alert on $HOSTNAME" $ADMINEMAIL
>
>fi
>----------------------------------------
>
>Martin Dallaire


Slick. Just read up on awk and sed and learned something new. Thanks.

KeN
--
Ken
Knowledge Partner

Create and vote for enhancements in the Idea Exchange forums!
Don't forget to Like helpful posts and mark Solutions!
0 Likes
Absent Member.
Absent Member.

Thanks to all. I will look into those options.

Sincerely,
Ken
0 Likes
Absent Member.
Absent Member.

mdallair wrote:
>
> kheinz;2343040 Wrote:
>> I was wondering if there is a way to setup OES to send email alerts when
>> a drive gets to a specified % free in space?


> OES11 Sp2 already include a built-in nagios so it's possible to
> configure it to do what you need.


The plugin check_disk of nagios does not have an option to check NSS
volumes only. To I simply exclude all other types in order to just get NSS:

# 'check_local_disk_nssvol' command definition
define command{
command_name check_local_disk_nssvol
command_line sudo /usr/lib/nagios/plugins/check_disk -w
$ARG1$ -c $ARG2$ -X nsspool -X xfs -X debugfs -X proc -X sysfs -X tmpfs
-X devpts -X
ext2 -X ext3 -X ext4 -X btrfs -X reiserfs -X fusectl -X securityfs -X
adminfs -X binfmt_misc -X proc -X nssadmin -X novfs
}

See any documentation on Nagios on how to send email alerts upon
specific events.

Günther

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.