[Linux Utilities] Display of Linux monitoring Tools Munin (Nginx)

Source: Internet
Author: User
Tags what web server

Munin installation and configuration can refer to the first article:

[Linux Utilities] Installation and configuration of Linux monitoring tools Munin http://www.cnblogs.com/rond/p/3757804.html

The result of Munin is shown in HTML. So the result is very simple, just need to deploy a Web server. But if you need to look at the results, you need to configure them.

This post is divided into 2 sections:

1. Web server display monitoring results (nginx);

2. Dynamic display of static munin results.

//-------------------------------------------------------------

first, the Web server display monitoring results (nginx)

The previous article spoke about the deployment and configuration of the Munin client and server. After deployment, the server will also periodically collect data from the monitored machines. But there is a problem, how to check the results of monitoring. You can't always view the log file directly. This requires a Web server that directly displays static HTML for static monitoring results. Because it is static content, with what Web server can be, here with Nginx description.

1. Install Nginx (can be ignored)

Nginx can be downloaded from its official website (http://nginx.org/) and installed after download.

wget http://nginx.org/download/nginx-1.7.1.tar.gztar xzvf nginx-1.7. 1. Tar . GZCD Nginx-1.7. 1. Tar . gz. /configure--prefix=[Installation path]make makeinstall

2. Configure Nginx

Locate the nginx.conf file and edit it in nginx/conf. Locate the server node and add the following red font content inside it.

server {         # ... other config       /munin {                alias/var/cache/munin/www/   ;   the path of the munin.conf configuration Htmldir #路径地址为.         }                # ... other config}

The current user has access to the/var/cache/munin/www/directory. If not, please add it yourself.

3. Start Nginx

Then start Nginx (execute the Nginx/sbin/nginx file) and access the Nginx Http://127.0.0.1/munin (port default 80) in the browser.

Second, dynamic display of static Munin results

To view the results, you will find that the smallest unit of the picture showing the results is by day. Looking at the results of a day on a small chart can only be viewed in a half-day or one-hour situation.

If you always click on a picture, the most visible to the Http://127.0.0.1/munin/static/dynazoom.html page. And you find that the page is missing a picture. Such as:

This is due to the absence of a picture because the image is basically a "dynamic" generated image. This needs the support of CGI.

1. Install fcgi:
Install spawn-fcgiaptinstall fcgiwrap        #也可以用这个命令安装

2. Configure Nginx:

Then add the following red sections under the Nginx configuration File server node configuration

server {         # ... other config        /munin {                /var/cache/munin/www/;   The path of the munin.conf configuration Htmldir #路径地址为.        }          ^~/cgi-bin/munin-cgi-graph/{                access_log off;                Fastcgi_split_path_info ^ (/cgi-bin/munin-cgi-graph) (. *);                Fastcgi_param path_info $fastcgi _path_info;                Fastcgi_pass unix:/var/run/munin/fcgi-graph.sock;                Include Fastcgi_params;        }        # ... other config}

3. Visit:

Restart Nginx, and then re-access. When you visit the http://127.0.0.1/munin/static/dynazoom.html page again, you will not see a picture of the situation.

Basically static HTML files that show the Web server you use can be very casual. Official documentation is also available, such as Apache2, LIGHTTPD and other servers.

References

Official information: Http://munin-monitoring.org/wiki/MuninConfigurationMasterCGI

Related information: [Installation and configuration of the Linux utility]linux monitoring tool Munin http://www.cnblogs.com/rond/p/3757804.html

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.