Probes into Plone and Zope

On all teams, we need to check if Plone turns well. We need some probe to be sure our Plone site runs well !

Introduction

On all teams, we need to check if Plone turns well. We need some probes to be sure our Plone site runs well !

With Jean-François Roche, we started to have a look on Products.ZNagios. This product allow you to have some probes from Zope, you can ask your instance (live):

  • Number of unresolved conflict on Zope
  • CPU usage
  • DB sizes
  • Memory percent
  • Uptime of Zope
  • ...

You can access to the probes with a thread which listen on Zope  on port 8888 (in this conf). You just have to add zope-conf-additional in your buildout like this:

[instance]
...
zope-conf-additional =
<product-config five.z2monitor>
  bind 0.0.0.0:8888
  </product-config>

If you want more information on this, you can see documentation of five.z2monitor package.

collective.monitor

I created this package for adding some probes into Plone. I created probes as Products.ZNagios. We used a zope interface for registering all probes (zc.z3monitor.interfaces.IZ3MonitorPlugin). In this package, I added these probes:

  • count users
  • count valid users (user logged during 3 last months)
  • check if smtp is set up
  • last login time of a user
  • last time a plone or zope object was modified

How use it

Adding collective.monitor in your buildout in eggs and zcml instance section

[instance]
...
eggs +=
...
collective.monitor
zcml +=
...
collective.monitor

And also adding zope-conf-additional as explain above.

After this little config, you can access to probes with different way

1. bin/instance

After starting instance (bin/instance fg) you can access to probes with

./bin/instance monitor dbinfo main
./bin/instance monitor objectcount
./bin/instance monitor stats./bin/instance monitor help

2. netcat

After starting instance (bin/instance fg) you can access to probes with

echo 'dbinfo main' | nc -i 1 127.0.0.1 8888

3. telnet

After starting instance (bin/instance fg) you can access to probes with

$ telnet 127.0.0.1 8888
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
last_modified_zope_object_time
2015/08/11 11:49:48.540729 GMT+2
Connection closed by foreign host.

Conclusion

With this package, you can make stats on your instance.

We use diamond to collect and put informations from probes on graphite.

It's very helpful for having state of our infrastructure.

 

Jean-Sébastien Mansart
Jean-Sébastien Mansart says:
Aug 13, 2015 11:44 AM

Do you know https://pypi.python.org/pypi/ZopeHealthWatcher/ ?

Martina
Martina says:
Jun 17, 2018 12:16 AM

We all connected to huge chains of in laws
if you go far enough. My parents share grandchildren with 7 other sets of parents once you count step parents, are
the supposed to confir with all 7 of them on naming choices Hell no.

cheap wigs human hair hair extension mkwbhg22938

Annett
Annett says:
Jun 17, 2018 08:51 AM

Today's minimalist two piece bikinis were invented by
French fashion designer, Jacques Heim, who lived
in the resort town of Cannes, France, when he designed the first modern day bikinis in 1946.

cheap bikinis cheap swimwear htvbxr30835

Thao
Thao says:
Jun 18, 2018 02:46 AM

I ordered this set and I was hesitant about the actual look of the
item but I was pleasantly surprised when I fit it.
I must say that the price is definitely worth it and I would recommend buying from this website.


cock rings bestvibratorsformen ovuffx95045

Chanda
Chanda says:
Jun 19, 2018 06:11 PM

James Johnson, also known as Jimmy, was born in New Jersey, and was an African American pianist and composer.
As a young boy, he studied classical music and ragtime.

cheap jerseys wholesale nfl jerseys from china gpmmua71538

Add comment

You can add a comment by filling out the form below. Plain text formatting.