博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Installation of Munin node/master ¶
阅读量:6963 次
发布时间:2019-06-27

本文共 19860 字,大约阅读时间需要 66 分钟。

Installation of Munin node/master

 

Table of Contents

Remember: To do munin surveillance of a Munin master, you must install and run munin-node on the master-server as well as munin.

Installation on Debian/Ubuntu

If you are running Debian/Ubuntu, you are in luck.

Munin node

Since "Munin Node" is in the standard repository, you can just type:

# apt-get install munin-node

Munin master

Since "Munin master" is in the standard repository, you can just type:

# apt-get install munin

Installation on Red Hat Enterprise 3 (RHEL3)

Munin node

On my freshly installed RHEL3, the munin-node package require these dependecies:

# rpm -Uvh munin-node-1.2.5-1rhel3.noarch.rpmerror: Failed dependencies:        perl(Net::SNMP) is needed by munin-node-1.2.5-1rhel3        perl(Net::Server::Fork) is needed by munin-node-1.2.5-1rhel3        perl-Net-Server is needed by munin-node-1.2.5-1rhel3        sysstat is needed by munin-node-1.2.5-1rhel3    Suggested resolutions:        /var/spool/up2date/sysstat-5.0.5-5.rhel3.i386.rpm

Now, the "sysstat" package are located on disc 3 of the installation set, so that one is easy. The other packages can be downloaded from Dag Wieers excellent RPM repository. You migh want to head over there and download the latest versions or if you're running the x86_64 version of RHEL3:

  • (required by perl-Net-SNMP)
  • (required by perl-Net-SNMP)
# rpm -Uvh sysstat-5.0.5-7.rhel4.i386.rpmPreparing...                ########################################### [100%]   1:sysstat                ########################################### [100%]# wget http://dag.wieers.com/rpm/packages/perl-Net-SNMP/perl-Net-SNMP-5.2.0-1.1.el3.rf.noarch.rpm# wget http://dag.wieers.com/rpm/packages/perl-Crypt-DES/perl-Crypt-DES-2.05-3.1.fc3.rf.i386.rpm# wget http://dag.wieers.com/rpm/packages/perl-Socket6/perl-Socket6-0.19-1.1.fc3.rf.i386.rpm# wget http://dag.wieers.com/rpm/packages/perl-Net-Server/perl-Net-Server-0.94-1.el3.rf.noarch.rpm# rpm -Uvh *.rpmPreparing...                ########################################### [100%]   1:perl-Socket6           ########################################### [ 25%]   2:perl-Crypt-DES         ########################################### [ 50%]   3:perl-Net-SNMP          ########################################### [ 75%]   4:perl-Net-Server        ########################################### [100%]   5:munin-node             ########################################### [100%]

That's it! You will now most likly change the /etc/munin/munin-node.conf to accept connection from your Munin master.

Munin master

On my freshly installed RHEL3, the munin package requires these dependecies:

# rpm -Uvh munin-1.2.5-1rhel3.noarch.rpmerror: Failed dependencies:        perl(HTML::Template) is needed by munin-1.2.5-1rhel3        perl(RRDs) is needed by munin-1.2.5-1rhel3        perl-HTML-Template is needed by munin-1.2.5-1rhel3        perl-Net-SNMP is needed by munin-1.2.5-1rhel3        perl-Net-Server is needed by munin-1.2.5-1rhel3        rrdtool is needed by munin-1.2.5-1rhel3

All of these packages can be downloaded from Dag Wieers excellent RPM repository. You migh want to head over there and download the latest versions or if you're running the x86_64 version of RHEL3:

# wget http://dag.wieers.com/rpm/packages/perl-HTML-Template/perl-HTML-Template-2.8-1.1.fc3.rf.noarch.rpm# wget http://dag.wieers.com/rpm/packages/rrdtool/perl-rrdtool-1.2.18-1.el3.rf.i386.rpm# wget http://dag.wieers.com/rpm/packages/rrdtool/rrdtool-1.2.18-1.el3.rf.i386.rpm# wget http://dag.wieers.com/rpm/packages/perl-Net-SNMP/perl-Net-SNMP-5.2.0-1.1.el3.rf.noarch.rpm# wget http://dag.wieers.com/rpm/packages/perl-Net-Server/perl-Net-Server-0.94-1.el3.rf.noarch.rpm# rpm -UvhPreparing...                ########################################### [100%]   1:perl-HTML-Template     ########################################### [ 25%]   2:rrdtool                ########################################### [ 50%]   3:perl-rrdtool           ########################################### [ 75%]   4:perl-Net-SNMP          ########################################### [ 75%]   5:perl-Net-Server        ########################################### [100%]   6:munin                  ########################################### [100%]

