On 7/13/2012 9:11 AM, L.M.J wrote:
Le 13/07/2012 07:42, Eliezer Croitoru a écrit :
On 7/11/2012 10:23 PM, L.M.J wrote:
Hi,
I'm looking for a solution to monitor cpu/disk usage on several
servers and
it send me an email if there is an alert level reached.
BUT I'm looking for a autonomous solution, I don't want a
centralized web
page interface
you can also use snmp and a simple cronjobs on one centralized
machine that will check all the others every 5\10 minutes and will
send the results in a case of "warring\critical" state.
it's a piece pf cake to put it all together.
Hello Eliezer,
I don't want centralized monitoring, I need a self-sufficient & light
monitoring tool. My best horse for centralized monitoring is XYmon, I do
really love it ;)
so i'm sorry but you are not clear enough to understand what you are
seeking for.
you dont need a centralized web interface .. but what you do want?
one machine that will do the checks?
every machine by itself?
if you want one machine that will monitor the others the solution i gave
you is good.
if no you can just use nagios check plugins to do the tests for you
inside a cronjob script.
nagios plugins by themselves have good interface to indicate and check
status by strict defined levels.
they have an exit code for each state...
so just run a nice if else script:
here an example i am using..
##check_icap start
#!/bin/sh
/usr/lib64/nagios/plugins/check_tcp -H 127.0.0.2 -p 1344 >>/dev/null
result=`echo $?`
FILE=/tmp/icapdown
case "$result" in
0)
rm /tmp/icapdown
icap="ok"
;;
*)
if [ ! -f $FILE ];
then
/scripts/sendmail.sh ICAP
touch /tmp/icapdown
fi
exit 1
esac
##check_icap end
##sendmail.sh start
#!/bin/bash
[email protected]
SERVICE=$1
[email protected]
cat << EOF | /usr/sbin/sendmail -f $FROM -t "$USER"
From: [email protected]
To: $USER
Subject:#### $SERVICE is down
Content-Type: text/plain; charset=UTF-8
$SERVICE DOWN.
EOF
##sendmail.sh send
--
Eliezer Croitoru
https://www1.ngtech.co.il
IT consulting for Nonprofit organizations
eliezer <at> ngtech.co.il
--
ubuntu-server mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
More info: https://wiki.ubuntu.com/ServerTeam