Просмотр исходного кода

Added timeout and install instructions for plugin.

Frederic G. MARAND 13 лет назад
Родитель
Сommit
808ee2abb2
1 измененных файлов с 19 добавлено и 4 удалено
  1. 19 4
      plugins/munin-drupal_

+ 19 - 4
plugins/munin-drupal_

@@ -9,14 +9,29 @@
 # This plugin uses CURL to access the Drupal instance over HTTP. For most 
 # plugin modules, this could also work in CLI mode using Drush, and a Drush
 # plugin implementation is a no-brainer. However, in most cases, this will be a 
-# lower performance option, because CLI code is not cached in APC itself, 
-# causing extra server load to fetch the files from disk everytime, whereas they 
-# will normally be cache in APC itself when using HTTP access.
+# lower performance option, because CLI code is not cached in APC, causing
+# extra I/O load to fetch the files from disk everytime, whereas they will
+# normally be cached in APC when using HTTP access.
 
 SUB=$(basename $0 | sed s/drupal_/munin_/)
 
-CURL="/usr/bin/env curl"
+# The timeout needs to be "not too short", because on 
+# system reboot, munin will often send probes before
+# Apache is ready and, if they timeout, will not register
+# the Munin plugins invoking this scripts for further
+# probes, and it will have to be restarted manually.
+#
+# In addition, if you encounter "Connection refused" errors after system
+# reboot, you may want to force a munin-node restart. In Ubuntu 10.10,
+# for example, this can be done by adding:
+#
+#   @reboot /bin/sleep 60 ; /usr/sbin/restart munin-node
+#
+# in /etc/cron.d/munin to force a munin restart 1 minute after cron restart.
+#
+CURL="/usr/bin/env curl --connect-timeout 60"
 
+echo $CURL
 case $1 in
   config)
     $CURL http://$HOST/munin_api/$SUB/config