That's it! You'll will now probably start by looking at /etc/munin/munin.conf

Installation on Red Hat Enterprise 4 (RHEL4)

Munin node

On my freshly installed RHEL4, the munin-node package requires these dependencies:

# rpm -Uvh munin-node-1.2.5-1rhel4.noarch.rpmerror: Failed dependencies:        perl(Net::SNMP) is needed by munin-node-1.2.5-1rhel4.noarch        perl(Net::Server::Fork) is needed by munin-node-1.2.5-1rhel4.noarch        perl-Net-Server is needed by munin-node-1.2.5-1rhel4.noarch        sysstat is needed by munin-node-1.2.5-1rhel4.noarch    Suggested resolutions:        sysstat-5.0.5-7.rhel4.i386.rpm

Now, the "sysstat" package are easy - you'll find that on the installation CDs. The other packages can be downloaded from Dag Wieers excellent RPM repository. You migh want to head over there and download the latest versions or if you're running the x86_64 version of RHEL4:

  • (required by perl-Net-SNMP)
  • (required by perl-Net-SNMP)
# rpm -Uvh sysstat-5.0.5-7.rhel4.i386.rpmPreparing...                ########################################### [100%]   1:sysstat                ########################################### [100%]# wget http://dag.wieers.com/rpm/packages/perl-Net-SNMP/perl-Net-SNMP-5.2.0-1.2.el4.rf.noarch.rpm# wget http://dag.wieers.com/rpm/packages/perl-Crypt-DES/perl-Crypt-DES-2.05-3.2.el4.rf.i386.rpm# wget http://dag.wieers.com/rpm/packages/perl-Socket6/perl-Socket6-0.19-1.2.el4.rf.i386.rpm# wget http://dag.wieers.com/rpm/packages/perl-Net-Server/perl-Net-Server-0.94-1.el4.rf.noarch.rpm# rpm -Uvh *Preparing...                ########################################### [100%]   1:perl-Net-Server        ########################################### [ 20%]   2:perl-Socket6           ########################################### [ 40%]   3:perl-Crypt-DES         ########################################### [ 60%]   4:perl-Net-SNMP          ########################################### [ 80%]   5:munin-node             ########################################### [100%]

That's it! You will now most likly change the /etc/munin/munin.conf to accept connection from your Munin master.

Munin master

On my freshly installed RHEL4, the munin package require these dependencies:

# rpm -Uvh munin-1.2.5-1rhel4.noarch.rpmerror: Failed dependencies:        perl(HTML::Template) is needed by munin-1.2.5-1rhel4.noarch        perl(RRDs) is needed by munin-1.2.5-1rhel4.noarch        perl-HTML-Template is needed by munin-1.2.5-1rhel4.noarch        perl-Net-SNMP is needed by munin-1.2.5-1rhel4.noarch        perl-Net-Server is needed by munin-1.2.5-1rhel4.noarch        rrdtool is needed by munin-1.2.5-1rhel4.noarch

All of these packages can be downloaded from Dag Wieers excellent RPM repository. You migh want to head over there and download the latest versions or if you're running the x86_64 version of RHEL4:

# wget http://dag.wieers.com/rpm/packages/perl-HTML-Template/perl-HTML-Template-2.8-1.2.el4.rf.noarch.rpm# wget http://dag.wieers.com/rpm/packages/rrdtool/perl-rrdtool-1.2.18-1.el4.rf.i386.rpm# wget http://dag.wieers.com/rpm/packages/rrdtool/rrdtool-1.2.18-1.el4.rf.i386.rpm# wget http://dag.wieers.com/rpm/packages/perl-Net-SNMP/perl-Net-SNMP-5.2.0-1.2.el4.rf.noarch.rpm# wget http://dag.wieers.com/rpm/packages/perl-Net-Server/perl-Net-Server-0.94-1.el4.rf.noarch.rpm# rpm -Uvh *Preparing...                ########################################### [100%]   1:perl-HTML-Template     ########################################### [ 25%]   2:rrdtool                ########################################### [ 50%]   3:perl-rrdtool           ########################################### [ 75%]   4:perl-Net-SNMP          ########################################### [ 75%]   5:perl-Net-Server        ########################################### [100%]   6:munin                  ########################################### [100%]

