[Geoserver-users] supervising geoserver status

Hi there,

is it possible to monitor Geoserver status to detect unexpected shutdown as
soon as possible? For this purpose, is it adequate to just supervise tomcat,
not especially geoserver?

I found this link:
http://docs.geoserver.org/stable/en/developer/programming-guide/ows-services/implementing.html
in this context.

What would be the best way to use such an ows for supervising, if geoserver
is up and alive?

Thanks for answering.

Gabriele

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/supervising-geoserver-status-tp4659649p4659649.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Gabriele,

I guess you are looking for a watchdog [1] that checks the (tomcat) service and restarts it if any unexpected shutdown has happened. That acts independently from the different webapps within the container and the (ows) plugins for geoserver in specific.

Cheers,
Frank

[1] http://en.wikipedia.org/wiki/Watchdog_timer

2012/3/27 Gabriele Seitz <ml-seitz@anonymised.com>

Hi there,

is it possible to monitor Geoserver status to detect unexpected shutdown as
soon as possible? For this purpose, is it adequate to just supervise tomcat,
not especially geoserver?

I found this link:
http://docs.geoserver.org/stable/en/developer/programming-guide/ows-services/implementing.html
in this context.

What would be the best way to use such an ows for supervising, if geoserver
is up and alive?

Thanks for answering.

Gabriele


View this message in context: http://osgeo-org.1560.n6.nabble.com/supervising-geoserver-status-tp4659649p4659649.html
Sent from the GeoServer - User mailing list archive at Nabble.com.


This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Hi Frank,

that sounds like an item, that I am looking for. Does a watchdog pointing on
tomcat also take notice of a geoserver problem?

If yes, then everything is fine, because my provider already implemented a
server feature that watches tomcat.

If no, what will be an effecient way to extend this existing watchdog on
geoserver or how to implement a new one watching geoserver?

Thanks for answering

Gabriele

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/supervising-geoserver-status-tp4659649p4659776.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

In addition to the general tomcat watchdog (Does it restart the service automatically?)
You could write a simple shell script that uses wget /curl to check the geoserver URL for a WMS/WCS/WFS Service getCapabilities request. If it response an error something have to be maintained/restarted/deployed again.

try something like this:

#!/bin/sh

while true; do
sleep 30
while curl -s -f “<server url for WCS/WMS or WFS>” >/dev/null; do
sleep 10
done
#TODO do something right here if the the curl fails
done

Cheers
-Frank

2012/3/27 Gabriele Seitz <ml-seitz@anonymised.com>

watching

On 27/03/12 14:56, Gabriele Seitz wrote:

is it possible to monitor Geoserver status to detect unexpected shutdown as
soon as possible? For this purpose, is it adequate to just supervise tomcat,
not especially geoserver?

Monitoring tomcat is insufficient. We use Nagios:
http://permalink.gmane.org/gmane.comp.gis.geoserver.user/30140

Gabriel Roldán suggested I put this in the manual:
http://permalink.gmane.org/gmane.comp.gis.geoserver.user/30144
My only excuse is that this is a very general solution, but given that this is the second time I am answering this question, perhaps I should.

--
Ben Caradoc-Davies <Ben.Caradoc-Davies@anonymised.com>
Software Engineer
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre

I agree, we use Nagios in our infrastructure as well, but in this context I seems to me that the server is hosted by an external provider and I guess its a bit overkill to install Nagios only for the simple propose to watching and alerting. The script itself has the advantage to restart the server, which Nagios would not have :wink:

Frank

2012/3/27 Ben Caradoc-Davies Ben.Caradoc-Davies@anonymised.com

On 27/03/12 14:56, Gabriele Seitz wrote:

is it possible to monitor Geoserver status to detect unexpected shutdown as
soon as possible? For this purpose, is it adequate to just supervise tomcat,
not especially geoserver?

