README 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. Licensed to the Apache Software Foundation (ASF) under one
  2. or more contributor license agreements. See the NOTICE file
  3. distributed with this work for additional information
  4. regarding copyright ownership. The ASF licenses this file
  5. to you under the Apache License, Version 2.0 (the
  6. "License"); you may not use this file except in compliance
  7. with the License. You may obtain a copy of the License at
  8. http://www.apache.org/licenses/LICENSE-2.0
  9. Unless required by applicable law or agreed to in writing, software
  10. distributed under the License is distributed on an "AS IS" BASIS,
  11. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. See the License for the specific language governing permissions and
  13. limitations under the License.
  14. Recipes for ZooKeeper monitoring using Cacti
  15. --------------------------------------------
  16. Cacti install guide: https://help.ubuntu.com/community/Cacti
  17. Cacti Manual: http://www.cacti.net/downloads/docs/html/
  18. PDF version: http://www.cacti.net/downloads/docs/pdf/manual.pdf
  19. Check Chapter 16: Simplest Method of Going from Script to Graph
  20. http://www.cacti.net/downloads/docs/html/how_to.html#SCRIPT_TO_GRAPH
  21. WARNING: I have wrote these instructions while installing and configuring the plugin on my desktop computer running Ubuntu 9.10. I've installed Cacti using apt-get.
  22. WARNING: I'm going to make the assumption that you know how to work with Cacti and how to setup Data Input Methods for custom scripts. I'm also going to assume that you have already installed Cacti and everything works as expected.
  23. You can extend the Cacti's data gathering functionality through external scripts. Cacti comes with a number of scripts out of the box which are located in the scripts/ directory.
  24. The check_zookeeper.py script can be used a custom data input method for Cacti.
  25. Single value (check cluster status by sending queries to the leader):
  26. ---------------------------------------------------------------------
  27. python <path_cacti>scripts/check_zookeeper.py -s "localhost:2181,localhost:2182,localhost:2183,localhost:2184,localhost:2185" -k <key> -o cacti --leader
  28. When you will call the script this way it will about a single value representing the value attached to this <key>.
  29. Multiple values (one for each cluster node):
  30. --------------------------------------------
  31. python <path_cacti>scripts/check_zookeeper.py -s "localhost:2181,localhost:2182,localhost:2183,localhost:2184,localhost:2185" -k <key> -o cacti
  32. Output:
  33. localhost_2182:0 localhost_2183:0 localhost_2181:0 localhost_2184:0 localhost_2185:0
  34. TBD: Step by step guide