That's it! You'll will now probably start by looking at /etc/munin/munin.conf

Installation on Red Hat Enterprise 5 (RHEL5)

The installation procedure should be the same as for RHEL4 and Dag Wieers repositories have RPM's for RHEL5

Installation on CentOS 5

The easiest way to go about this is to install a YUM repository that contains it. The two most popular are from the Fedora Core team, and the Dag Wieers YUM repository

Once the repository is installed, just use YUM to install the munin-node RPMs on each system you want to monitor, and both that and the munin RPM on your Munin master.

Installing the EPEL YUM Repository

Just execute this command as root :

rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm

That is of course if you are running CentOS 5.3. Change the file name to 5.2 if you are running that release, and similarly for newer releases.

Installing the Dag Wieers YUM Repository

Just create the following file with the contents show : /etc/yum.repos.d/dag.repo

[dag]name=Dag RPM Repository for Red Hat Enterprise Linuxbaseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/daggpgcheck=1gpgkey=http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txtenabled=1

Installing Client and Server

On the server, just do:

yum -y install munin munin-node

And on each client (or "node" as munin calls them):

yum -y install munin-node

Note that the node install can take a really long time to complete - just be patient and it will.

Installation on Fedora Core 4 (FC4)

Since the third-party docs show installations on Debian, here are steps install Munin on Fedora Core 4:

Please note that munin is included in Fedora Extras (rrdtool is in fedora core) and can be installed with yum. These instructions are for people that want a custom install.

Munin node

  • You must run these commands as root.
/usr/sbin/useradd muninmake install-node install-node-plugins/opt/munin/sbin/munin-node-configure --shell | shperl -MCPAN -e "install Net::Server::Fork"echo allow ^123\.123\.123\.123$ >> /etc/opt/munin/munin-node.conf/opt/munin/sbin/munin-node

Munin master

  • Start with the original commands in the INSTALL file included in the dist.
  • You must run these commands as root.
perl -MCPAN -e "install HTML::Template"
  • Install RRDtool
  • Install libart and freetype2
  • You'll probably need to change these lines in the RRDtool configure script:
CPPFLAGS="$CPPFLAGS -I/usr/local/include/freetype2"CPPFLAGS="$CPPFLAGS -I/usr/local/include/libart-2.0"
  • Add this line to the beginning of /opt/munin/bin/munin-cron (be sure to change to your version number)
export PERL5LIB=$PERL5LIB:/usr/local/rrdtool-1.2.15/lib/perl/5.X.X/i386-linux-thread-multi
  • Add the binary to the munin user crontab:
*/5 * * * * /opt/munin/bin/munin-cron

Installation on Fedora Core 6 (FC6)

The installation on FC6 is a breeze.

Munin node

You can use yum to install munin-node:

# yum install munin-nodeLoading "installonlyn" pluginSetting up Install ProcessSetting up repositoriesReading repository metadata in from local filesParsing package install argumentsResolving Dependencies--> Populating transaction set with selected packages. Please wait.---> Downloading header for munin-node to pack into transaction set.munin-node-1.2.5-1.fc6.no 100% |=========================|  23 kB    00:02---> Package munin-node.noarch 0:1.2.5-1.fc6 set to be updated--> Running transaction check--> Processing Dependency: perl(LWP::Simple) for package: munin-node...

Munin master

You can use "yum" to install munin:

# yum install muninLoading "installonlyn" pluginSetting up Install ProcessSetting up repositoriesReading repository metadata in from local filesParsing package install argumentsResolving Dependencies--> Populating transaction set with selected packages. Please wait.---> Downloading header for munin to pack into transaction set.munin-1.2.5-1.fc6.noarch. 100% |=========================|  10 kB    00:00---> Package munin.noarch 0:1.2.5-1.fc6 set to be updated--> Running transaction check...

Munin on SuSE

Munin on SuSE Linux Enterprise

For SuSE Linux Enterprise, use the RPM packages provided at

Munin on openSUSE

