Miguel,

you may want to consider parsing the XML for all your clusters
on your server (by connecting to localhost oprt 8651).

This perl for example prints hosts that are down:
------------------------------------------------------------
#!/usr/bin/perl

open (FD, "nc localhost 8651 |") or die "netcat";
while (<FD>) {
        ($cluster) = / NAME="([^"]*)" / if (/^<CLUSTER NAME/);
        $host="";
        ($host,$TN,$TMAX) = / NAME="([^"]*)" .*TN="([^"]*)".*TMAX="([^"]*)"/ if 
(/^<HOST NAME/);
        $cluster =~ s/ /-/g;
        $clusters{$host} .= "$cluster ";
        if (defined $TN{$host}) {
                # Seen this host before - that's not right.
                print "$host duplicate in XML. $clusters{$host} TN=$TN 
TN=$TN{$host}\n";
        }
        if ($host) {
                if ($TN > 10*$TMAX) {
                        printf("$host ($cluster) has not reported for %.1f 
hours (TN=$TN TMAX=$TMAX)\n", $TN/(60*60));
                        $dead{$host}++;
                }
        }
}
foreach $host (sort keys %dead) {
        print "$host in clusters $clusters{$host}\n" if $clusters{$host} =~ /. 
./;
}
---------------------------------------------------------------
It is crude, but OK for the purpose. As all metrics from all servers flow out
as well, you could log or trigger an event with other criteria.
But remember that ganglia is not an alerting tool.

regards,
Richard

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of José Miguel 
Pereira Tavares
Sent: 24 April 2006 16:32
To: ganglia-developers@lists.sourceforge.net
Subject: [Ganglia-developers] Trigger on defined conditions



        Hi all!

        I'm trying to find out if there is tool already developed that would 
trigger when a precondition is achieved for example is a host is dead 
then send a SMS to the system administrator.

        I found on the ganglia-general mailing list a thread started by Leif 
Nixon about this http://sourceforge.net/mailarchive/message.php?msg_id=2212186

        I would like to avoid the installing nagios (keep it simple) if 
possible, and from the choices given in 
http://sourceforge.net/mailarchive/message.php?msg_id=2214585
by Steven Wagner, I think that creating a small application (option #3) 
would be the fastest to develop and probably the most powerfull way of 
doing this (using a scripting language such as python or pearl).

        So has any work been done on this subject?

        Thanks in advance for any information,

                        Miguel Tavares
-- 

"Until they become conscious they will never rebel,
 and until after they have rebelled they cannot become conscious."

        - George Orwell's 1984 - 


------------------------------------------------------------------------
For more information about Barclays Capital, please
visit our web site at http://www.barcap.com.


Internet communications are not secure and therefore the Barclays 
Group does not accept legal responsibility for the contents of this 
message.  Although the Barclays Group operates anti-virus programmes, 
it does not accept responsibility for any damage whatsoever that is 
caused by viruses being passed.  Any views or opinions presented are 
solely those of the author and do not necessarily represent those of the 
Barclays Group.  Replies to this email may be monitored by the Barclays 
Group for operational or business reasons.

------------------------------------------------------------------------


Reply via email to