Munin

Sziasztok, a fenti temaban lenne szuksegem egy kis segitsegre,
a munin illetve munin-node ugyanazon a gepen va, le is fut szepen, a
html oldalak is ujrageneralodnak, a munin-cron nak koszonhetoen.
A doksit tegnap egesz nap bujtam illetve a guglit, de sajnos nem
gyartja le a grafikonokat, holott a munin-graph is szepen lefut,
a logban hibakat nem latok ! Apache beallitva !

Az rrdtools is fent van !

Van valkinek otlete ? koszi elore is

Hozzászólások

Szia

Ha minden OK akkor csak generál, de kérdés, hogy hova.

Erre mit mond: find / -name *day.png ?

Cs

/usr/share/pixmaps/gnome-day.png
/usr/share/icons/crystalsvg/22x22/actions/today.png
/usr/share/icons/crystalsvg/16x16/actions/today.png
/usr/share/icons/crystalsvg/32x32/actions/today.png
/usr/share/icons/gnome/24x24/stock/generic/stock_calendar-view-day.png

Az a baj, hogy le sem generalja a grafikonokat, de nem tudom miert :-(

Mire gondolsz ?

A munin.conf ban benne van és ua. mint a munin-node.conf ban !

cat munin.conf
# Example configuration file for Munin, generated by 'make build'

# The next three variables specifies where the location of the RRD
# databases, the HTML output, and the logs, severally. They all
# must be writable by the user running munin-cron.
dbdir /var/opt/munin
htmldir /opt/munin/var/www
logdir /var/log/munin
rundir /var/run/munin

# Where to look for the HTML templates
tmpldir /etc/opt/munin/templates

# Make graphs show values per minute instead of per second
#graph_period minute

# Drop somejuser@fnord.comm and anotheruser@blibb.comm an email everytime
# something changes (OK -> WARNING, CRITICAL -> OK, etc)
#contact.someuser.command mail -s "Munin notification" somejuser@fnord.comm
#contact.anotheruser.command mail -s "Munin notification" anotheruser@blibb.comm#
# For those with Nagios, the following might come in handy. In addition,
# the services must be defined in the Nagios server as well.
#contact.nagios.command /usr/sbin/send_nsca -H nagios.host.com -c /etc/send_nsca.cfg

# a simple host tree
[showme]
address 127.0.0.1
use_node_name yes

#
# A more complex example of a host tree
#
## First our "normal" host.
# [fii.foo.com]
# address foo
#
## Then our other host...
# [fay.foo.com]
# address fay
#
## Then we want totals...
# [foo.com;Totals] #Force it into the "foo.com"-domain...
# update no # Turn off data-fetching for this "host".
#
# # The graph "load1". We want to see the loads of both machines...
# "fii=fii.foo.com:load.load" means "label=machine:graph.field"
# load1.graph_title Loads side by side
# load1.graph_order fii=fii.foo.com:load.load fay=fay.foo.com:load.load
#
# # The graph "load2". Now we want them stacked on top of each other.
# load2.graph_title Loads on top of each other
# load2.dummy_field.stack fii=fii.foo.com:load.load fay=fay.foo.com:load.load
# load2.dummy_field.draw AREA # We want area instead the default LINE2.
# load2.dummy_field.label dummy # This is needed. Silly, really.
#
# # The graph "load3". Now we want them summarised into one field
# load3.graph_title Loads summarised
# load3.combined_loads.sum fii.foo.com:load.load fay.foo.com:load.load
# load3.combined_loads.label Combined loads # Must be set, as this is
# # not a dummy field!
#
## ...and on a side note, I want them listen in another order (default is
## alphabetically)
#
# # Since [foo.com] would be interpreted as a host in the domain "com", we
# # specify that this is a domain by adding a semicolon.
# [foo.com;]
# node_order Totals fii.foo.com fay.foo.com
#

graph_strategy cgi
graph_order apps buffers cache unused swap
###############.graph_period minute

#cgiurl_graph /opt/munin/var/www/cgi

Egy TESZT erejéig próbáld meg így:

############
#munin.conf#
############
dbdir /var/opt/munin
htmldir /opt/munin/var/www
logdir /var/log/munin
rundir /var/run/munin

tmpldir /etc/opt/munin/templates

[localhost]
address 127.0.0.1
use_node_name yes

#################
#munin-node.conf#
#################

log_level 4
log_file /var/log/munin/munin-node.log
port 4949
pid_file /var/run/munin/munin-node.pid
background 1
setseid 1

host *
user root
group root
setsid yes

ignore_file ~$
ignore_file \.bak$
ignore_file %$
ignore_file \.dpkg-(tmp|new|old|dist)$
ignore_file \.rpm(save|new)$

allow ^127\.0\.0\.1$

Megvolt a helyzet ugyan az :-(

cat munin-node.conf
#
# Example config-file for munin-node
#

log_level 4
log_file /var/log/munin/munin-node.log
port 4949
pid_file /var/run/munin/munin-node.pid
background 1
setseid 1

# Which port to bind to;
host *
user root
group root
setsid yes

# Regexps for files to ignore

ignore_file ~$
ignore_file \.bak$
ignore_file %$
ignore_file \.dpkg-(tmp|new|old|dist)$
ignore_file \.rpm(save|new)$

# Set this if the client doesn't report the correct hostname when
# telnetting to localhost, port 4949
#
#host_name showme

# A list of addresses that are allowed to connect. This must be a
# regular expression, due to brain damage in Net::Server, which
# doesn't understand CIDR-style network notation. You may repeat
# the allow line as many times as you'd like

allow ^127\.0\.0\.1$

#[puginname]

Megvolt, ua :-(

Igazabol az zavar, hogy a logban semmi hasznalhato info, hogy miert nem gyartja le a kepeket.

nov 08 13:11:41 - Starting munin-graph
nov 08 13:11:41 - Processing domain: localhost
nov 08 13:11:41 - Processed node: localhost (0.00 sec)
nov 08 13:11:41 - Processed domain: localhost (0.00 sec)
nov 08 13:11:41 - Munin-graph finished (0.00 sec)

munin-graph.log

nov 08 15:10:01 - Processed node: localhost.localdomain (0.00 sec)
nov 08 15:10:01 - Processed domain: localdomain (0.00 sec)
nov 08 15:10:01 - Munin-graph finished (0.00 sec)

munin-html.log

nov 08 15:10:01 - Starting munin-html, checking lock
nov 08 15:10:01 - processing domain: localdomain
nov 08 15:10:01 - processing node: localhost.localdomain
nov 08 15:10:01 - munin-html finished

munin-limits.log

nov 08 15:10:01 - Starting munin-limits, checking lock
nov 08 15:10:01 - Created lock: /var/run/munin/munin-limits.lock
nov 08 15:10:01 - processing domain: localdomain
nov 08 15:10:01 - processing node: localhost.localdomain
nov 08 15:10:01 - munin-limits finished.

munin-node.log

2007/11/08-15:01:57 MyPackage (type Net::Server::Fork) starting! pid(6221)
Binding to TCP port 4949 on host *
2007/11/08-15:01:57 Couldn't chown "/var/run/munin/munin-node.pid" [A m%C5%B1velet nem engedett]

at line 511 in file /usr/local/share/perl/5.8.8/Net/Server.pm
2007/11/08-15:01:57 Server closing!

munin-update.log

nov 08 15:15:01 - Starting munin-update
nov 08 15:15:01 [7021] - Processing domain: localdomain
nov 08 15:15:01 [7021] - Processing node: localhost.localdomain
nov 08 15:15:02 [7022] - Could not connect to localhost.localdomain(localhost): A csatlakozás megtagadva - Attempting to use old configuration
nov 08 15:15:02 [7021] - Processed node: localhost.localdomain (0.01 sec)
nov 08 15:15:02 [7021] - Processed domain: localdomain (0.01 sec)
nov 08 15:15:02 [7021] - connection from localdomain -> localhost.localdomain (7022)
nov 08 15:15:02 [7021] - connection from localdomain -> localhost.localdomain (7022) closed
nov 08 15:15:02 [7021] - Munin-update finished (0.01 sec)

Hát ez nem túl biztató:

2007/11/08-15:01:57 Couldn't chown "/var/run/munin/munin-node.pid" [A m%C5%B1velet nem engedett]

Ha nincs elfogaható PIDje a munin-node-nak az szerintem okozhat ilyen problémát.

A munin user ( akinek a nevében fut a munin-node ) tudja "irni olvasni futtatni/belépni" a /var/run/munin/ könyvtárat és annak tartalmát?

Meg szerintem konzol ne beszéljen magyarul.

Koszi, de megneztem mar, igen tud ott mindent csinalni, a tobbi *.pid a muninhoz ott is van !

-rw-r--r-- 1 munin munin 5 2007-11-08 16:35 munin-datafile.lock
-rw-r--r-- 1 munin munin 5 2007-11-08 16:35 munin-graph.lock
-rw-r--r-- 1 munin munin 5 2007-11-08 16:35 munin-html.lock
-rw-r--r-- 1 munin munin 0 2007-11-08 16:35 munin-limits.lock
-rw-r--r-- 1 munin munin 4 2007-11-08 15:22 munin-localdomain-localhost.localdomain.lock
-rw-r--r-- 1 munin munin 5 2007-11-08 16:35 munin-localhost-localhost.lock
-rw-r--r-- 1 munin munin 5 2007-11-08 16:35 munin-update.lock

A munin-node.pid letre sem jon !

lepj at munin userbe:
su -s /bin/bash - munin

aztan futtasd a progikat:
/usr/share/munin/munin-update --nofork --debug --stdout
/usr/share/munin/munin-graph --debug
/usr/share/munin/munin-html --debug

Elbandi
ui: ne rootkent futtast, mert akkor a letrehozott fajlok root jogaban leszek, amit majd nemtud felulirni a munin user.

--
A vegtelen ciklus is vegeter egyszer, csak kelloen eros hardver kell hozza!

Koszi, lefutattam, semmi hiba, de mint munin user nem fut akkor sem !
A fileok mind a munin tulajdonaban vannak 7 jogokkal !
Ill ami kell neki azt neztem, hogy azok is !

Persze nem szeretnem root kent futtatni !!!

update

nov 09 08:45:16 - [29278] Updating /var/opt/munin/localhost/localhost-vmstat-sleep-g.rrd with 0
nov 09 08:45:16 - [29278] Fetched service: localhost -> vmstat (1.05 sec)
nov 09 08:45:16 - [29278] Fetching service: localhost->cpubyuser
nov 09 08:45:16 - [29278] Fetched service: localhost -> cpubyuser (0.00 sec)
nov 09 08:45:16 - [29278] Fetched node: localhost (2.07 sec)
nov 09 08:45:16 - [29278] Processed node: localhost (3.17 sec)
nov 09 08:45:16 - [29278] Processed domain: localhost (3.17 sec)
nov 09 08:45:16 - [29278] Munin-update finished (3.18 sec)

graph

"--height"
"175"
"--width"
"400"
"--imgformat"
"PNG"
"--lazy"
"--units-exponent"
"0"
"COMMENT:Last update\: Thu Jan 1 01\:00\:00 1970\r"

html

DEBUG: single_value: Checking field "swap_out" ().
DEBUG: single_value: Checking field "wait" ().
DEBUG: single_value: Checking field "sleep" ().
DEBUG: Pushing category "localhost" -> "apache"...
DEBUG: Pushing category "localhost" -> "network"...
DEBUG: Pushing category "localhost" -> "disk"...
DEBUG: Pushing category "localhost" -> "system"...
DEBUG: Pushing category "localhost" -> "processes"...
DEBUG: Pushing category "localhost" -> "other"...

Szoval nem ertem, a leiras alapjan csinaltam es mennie is kellene :-(

Szia!

Végül megoldottad valahogy?

Gyakorlatilag ugyanez a gondom: hiba semmi, de rrd fájlok és graph nem kerül sehova.

Nos. Hajnali 4 óta én is ezzel harcolok. Sokat segítettek a fent írtak.
Hátha valakinek jól jön a tapasztalatom, mert mostan megyen :) :
munin írhat olvashat a

/var/www/html/munin/

könyvtárban.
Igen ám, de a

/var/www/html/

valamint a

/var/www/

könyvtárak 750-os jogosultságúak a www-data usernek. Ergo: szép hogy a muniné a könyvtára, de ha nem engedjük eljutni odáig akkor b@#*hatjuk... :)

Nekem ez segített.

[szerk:] bocs, a megoldás lemaradt (csk a teljesség kedvéért):


chmod 755 /var/www
chmod 755 /var/www/html

---
PtR