Munin is packaged for openSUSE (and previous versions of SuSE Linux) by the Packman project.

There are a number of methods for adding munin to openSUSE 10.2/10.3:

# Use YaST -> Software -> Community Repositories and select Packman
# Add as an additional YaST Package Repository in YaST -> Software -> Software Repositories
# Use (installs both the munin and munin-node packages)

Install munin using the YaST -> Software -> Software Management or by using zypper:

# zypper in munin munin-node* Reading repository 'Packman Repository' cache* Reading repository 'openSUSE-10.3-FTP 10.3' cache* Reading repository 'openSUSE-10.3-Updates' cache* Reading installed packages [100%]The following NEW packages are going to be installed:  munin munin-nodeOverall download size: 569.3 K. After the operation, additional 1.3 M will be used.Continue? [yes/no]: yesDownloading package munin-1.2.5-0.pm.1.noarch, 432.1 K (805.0 K unpacked)Downloading: munin-1.2.5-0.pm.1.noarch.rpm* Downloading [100%]* Installing: munin-1.2.5-0.pm.1 [100%]Downloading package munin-node-1.2.5-0.pm.1.noarch, 137.3 K (519.3 K unpacked)Downloading: munin-node-1.2.5-0.pm.1.noarch.rpm* Downloading [100%]* Installing: munin-node-1.2.5-0.pm.1 [100%]

The zypper command will work for most (if not all) versions of OpenSUSE through at least 11.4.

Munin on SuSE Linux (Pro)

There are RPM packages for SuSE Linux 10.0 and 10.1 at , or you can use the build of the packages by adding Packman to your YaST -> Software -> Installation Source and install munin and munin-node as ordinary SuSE Linux packages in YaST.

Munin and SELinux

Running Munin alongside SELinux is no problem as long as the "targeted" policy are beeing used. The "targeted" policy protects only a limited set of exposed daemons (apache, bind, .. etc.). All other processes are running in a default security context (unconfined_t) which behaves as if SELinux was turned off.

Be sure to install munin, as described above, when SELinux is turned on. If not, you must "relabel" the security context on the newly installed files (and other files that may have been changed/written):

# restorecon -v -R /

Or, the recommended method:

# touch /.autorelabel

And reboot. This way the security context are changed in a early stage at the boot process. Be sure to set SELINUXTYPE=targeted in /etc/selinux/config before you reboot.

Munin Without Apache

If you don't run an Apache Web server you can still run Munin. I'm running with Resin (a Java web server from www.caucho.com) and the configuration is relatively simple. Here's a webapp definition:

Munin
Monitoring Server Based on RRD Tool
index.html
com.caucho.server.security.XmlAuthenticator
username:password:munin
none
basic

Without internet connection (using virtual box)

Useful when you want to install munin on machine(s) where you do not have an internet connection. Or you want to automate munin installation so you can use it in many machines.

Howto

  • Install , on a machine where you DO have an internet connection. See Virtual Box documentation.
  • Create an instance of Virtual Box.
  • Replicate environment (OS with all optional applications) of the machine where you wish to install munin on this instance.
    • If you are creating one from scratch, you would need the OS installable (standard CD/DVD,...).
  • Start the virtual box instance.
  • Follow the process prescribed above to download the dependent rpms & perl modules (inside the virtual instance).
  • Create your own package.

Tips

  • Virtual Box keeps everything related to an instance of it in a single image file (*.vdi). If you can get your hands on one of those you can create the instance by specifying path to that file.
  • For replicating the environment in virtual box, you primarily need the same OS version and the perl version that you have on your actual machine. Rest of the applications usually do not cause any problems if not installed.
  • Munin dependencies are primarily perl modules. Using CPAN (as described at bottom of INSTALL file that comes along with every munin package) is the best way to get these.

A quicky on CPAN

