Friday, May 24th 2013, 12:49am UTC+2

You are not logged in.

  • Login
  • Register

1

Friday, October 23rd 2009, 3:46pm

NagiosGrapher erstellt keine Graphen

Mein System: Icinga 0.8.4 & Nagios Grapher v1.7.1
Also mir ist die Konfiguration des NagiosGrapher etwas unklar. Jedenfalls erstellt Nagiosgrapher keine Graphen. Genauergesagt kann ich in den DropDown Menüs weder einen Host noch einen Service auswählen. Zum testen bis es läuft will ich zunächst einfach mal nur einen Graphen vom Ping erstellen.
services.cfg

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
define service {
            	service_description               	check_ping
            	check_command                     	check_ping!20,80%!30,90%
            	host_name                         	fileserver.pdtec.lan
            	check_period                      	24x7
            	notification_period               	24x7
            	contact_groups                    	admins
            	max_check_attempts                	10
            	normal_check_interval             	6
            	retry_check_interval              	6
            	notification_interval             	60
            	notification_options              	w,u,c,r
            	active_checks_enabled             	1
            	passive_checks_enabled            	1
            	notifications_enabled             	1
            	check_freshness                   	1
            	freshness_threshold               	86400
}

icinga.cfg:

Source code

1
2
3
4
5
6
7
process_performance_data=1
cfg_dir=/usr/local/icinga/etc/serviceext
service_perfdata_file=/usr/local/icinga/var/service-perfdata
service_perfdata_file_template=$HOSTNAME$   $SERVICEDESC$   $SERVICEOUTPUT$ $SERVICEPERFDATA$   	$TIMET$
service_perfdata_file_mode=a
service_perfdata_file_processing_interval=30
service_perfdata_file_processing_command=process-service-perfdata-file

ngraph.ncfg:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# tabspace: 8

# ---
# Nagios Grapher Main Configuration
# ---

define config {

	port                	5667
	buffer              	1024
	interface           	file
	# pipe              	/usr/local/icinga/var/rw/ngraph.pipe
	perffile_path       	/usr/local/icinga/var/

	# please use subfolder
	pidfile             	/usr/local/icinga/var/nagios_grapher/nagios_grapher.pid
	user                	icinga
	group               	icinga

	# disable reading of Nagios-object cache
	skip_object_cache   	false

	# normal_check_interval
	step                	300

	# VALUE (e.g. 600 for 5 minutes ) or AUTO
	heartbeat           	AUTO

	rrdpath             	/usr/local/icinga/var/rrd/
	tmppath             	/tmp/nagiosgrapher

	fontfile            	/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansCondensed.ttf

	serviceext_type     	MULTIPLE
	serviceextinfo      	/usr/local/icinga/etc/serviceextinfo.cfg
	serviceext_path     	/usr/local/icinga/etc/serviceext

	url                 	/icinga/cgi-bin/graphs.cgi
	# notes_url          	/wiki/index.php/$HOSTNAME$#$SERVICEDESC$
	notes_url

	nagios_config       	/usr/local/icinga/etc/icinga.cfg
	cgi_config          	/usr/local/icinga/etc/cgi.cfg

	icon_image_tag      	' dot.png' alt="###ALT###" border="0"></a><A TARGET="_blank" HREF="graphs.cgi?###URL###"><img src="###IMAGESRC###" '
	icon_image_src      	/icinga/images/logos/graph.png
	icon_image_script   	/icinga/cgi-bin/rrd2-system.cgi?###URL###&start=-5400&title=Actual&width=20&height=20&type=AVERAGE&only-graph=true
	icon_image_static   	true

	log_file            	/usr/local/icinga/var/ngraph.log
	log_level           	1023

	rrd_color_background	ffffff
	rrd_color_font      	333333
	rrd_color_arrow     	ff0000
	rrd_color_frame     	ffffff
	rrd_color_grid
	rrd_color_canvas    	ffffff
	rrd_color_shadea    	c0c0c0
	rrd_color_shadeb    	c0c0c0

	rrd_show_vlines     	true

	fe_use_browser_all  	false
	fe_use_browser_for  	nagiosadmin
	fe_use_browser_url  	false

	fe_use_timefilter   	true

	use_authentication  	true

	# define default host and default service for your start page
	# values (host name and service name)are supposed to be exactly the same as
	# defined in your nagios configuration or as found in your NG-drop-down boxes
	#
	# default_host        	localhost
	# default_service     	* All Services

	#
	# HOOKS: Comma seperated list of perl modules ...

	# All hooks before an srvext entry is created
	# hooks_serviceext    	NagiosGrapher::Hooks::SrvExtTest

	# Hooks before RRD is updated
	# hooks_rrdupdate     	NagiosGrapher::Hooks::RRDUpdateTest

	# Example hook for writing a hostextinfo
	# With the action=hostgraph example ...
	# The module runs under hooks_serviceext too ...
	# hooks_rrdupdate     	NagiosGrapher::Hooks::SrvExtWriteHostextInfo


	# Bevor Multi- and Singlegraphs, but different types.
	# Hooks before an image is displayed
	# hooks_imagegraph    	NagiosGrapher::Hooks::ImageGraphTest

	# Example for invoking multiple hooks ...
	# hooks_imagegraph    	NagiosGrapher::Hooks::ImageGraphTest,NagiosGrapher::Hooks::ImageGraphTest

}

