Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2F3769725 for ; Wed, 8 Feb 2012 17:26:31 +0000 (UTC) Received: (qmail 65659 invoked by uid 500); 8 Feb 2012 17:26:29 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 65478 invoked by uid 500); 8 Feb 2012 17:26:28 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 65469 invoked by uid 99); 8 Feb 2012 17:26:28 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Feb 2012 17:26:28 +0000 X-ASF-Spam-Status: No, hits=2.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_REPLY,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of tamil.3758@gmail.com designates 209.85.216.172 as permitted sender) Received: from [209.85.216.172] (HELO mail-qy0-f172.google.com) (209.85.216.172) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Feb 2012 17:26:21 +0000 Received: by qcsg13 with SMTP id g13so516296qcs.31 for ; Wed, 08 Feb 2012 09:26:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=ben6bYenc7HQ483uD9n9LNFzJdLo8/fP5UaPNJeuKpU=; b=Cmt78t35tKJQqvH9CEwASXlZ6M69DJGH7E1+f6hnD281dlrhZ8xtCougfS9TdgOEqm c6LZ0zm4FNoi9cwg1Bh6kvl4oiAvmA0+0vaHP8yK8c7iFgxIaQBQyJLSF01R5dTTuvBm /euCFrXWme9NT4klYqUGdBTOYPBFhpfl4TUJI= MIME-Version: 1.0 Received: by 10.224.33.66 with SMTP id g2mr27748633qad.71.1328721960315; Wed, 08 Feb 2012 09:26:00 -0800 (PST) Received: by 10.229.77.85 with HTTP; Wed, 8 Feb 2012 09:26:00 -0800 (PST) In-Reply-To: References: Date: Wed, 8 Feb 2012 22:56:00 +0530 Message-ID: Subject: Re: Best way to know the cluster status From: "Tamil selvan R.S" To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=20cf3074b586732ca504b8773024 X-Virus-Checked: Checked by ClamAV on apache.org --20cf3074b586732ca504b8773024 Content-Type: text/plain; charset=ISO-8859-1 Hi I fixed the issue. I used ConnectionPools with one server each, with send and recv timeout to 20Sec. Catching Cassandra Exception. This worked for me. Thanks for the response Regards, Tamil On Mon, Feb 6, 2012 at 5:38 PM, Sasha Dolgy wrote: > Tamil, what is the underlying purpose you are trying to achieve? To > have your webpages know and detect when a node is down? To have a > monitoring tool detect when a node is down? PHPCassa allows you to > define multiple nodes. If one node is down, it should log information > to the webserver logs and continue to work as expected if an alternate > node is available. > > Parsing the output of "nodetool ring" is OK if you want the status at > that very moment. Something more reliable should be considered, > perhaps using JMX and a proper monitoring tool, like Nagios or > Zenoss...etc. > > On Mon, Feb 6, 2012 at 8:59 AM, R. Verlangen wrote: > > You might consider writing some kind of php script that runs nodetool > "ring" > > and parse the output? > > > > 2012/2/6 Tamil selvan R.S > >> > >> Hi, > >> What is the best way to know the cluster status via php? > >> Currently we are trying to connect to individual cassandra instance > with > >> a specified timeout and if it fails we report the node to be down. > >> But this test remains faulty. What are the other ways to test > >> availability of nodes in cassandra cluster? > >> How does datastax opscenter manage to do that? > >> > >> Regards, > >> Tamil Selvan > > > > > > > > -- > Sasha Dolgy > sasha.dolgy@gmail.com > --20cf3074b586732ca504b8773024 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi I fixed the issue. I used ConnectionPools with one server each, with sen= d and recv timeout to 20Sec. Catching Cassandra Exception. This worked for = me. Thanks for the response

Regards,
Tamil

On Mon, Feb 6, 2012 at 5:38 PM, Sasha Dolgy = <sdolgy@gmail.com<= /a>> wrote:
Tamil, what is the underlying purpose you are trying to achieve? =A0To
have your webpages know and detect when a node is down? =A0To have a
monitoring tool detect when a node is down? =A0PHPCassa allows you to
define multiple nodes. =A0If one node is down, it should log information to the webserver logs and continue to work as expected if an alternate
node is available.

Parsing the output of "nodetool ring" is OK if you want the statu= s at
that very moment. =A0Something more reliable should be considered,
perhaps using JMX and a proper monitoring tool, like Nagios or
Zenoss...etc.

On Mon, Feb 6, 2012 at 8:59 AM, R. Verlangen <
robin@us2.nl> wrote:
> You might consider writing some kind of php script that runs nodetool = "ring"
> and parse the output?
>
> 2012/2/6 Tamil selvan R.S <= tamil.3758@gmail.com>
>>
>> Hi,
>> =A0What is the best way to know the cluster status via php?
>> =A0Currently we are trying to connect to individual cassandra inst= ance with
>> a specified timeout and if it fails we report the node to be down.=
>> =A0But this test remains faulty. What are the other ways to test >> availability of nodes in cassandra cluster?
>> =A0How does datastax opscenter manage to =A0do that?
>>
>> Regards,
>> Tamil Selvan
>
>



--
Sasha Dolgy
sasha.dolgy@gmail.com

--20cf3074b586732ca504b8773024--