åæ
muninã®ç£è¦ãµã¼ãã¼ã 192.168.11.1ã被ç£è¦ãµã¼ãã¼ã192.168.11.2ã¨ããã被ç£è¦ãµã¼ãã¼ãSolaris 10ã®ã¨ãã®ã¡ã¢
CPANã¢ã¸ã¥ã¼ã«ã®ã¤ã³ã¹ãã¼ã«
% sudo su # cpan > install CPAN > install LWP > install Module::Build > install Time::HiRes > install Net::Server > Net::Server::Fork
ã¦ã¼ã¶ã¼ã¨ãã£ã¬ã¯ããªã®ä½æã
# groupadd munin # useradd munin # mkdir /var/munin # mkdir /var/munin-node # mkdir /var/run/munin # mkdir /var/log/munin # mkdir /etc/munin # chown munin:munin /var/munin
SourceForge: Muninããã½ã¼ã¹ã³ã¼ããå ¥æããããã®å¾ã解åï¼Makefile.configã®ç·¨é
% gtar xvfz munin-2.0.6.tgz % cd munin-2.0.6 % cp -p Makefile.config Makefile.config.org % vi Makefile.config
ç·¨éå 容ã¯ä»¥ä¸ã®éã
% diff Makefile.config.org Makefile.config 20c20,21 < PREFIX = $(DESTDIR)/opt/munin --- > #PREFIX = $(DESTDIR)/opt/munin > PREFIX = /usr/local/munin 23c24,25 < CONFDIR = $(DESTDIR)/etc/opt/munin --- > #CONFDIR = $(DESTDIR)/etc/opt/munin > CONFDIR = /etc/munin 45c47,48 < DBDIR = $(DESTDIR)/var/opt/munin --- > #DBDIR = $(DESTDIR)/var/opt/munin > DBDIR = /var/munin 48c51,52 < DBDIRNODE = $(DESTDIR)/var/opt/munin-node --- > #DBDIRNODE = $(DESTDIR)/var/opt/munin-node > DBDIRNODE = /var/munin-node 59c63,64 < LOGDIR = $(PREFIX)/log/munin --- > #LOGDIR = $(PREFIX)/log/munin > LOGDIR = /var/log/munin 63c68,69 < STATEDIR = $(DESTDIR)/var/run/munin --- > #STATEDIR = $(DESTDIR)/var/run/munin > STATEDIR = /var/run/munin 66c72,73 < PERL := $(shell which perl) --- > #PERL := $(shell which perl) > PERL := /usr/local/bin/perl
ã³ã³ãã¤ã«ï¼ã¤ã³ã¹ãã¼ã«
% gmake % sudo gmake install-common-prime % sudo gmake install-node % sudo gmake install-plugins-prime % sudo cp build/node/munin-node.conf /etc/munin/
/etc/munin/munin-node.confãç·¨éãããhostnameãã³ã¡ã³ãã¢ã¦ãããallowã§ç£è¦ãµã¼ãã¼ã®IPã¢ãã¬ã¹ãæå®ãããmuninã®ç£è¦ãµã¼ãã¼ã 192.168.11.1ã被ç£è¦ãµã¼ãã¼ã192.168.11.2ã¨ããã¨ã以ä¸ã®ããã«ããã
allow ^192\.168\.11\.1$
/usr/local/munin/sbin 以ä¸ã®ã¹ã¯ãªããã¯/usr/bin/perlã使ãããã«ãªã£ã¦ããã®ã§ã/usr/local/bin/perlã使ãããã«æ¸ãæãããæ¸ãæããããã©ããªãã©ã°ã¤ã³ã使ãããã確ããã¦ã¿ãã
/usr/local/munin/sbin/munin-node-configure --suggest |& tee /tmp/configure.log #é©ç¨ã§ãããã©ã°ã¤ã³ã®ä¸è¦§ã¨ç¶æ³ /usr/local/munin/sbin/munin-node-configure --shell |& tee /tmp/shell.log # ã©ãããã³ãã³ãã§ãã©ã°ã¤ã³ã®å°å ¥ã§ãããã®ä¸è¦§ /usr/local/munin/sbin/munin-node-configure |& more ï¼ç¾å¨å°å ¥ããã¦ãããã©ã°ã¤ã³ã®ä¸è¦§
munin-node-configure --suggestã§ã©ãããçç±ã§ãã©ã°ã¤ã³ã使ããªãã®ãããã§ãã¯ã§ããã次ã®ã³ãã³ãã§å°å ¥å¯è½ãªãã©ã°ã¤ã³ãä¸æ¬å°å ¥ã§ããã
/usr/local/munin/sbin/munin-node-configure --shell --families=contrib,auto | sh -x
munin-nodeãèµ·åããã
% sudo /usr/local/munin/sbin/munin-node
åä½ç¢ºèª
% ps -ef | grep munin % netstat -n -a | grep 4949
ä¸åº¦çµäºãããã
% kill ããã»ã¹ID
Solaris 10ç¨ã«èµ·åã¹ã¯ãªãããç¨æããã Installation of a Munin Node on Solaris 10 x86ã«ããèµ·åã¹ã¯ãªããããã®ã¾ã¾ããã ãã
<?xml version="1.0"?> <!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1"> <service_bundle type="manifest" name="export"> <service name="application/munin-node" type="service" version="0"> <create_default_instance enabled="true"/> <single_instance/> <dependency name="fs" grouping="require_all" restart_on="none" type="service"> <service_fmri value="svc:/system/filesystem/local"/> </dependency> <dependency name="network" grouping="require_all" restart_on="none" type="service"> <service_fmri value="svc:/milestone/network:default"/> </dependency> <dependency name="name-services" grouping="require_all" restart_on="none" type="service"> <service_fmri value="svc:/milestone/name-services:default"/> </dependency> <exec_method name="start" type="method" exec="munin-node" timeout_seconds="60"> <method_context> <method_credential user="root" group="root"/> <method_environment> <envvar name="PATH" value="/usr/local/munin/sbin:/usr/bin:/bin"/> </method_environment> </method_context> </exec_method> <exec_method name="stop" type="method" exec=":kill" timeout_seconds="60"> <method_context/> </exec_method> </service> </service_bundle>
ãã®ãã¡ã¤ã«ã~/munin-node.xmlã¨ããã¨ãã以ä¸ã®ã³ãã³ãã§å°å ¥ããã
% sudo svccfg -v validate /path/to/munin-node.xml % sudo svccfg -v import /path/to/munin-node.xml % svcs -a | grep munin
ãã¾ããããªãã¨ãã¯ä»¥ä¸ã®ã³ãã³ãã§åå ã調ã¹ãã
% sudo svcs -x -v % tail -100 /var/log/munin/munin-node.log
èµ·åãåæ¢ã¯ä»¥ä¸ã®ã³ãã³ãã§è¡ãã
% sudo svcadm disable application/munin-node ï¼åæ¢ï¼ % sudo svcadm enable application/munin-node ï¼èµ·åï¼
ç£è¦ãµã¼ãã¼ã®è¨å®
munin.conf ã«ã¦ä»¥ä¸ãä»ãå ããã
[Servernameï¼ä»»æã®ååï¼] address 192.168.11.2 use_node_name yes
Solarisç¨ã«ã¹ã¿ãã¤ãº
Apacheã®è¨æ¸¬
gamme’s direction is as pleasing to the soul.:muninのプラグインでapache関連のグラフが表示されない件ãããmod_statusãæå¹ã«ããã
<IfModule mod_status.c> ExtendedStatus On <Location /server-status> SetHandler server-status Order deny,allow Deny from all Allow from 127.0.0.1 </Location> </IfModule>
ãã®å¾ãapacheãåèµ·åãããã
Postfixã®è¨æ¸¬
オデの日記@WEB系:muninインストールめも ãããpostfix_mailqueueã®å®è¡æ¨©éãrootã«ããã/etc/munin/plugin-conf.d/plugins.confãä½æããä¸è¦ã以ä¸ã®ããã«ããã
[postfix_mailqueue] user root
ãã®å¾ãmunin-nodeãåèµ·åãããã