For perl noobs like me:

  • You would usually need to set some config params so that CPAN

     

    • automatically downloads and installs (prerequisites_policy) the dependencies of the perl modules (or distribution) you are trying to install
    • knows how to connect to internet (http_proxy if there is one)
    • where to look for the perl modules (urllist).
  • After this it's a simple "install <module>" command.
  • For some names (like ) you'll get don't know what is it, these could be perl distributions (more than on modules' package). You need to use a little different command for that.
  • Finally everything is available in the directory pointed by the parameter keep_source_where.

(Note that if you're getting Munin from a package repository, the odds are fairly good that the requisite perl modules are also in that repository, and a tool like yum, apt-get, or zypper will pull them in for you.)

# cpancpan shell -- CPAN exploration and modules installation (v1.9402)Enter 'h' for help.cpan[5]> o conf.........lists current configuration......cpan[6]> o conf http_proxy http://10.20.30.40:8080cpan[7]> o conf prerequisites_policy followcpan[8]> o conf push http://ppm.activestate.com/CPANcpan[9]> o conf push http://cpan.perl.orgcpan[10]> o conf commitcpan[10]> o conf keep_source_where    keep_source_where  [/home/kash/cpan/sources]cpan[11]> install Net::Server::Fork...cpan[12]> install 
...cpan[13]>cpan[13]> install MailToolsWarning: Cannot install MailTools, don't know what it is.Try the command i /MailTools/to find objects with matching identifiers.cpan[14]> i /Mailtools/Distribution id = M/MA/MARKOV/MailTools-2.07.tar.gz CPAN_USERID MARKOV (Mark Overmeer
) CALLED_FOR M/MA/MARKOV/MailTools-2.07.tar.gz CHECKSUM_STATUS OK CONTAINSMODS Mail::Address Mail::Cap Mail::Field Mail::Field::AddrList Mail::Field::Date Mail::Field::Generic Mail::Filter Mail::Header Mail::Internet Mail::Mailer Mail::Mailer::qmail Mail::Mailer::rfc822 Mail::Mailer::sendmail Mail::Mailer::smtp Mail::Mailer::smtps Mail::Mailer::testfile Mail::Send UPLOAD_DATE 2010-10-01 archived tar......cpan[15]> install M/MA/MARKOV/MailTools-2.07.tar.gz....cpan[13]> quit# find /home/kash/cpan/sources/authors/id/ -name *.tar.gz/root/.cpan/sources/authors/id/G/GA/GAAS/Digest-SHA1-2.13.tar.gz/root/.cpan/sources/authors/id/G/GA/GAAS/IO-String-1.08.tar.gz/root/.cpan/sources/authors/id/G/GA/GAAS/Digest-HMAC-1.02.tar.gz/root/.cpan/sources/authors/id/G/GA/GAAS/Digest-MD5-2.51.tar.gz/root/.cpan/sources/authors/id/G/GB/GBARR/Scalar-List-Utils-1.23.tar.gz/root/.cpan/sources/authors/id/G/GB/GBARR/TimeDate-1.20.tar.gz/root/.cpan/sources/authors/id/B/BS/BSUGARS/IPC-Shareable-0.60.tar.gz....# mkdir munin_deps# for f in `find /root/.cpan/sources/authors/id/ -name *.tar.gz`; do cp $f munin_deps; done# echo "All perl modules and their dependents needed are now present in `pwd`/munin_deps"

To install all the tar.gz files you can use standard interface. Here is a small script I wrote (works on RHEL).

Attachments

  • (3.2 kB) -Sample script to install downloaded perl modules., added by thekashyap on 02/15/11 06:47:45.

转载地址:http://ffwsl.baihongyu.com/

你可能感兴趣的文章
WCF Ria Service 理解制图版本【待续】
查看>>
【IOS】高仿糗事百科客户端(基本实现了除注册,评论之外的功能)
查看>>
puppet之模块详解
查看>>
shell脚本
查看>>
python 模块
查看>>
Flash Builder生成asdoc格式的帮助文档
查看>>
分享实录 | 第四范式程晓澄:机器学习在推荐系统中的应用
查看>>
测试服务器响应时间
查看>>
xm console无法联接guest问题的解决
查看>>
一步一步SharePoint 2007之一:安装SharePoint
查看>>
Server Develop (七) Linux 守护进程
查看>>
Android requires compiler compliance level 5.0. Please fix project properties.错误
查看>>
如何从两个List中筛选出相同的值
查看>>
几个软件研发团队管理的小问题
查看>>
android112 c代码打印日志,c反编译调用java
查看>>
C# 正则表达式学习
查看>>
py excel 文本化
查看>>
cctype,string,vector
查看>>
[LeetCode] Predict the Winner 预测赢家
查看>>
何恺明大神的「Focal Loss」,如何更好地理解?
查看>>