munin-drupal_ 850 B

123456789101112131415161718192021222324252627
  1. #!/bin/bash
  2. #
  3. # Munin plugin using the munin_api module and submodules to log Drupal info.
  4. #
  5. # (c) 2011 Ouest Systèmes Informatiques (OSInet)
  6. #
  7. # Licensed under the General Public License version 2 or later.
  8. #
  9. # This plugin uses CURL to access the Drupal instance over HTTP. For most
  10. # plugin modules, this could also work in CLI mode using Drush, and a Drush
  11. # plugin implementation is a no-brainer. However, in most cases, this will be a
  12. # lower performance option, because CLI code is not cached in APC itself,
  13. # causing extra server load to fetch the files from disk everytime, whereas they
  14. # will normally be cache in APC itself when using HTTP access.
  15. SUB=$(basename $0 | sed s/drupal_/munin_/)
  16. CURL=/usr/bin/curl
  17. case $1 in
  18. config)
  19. $CURL http://$HOST/munin_api/$SUB/config
  20. exit 0;;
  21. esac
  22. $CURL http://$HOST/munin_api/$SUB