# Includes
cfg_dir=/usr/local/icinga/etc/ngraph.d

# [EOF] (Don't remove this line ...)

check_ping.ncfg:

Source code

1
2
3
4
5
6
7
8
9
10
11
# Ping RTA
define ngraph{
  	service_name        	check_ping
  	graph_perf_regex    	rta=([0-9]*\.[0-9]*)
  	graph_value         	RTA
  	graph_units         	ms
  	graph_legend        	Time to answer
  	page                	RTA
  	rrd_plottype        	AREA
  	rrd_color           	00a000
}


Soo - die NagiosGrapher logs werden auch schön geschrieben und es bekommt ja auch Daten herein - Logauszug:

Source code

1
2
3
2009-10-23 15:42:05 FILE: reading perf data from /usr/local/icinga/var/service-perfdata.1256305315
2009-10-23 15:42:05 PIPE: fileserver.pdtec.lan   check_windows_load   NOW: Mean:0.000000% Variance: 0.000000% CUMULATIVE: Mean:0.000000% Variance: 0.000000% CpuNow=0.000%;70.000;90.000; CpuCum=0.000%;70.000;90.000;   	1256305285
2009-10-23 15:42:05 PIPE: fileserver.pdtec.lan   check_ping   PING OK - Packet loss = 0%, RTA = 0.55 ms rta=0.548000ms;20.000000;30.000000;0.000000 pl=0%;80;90;0   	1256305285

Aber so wie ich das verstanden hatte müsste eigentlich im Verzeichnis icinga/var/rrd DB Dateien rumliegen?? Dieses Verzeichnis ist aber leer ... Die Doku oder Google hilft auch nicht wirklich weiter - ich nehme mal an es ist falsch konfiguriert :D aber mir ist unklar wie ich Hosts&Services in die NagiosGrapher Konfig einfüge.

Viele Dank im vorraus

ze-de

Intermediate

Posts: 287

Number of monitoring servers: 1

Nagios Version: 1

Distributed monitoring: Nein

Redundant monitoring: Nein

Number of hosts: 1

Number of services: 1

OS: -

Plugin Version: -

2

Friday, October 23rd 2009, 3:56pm

Hallo pdtec,

in der icinga.cfg müssen die tabs als "\t" angegeben werden, nicht als echte tabs:

Source code

1
service_perfdata_file_template=$HOSTNAME$\t$SERVICEDESC$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$\t$TIMET$


Grüße

Christian

3

Friday, October 23rd 2009, 4:07pm

Daran lags :thumbsup:

Merci!!

Similar threads