Monitoring tomcat is insufficient. We use Nagios:
http://permalink.gmane.org/gmane.comp.gis.geoserver.user/30140

Gabriel Roldán suggested I put this in the manual:
http://permalink.gmane.org/gmane.comp.gis.geoserver.user/30144
My only excuse is that this is a very general solution, but given that
this is the second time I am answering this question, perhaps I should.


Ben Caradoc-Davies Ben.Caradoc-Davies@anonymised.com
Software Engineer
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre


This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

GeoServer will happily continue returning exception documents when it has lost its database connection, for example. Tomcat will be happy, the user not so happy.

Remote monitoring will detect a fully hung server. A monitoring script on the server will also hang if the server is hung, so you'll never know about it. If the provider is having a network outage, you will not receive any notifications if your monitoring is on the same network.

Nagios also provides features such as flap detection as well as plotting, which is useful to spot trends and look for past outages. It is also widely-used and likely better tested than a custom script.

I have not used Nagios for remote restart (what scares me is the risk of Nagios misconfiguration bringing down a production system), but I expect that it could be used for it. Might even be able to use it to restart a virtual machine in a cluster. It is pretty extensible.

In short, what are the availability expectations? What types of failures do you wish to guard against?

On 27/03/12 16:57, Frank Gasdorf wrote:

I agree, we use Nagios in our infrastructure as well, but in this context I seems to me that the server is hosted by an external provider and I guess its a bit overkill to install Nagios only for the simple propose to watching and alerting. The script itself has the advantage to restart the server, which Nagios would not have :wink:

--
Ben Caradoc-Davies <Ben.Caradoc-Davies@anonymised.com>
Software Engineer
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre

Hi,

thanks for answering.

I'll provide my provider with the nagios proposal and the shell script .
Hopefully, he knows more about it than I do.

I expect a 99% availability of geoserver on a production system. I wish to
guard it against unexpected geoserver shutdown. I is connected to a POSTGIS
database and serves WFS and WMS. I want to guard it against unexpected
shutdown, and loss of database connection. The database itself is secure
enough I think. I never experienced a failure of postgresql before.

thanks again.

Gabriele

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/supervising-geoserver-status-tp4659649p4660176.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

We never went to a 'reactive' nagios, but just like you can make nagios send you an email - you can make a event handler do all sorts of crazy: like remote ssh into a host, restart the DB, kill all java, and then start tomcat. Nasty - but its up to you.

For more info on what not to do with nagios and events - http://nagios.sourceforge.net/docs/3_0/eventhandlers.html

As for monitoring the WFS - if you have geoserver in streaming output mode - dont look for the open tag -> look for the closing tag, just incase it errors mid stream.

Terry

________________________________
From: Frank Gasdorf [fgdrf@anonymised.com]
Sent: Tuesday, 27 March 2012 4:57 PM
To: Caradoc-Davies, Ben (CESRE, Kensington); geoserver
Subject: Re: [Geoserver-users] supervising geoserver status

I agree, we use Nagios in our infrastructure as well, but in this context I seems to me that the server is hosted by an external provider and I guess its a bit overkill to install Nagios only for the simple propose to watching and alerting. The script itself has the advantage to restart the server, which Nagios would not have :wink:

Frank

2012/3/27 Ben Caradoc-Davies <Ben.Caradoc-Davies@anonymised.com>
On 27/03/12 14:56, Gabriele Seitz wrote:

is it possible to monitor Geoserver status to detect unexpected shutdown as
soon as possible? For this purpose, is it adequate to just supervise tomcat,
not especially geoserver?

Monitoring tomcat is insufficient. We use Nagios:
http://permalink.gmane.org/gmane.comp.gis.geoserver.user/30140

Gabriel Roldán suggested I put this in the manual:
http://permalink.gmane.org/gmane.comp.gis.geoserver.user/30144
My only excuse is that this is a very general solution, but given that
this is the second time I am answering this question, perhaps I should.

