MongoDB extension of monitoring series 2 Ganglia

Source: Internet
Author: User

1. Add the python extension of gmond (taking MongoDB as an example)

Check/usr/local/ganglia/lib/ganglia/modpython. so. If it does not exist, you may not have Python installed before compiling and installing ganglia, or you have not specified the python directory. You can try ganglia/gmond/modules/Python/Under the compiling directory /. libs/modpython. so to the above directory.

# Install the python measurement module of gmond, which can be RPM installation (anglia-gmond-modules-python-3.1.1-1.i386.rpm) or manual installation, I use manual installation.

# Add gmond-Python extension Library

Sudo mkdir/etc/ganglia/CONF. d

Sudo mkdir/usr/local/ganglia/lib/ganglia/python_modules

Sudo CP ~ /Downloads/ganglia-3.1.2/gmond/modules/CONF. d/modpython. CONF/etc/ganglia/CONF. d/

[Sudo CP ~ /Downloads/ganglia-3.1.2/gmond/modules/Python/. libs/modpython. So/usr/local/ganglia/lib/ganglia/] (If the compilation and installation are unsuccessful, you can try it and it has not been verified. There is another question: Do I have to copy files like modpython. La.?)

# Check whether the python module is mounted

/Usr/local/ganglia/sbin/gmond-D10

# Download the gmond-Python extension monitoring package

Cd ~ /Downloads

Wget https://download.github.com/ganglia-gmond_python_modules-c1e3a5d.tar.gz

# Gmond extensions for various products are available here. We use MongoDB extensions.

Tar-zxvf ganglia-gmond_python_modules-c1e3a5d.tar.gz

CD ganglia-gmond_python_modules-c1e3a5d/MongoDB

# Copy ExtensionProgramAnd configuration file

Sudo CP python_modules/MongoDB. py/usr/local/ganglia/lib/ganglia/python_modules/

Sudo CP Conf. d/MongoDB. CONF/etc/ganglia/CONF. d/MongoDB. pyconf

# Modify MongoDB. pyconf

Set Value = "mongo -- quiet -- eval 'printjson (db. serverstatus ())'"

And value = "mongo -- quiet -- eval 'printjson (Rs. Status ())'"

Replace Mongo with the absolute path of the file. Of course, you do not need to modify MongoDB. pyconf to ensure that MongoDB/bin can be in the PATH environment variable.

#Check whether custom extensions can be mounted

/Usr/local/ganglia/sbin/gmond-m

# Restart the service and view the results in a browser

Sudo service gmond restart

Sudo service gmetad restart

Sudo/usr/local/apache2/bin/apachectl restart

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.