--
Ben Caradoc-Davies <Ben.Caradoc-Davies@anonymised.com>
Software Engineer
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net<mailto:Geoserver-users@anonymised.comrge.net>
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Yes, Nagios can even have a tiered response, e-mail for problems it fixes
(so you can ignore, but keep track of subtler problems), text for problems
it can't fix and require your intervention, etc.. The most important part
of configuring a monitoring system like that is to ensure that you build
logic to both (as best as possible) correctly identify the problem (network
vs. server vs. ...), and to not Nag(ios) you or anyone else too much for
small glitches, lest you start ignoring everything and miss the large
glitches.

Best,
Steve

Stephen Mather
Geographic Information Systems (GIS) Manager
(216) 635-3243
svm@anonymised.com
clevelandmetroparks.com

-----Original Message-----
From: Terry.Rankine@anonymised.com [mailto:Terry.Rankine@anonymised.com]
Sent: Tuesday, March 27, 2012 9:30 AM
To: fgdrf@anonymised.com; Ben.Caradoc-Davies@anonymised.com;
geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] supervising geoserver status

We never went to a 'reactive' nagios, but just like you can make nagios send
you an email - you can make a event handler do all sorts of crazy: like
remote ssh into a host, restart the DB, kill all java, and then start
tomcat. Nasty - but its up to you.

For more info on what not to do with nagios and events -
http://nagios.sourceforge.net/docs/3_0/eventhandlers.html

As for monitoring the WFS - if you have geoserver in streaming output mode -
dont look for the open tag -> look for the closing tag, just incase it
errors mid stream.

Terry

________________________________
From: Frank Gasdorf [fgdrf@anonymised.com]
Sent: Tuesday, 27 March 2012 4:57 PM
To: Caradoc-Davies, Ben (CESRE, Kensington); geoserver
Subject: Re: [Geoserver-users] supervising geoserver status

I agree, we use Nagios in our infrastructure as well, but in this context I
seems to me that the server is hosted by an external provider and I guess
its a bit overkill to install Nagios only for the simple propose to watching
and alerting. The script itself has the advantage to restart the server,
which Nagios would not have :wink:

Frank

2012/3/27 Ben Caradoc-Davies <Ben.Caradoc-Davies@anonymised.com>
On 27/03/12 14:56, Gabriele Seitz wrote:

is it possible to monitor Geoserver status to detect unexpected shutdown

as

soon as possible? For this purpose, is it adequate to just supervise

tomcat,

not especially geoserver?

Monitoring tomcat is insufficient. We use Nagios:
http://permalink.gmane.org/gmane.comp.gis.geoserver.user/30140

Gabriel Roldán suggested I put this in the manual:
http://permalink.gmane.org/gmane.comp.gis.geoserver.user/30144
My only excuse is that this is a very general solution, but given that
this is the second time I am answering this question, perhaps I should.

--
Ben Caradoc-Davies <Ben.Caradoc-Davies@anonymised.com>
Software Engineer
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre

----------------------------------------------------------------------------
--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net<mailto:Geoserver-users@anonymised.com
ge.net>
https://lists.sourceforge.net/lists/listinfo/geoserver-users

----------------------------------------------------------------------------
--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Hi all,

thanks for your help, the script works perfectly.

Gabriele

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/supervising-geoserver-status-tp4659649p4667060.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

So which way did you go for your solution. Nagios or watchdog_timer or ?

Ralph Dell

-----Original Message-----
From: Gabriele Seitz [mailto:ml-seitz@anonymised.com]
Sent: Thursday, March 29, 2012 4:12 AM
To: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] supervising geoserver status

Hi all,

thanks for your help, the script works perfectly.

Gabriele

--
View this message in context:
http://osgeo-org.1560.n6.nabble.com/supervising-geoserver-status-tp46596
49p4667060.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

------------------------------------------------------------------------
------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users