diverse nagios plugins
This commit is contained in:
		
							
								
								
									
										36
									
								
								net-analyzer/nagios-core/Manifest
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								net-analyzer/nagios-core/Manifest
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,36 @@ | ||||
| AUX 2.x-series-nsca.patch 767 RMD160 69c3916842953666037dcf258906c15a9ce0047a SHA1 5f376bd65bf74eeb3cc00efde4fadf7f8962d06c SHA256 04ecb77abfe7618d036a2b598ea30df6704a82285b2210055eda4dd6414c94d3 | ||||
| MD5 446906907cccdbf195442373c6f17f77 files/2.x-series-nsca.patch 767 | ||||
| RMD160 69c3916842953666037dcf258906c15a9ce0047a files/2.x-series-nsca.patch 767 | ||||
| SHA256 04ecb77abfe7618d036a2b598ea30df6704a82285b2210055eda4dd6414c94d3 files/2.x-series-nsca.patch 767 | ||||
| AUX 99_nagios.conf 350 RMD160 d9818e29cd119b2cc185c75dcd374b3851eaa739 SHA1 fa4b438c1d06f2d00cd2bff4fefc448a59d1cdec SHA256 2e8448d5e38969f0eee4306611e9592e9cec93506ad055cd27ef8e211cfe9f71 | ||||
| MD5 673bda0ac6ab9230d23331e7f3846b7b files/99_nagios.conf 350 | ||||
| RMD160 d9818e29cd119b2cc185c75dcd374b3851eaa739 files/99_nagios.conf 350 | ||||
| SHA256 2e8448d5e38969f0eee4306611e9592e9cec93506ad055cd27ef8e211cfe9f71 files/99_nagios.conf 350 | ||||
| AUX conf.d 409 RMD160 8b08c01284fc590a2291164589da42515d1a0586 SHA1 dd7bf46facd6a3069794ad9623cddd854198520e SHA256 a5122b19248c375b7b7c80bb5568fcaf334de316c611a85795960c2b9f6a6d5a | ||||
| MD5 f2947dec6b9a839da79606bcc394036b files/conf.d 409 | ||||
| RMD160 8b08c01284fc590a2291164589da42515d1a0586 files/conf.d 409 | ||||
| SHA256 a5122b19248c375b7b7c80bb5568fcaf334de316c611a85795960c2b9f6a6d5a files/conf.d 409 | ||||
| AUX nagios 1424 RMD160 b8dc7c6e86f8d77e31d0867a305018bc6e3cfe85 SHA1 0a23dec5ce44b5e6db1e2ed577e84595be2c620b SHA256 9c29d108e08e26bc1872fea6f92ecd7c5f539f06d01c2aff845706ceb6866841 | ||||
| MD5 c04218d013f1cb55ce1d7b09242b8d4c files/nagios 1424 | ||||
| RMD160 b8dc7c6e86f8d77e31d0867a305018bc6e3cfe85 files/nagios 1424 | ||||
| SHA256 9c29d108e08e26bc1872fea6f92ecd7c5f539f06d01c2aff845706ceb6866841 files/nagios 1424 | ||||
| AUX nagios-1.x-Makefile-asneeded.diff 5460 RMD160 589bc81bb2fe0148acb0d9e6c76d63b6ca6ae34c SHA1 ced005ab9d100af6cd84508cddc1d6d4450aa509 SHA256 679482075dfdecd58948ed479adf306ed02bff5cf661f605d01193b2a11ef503 | ||||
| MD5 354f5aeb0e831ee8e218962eb85d07e4 files/nagios-1.x-Makefile-asneeded.diff 5460 | ||||
| RMD160 589bc81bb2fe0148acb0d9e6c76d63b6ca6ae34c files/nagios-1.x-Makefile-asneeded.diff 5460 | ||||
| SHA256 679482075dfdecd58948ed479adf306ed02bff5cf661f605d01193b2a11ef503 files/nagios-1.x-Makefile-asneeded.diff 5460 | ||||
| AUX nagios.conf 362 RMD160 ea642c44b8450cfc67a1675f3dc558d36eccabcb SHA1 a06e53b6c634171c09bb36f1ef460053f7e542c3 SHA256 8d57d761efd4057e15430462e1233715c1472155ae181a2d5d364948bbcb1848 | ||||
| MD5 dad3fb46e8f73ac54d9239a542bc82e0 files/nagios.conf 362 | ||||
| RMD160 ea642c44b8450cfc67a1675f3dc558d36eccabcb files/nagios.conf 362 | ||||
| SHA256 8d57d761efd4057e15430462e1233715c1472155ae181a2d5d364948bbcb1848 files/nagios.conf 362 | ||||
| AUX submit_check_result_via_nsca.patch 585 RMD160 1dc2b0a10b0c824b3e0026c26d17f931703e7a98 SHA1 3c00221ae86402dcae93b71abb92cd88e14acb03 SHA256 2770e3988ce05a63866e4b32c029f3ef13d64d7da3791747014378391d5d8d3e | ||||
| MD5 cee7d66cc61be3558af44ab177d99e1f files/submit_check_result_via_nsca.patch 585 | ||||
| RMD160 1dc2b0a10b0c824b3e0026c26d17f931703e7a98 files/submit_check_result_via_nsca.patch 585 | ||||
| SHA256 2770e3988ce05a63866e4b32c029f3ef13d64d7da3791747014378391d5d8d3e files/submit_check_result_via_nsca.patch 585 | ||||
| DIST nagios-2.7.tar.gz 1737308 RMD160 6412149c37cd82d731b807f3e43fd5afbe528f14 SHA1 ce723d8324f76b9a8b6cd18e04d62c1d47013b04 SHA256 defb4062f077f999d1da2bcfcb87786c5d7fbca7d1346c7e6a19084b5629b2c1 | ||||
| EBUILD nagios-core-2.7.ebuild 5986 RMD160 64ee365338165a9267509dc79a8fee11d9ab8feb SHA1 ccdfb26e77b350e801425a30b1db978c179a4a83 SHA256 ef8d3cbc31575c8f100e2adb577b498e63eaa55e3dc117b851d985bb7f8b15ad | ||||
| MD5 d4c04ab43f5ed964558e233d57f968af nagios-core-2.7.ebuild 5986 | ||||
| RMD160 64ee365338165a9267509dc79a8fee11d9ab8feb nagios-core-2.7.ebuild 5986 | ||||
| SHA256 ef8d3cbc31575c8f100e2adb577b498e63eaa55e3dc117b851d985bb7f8b15ad nagios-core-2.7.ebuild 5986 | ||||
| MD5 c6423e2e82e560a177ea87f985cedbdd files/digest-nagios-core-2.7 235 | ||||
| RMD160 e7408073756c2201e2568b865d7c21be565601cd files/digest-nagios-core-2.7 235 | ||||
| SHA256 3982176a15776ad0d8dc9a517e7a86659fbcf82b6c723cc1655de8b1d8704ecd files/digest-nagios-core-2.7 235 | ||||
							
								
								
									
										18
									
								
								net-analyzer/nagios-core/files/2.x-series-nsca.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								net-analyzer/nagios-core/files/2.x-series-nsca.patch
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,18 @@ | ||||
| --- contrib/eventhandlers/distributed-monitoring/submit_check_result_via_nsca.orig	2005-01-28 12:57:11.537852344 +0930 | ||||
| +++ contrib/eventhandlers/distributed-monitoring/submit_check_result_via_nsca	2005-01-28 12:57:45.877631904 +0930 | ||||
| @@ -28,9 +28,12 @@ | ||||
|   | ||||
|  printfcmd="/bin/printf" | ||||
|   | ||||
| -NscaBin="/usr/local/nagios/libexec/send_nsca"  | ||||
| -NscaCfg="/usr/local/nagios/etc/send_nsca.cfg" | ||||
| -NagiosHost="nagioshost" | ||||
| +NscaBin="/usr/nagios/libexec/send_nsca"  | ||||
| +NscaCfg="/etc/nagios/send_nsca.cfg" | ||||
| + | ||||
| +# Gentoo Linux Users: configure the hostname in /etc/conf.d/nagios | ||||
| +source /etc/conf.d/nagios | ||||
| +NagiosHost="${NAGIOS_NSCA_HOST}" | ||||
|   | ||||
|  # Fire the data off to the NSCA daemon using the send_nsca script  | ||||
|  $printfcmd "%s\t%s\t%s\t%s\n" "$1" "$2" "$3" "$4" | $NscaBin $NagiosHost -c $NscaCfg | ||||
							
								
								
									
										15
									
								
								net-analyzer/nagios-core/files/99_nagios.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								net-analyzer/nagios-core/files/99_nagios.conf
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,15 @@ | ||||
| <IfDefine NAGIOS> | ||||
| 	ScriptAlias /nagios/cgi-bin/ /usr/nagios/sbin/ | ||||
| 	<Directory "/usr/nagios/sbin/"> | ||||
| 		AllowOverride AuthConfig | ||||
| 		Options ExecCGI | ||||
| 		Order allow,deny | ||||
| 		Allow from all | ||||
| 	</Directory> | ||||
| 	Alias /nagios /usr/nagios/share/ | ||||
| 	<Directory "/usr/nagios/share"> | ||||
| 		AllowOverride AuthConfig | ||||
| 		Order allow,deny | ||||
| 		Allow from all | ||||
| 	</Directory> | ||||
| </IfDefine> | ||||
							
								
								
									
										10
									
								
								net-analyzer/nagios-core/files/conf.d
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								net-analyzer/nagios-core/files/conf.d
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,10 @@ | ||||
| # Copyright 1999-2004 Gentoo Foundation | ||||
| # Distributed under the terms of the GNU General Public License v2          | ||||
| # $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/files/conf.d,v 1.1 2004/08/20 13:38:13 eldad Exp $ | ||||
|  | ||||
| # Distributed monitoring users will want to configure here the ip/hostname of the central server. | ||||
| # It will be used by submit_check_result_via_nsca. | ||||
| NAGIOS_NSCA_HOST="localhost" | ||||
|  | ||||
|  | ||||
|  | ||||
							
								
								
									
										3
									
								
								net-analyzer/nagios-core/files/digest-nagios-core-2.7
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								net-analyzer/nagios-core/files/digest-nagios-core-2.7
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | ||||
| MD5 d664d2785cdca3c5c8a3e84c033e8e6e nagios-2.7.tar.gz 1737308 | ||||
| RMD160 6412149c37cd82d731b807f3e43fd5afbe528f14 nagios-2.7.tar.gz 1737308 | ||||
| SHA256 defb4062f077f999d1da2bcfcb87786c5d7fbca7d1346c7e6a19084b5629b2c1 nagios-2.7.tar.gz 1737308 | ||||
							
								
								
									
										56
									
								
								net-analyzer/nagios-core/files/nagios
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										56
									
								
								net-analyzer/nagios-core/files/nagios
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,56 @@ | ||||
| #!/sbin/runscript | ||||
| # Copyright 1999-2004 Gentoo Foundation | ||||
| # Distributed under the terms of the GNU General Public License v2 | ||||
| # $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/files/nagios,v 1.9 2007/02/03 07:04:42 mjolnir Exp $ | ||||
|  | ||||
| opts="${opts} reload checkconfig" | ||||
|  | ||||
| depend() { | ||||
| 	need net | ||||
| 	use dns logger firewall | ||||
| 	after mysql postgresql | ||||
| } | ||||
|  | ||||
| reload() | ||||
| { | ||||
| 	checkconfig || return 1 | ||||
| 	ebegin "Reloading configuration" | ||||
| 	killall -HUP nagios &>/dev/null | ||||
| 	eend $? | ||||
| } | ||||
|  | ||||
| checkconfig() { | ||||
| 	# Silent Check | ||||
| 	/usr/nagios/bin/nagios -v /etc/nagios/nagios.cfg &>/dev/null && return 0 | ||||
|  | ||||
| 	# Now we know there's problem - run again and display errors | ||||
| 	/usr/nagios/bin/nagios -v /etc/nagios/nagios.cfg | ||||
| 	eend $? "Configuration Error. Please fix your configfile" | ||||
| } | ||||
|  | ||||
| start() { | ||||
| 	checkconfig || return 1 | ||||
| 	ebegin "Starting nagios" | ||||
| 	touch /var/nagios/nagios.log /var/nagios/status.sav | ||||
| 	chown nagios:nagios /var/nagios/nagios.log /var/nagios/status.sav | ||||
| 	rm -f /var/nagios/rw/nagios.cmd | ||||
| 	start-stop-daemon --quiet --start --startas /usr/nagios/bin/nagios \ | ||||
| 		--pidfile /var/nagios/nagios.lock -- -d /etc/nagios/nagios.cfg | ||||
| 	eend $? | ||||
| } | ||||
|  | ||||
| stop() { | ||||
| 	ebegin "Stopping nagios" | ||||
| 	start-stop-daemon --quiet --stop --pidfile /var/nagios/nagios.lock | ||||
| 	rm -f /var/nagios/status.log /var/nagios/nagios.tmp /var/nagios/nagios.lock /var/nagios/rw/nagios.cmd | ||||
| 	eend $? | ||||
| } | ||||
|  | ||||
| svc_restart() { | ||||
| 	checkconfig || return 1 | ||||
| 	ebegin "Restarting nagios" | ||||
| 	svc_stop | ||||
| 	svc_start | ||||
| 	eend $? | ||||
| } | ||||
|  | ||||
							
								
								
									
										110
									
								
								net-analyzer/nagios-core/files/nagios-1.x-Makefile-asneeded.diff
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										110
									
								
								net-analyzer/nagios-core/files/nagios-1.x-Makefile-asneeded.diff
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,110 @@ | ||||
| --- nagios-1.3/base/Makefile.in.orig	2006-04-30 00:22:59.000000000 +0300 | ||||
| +++ nagios-1.3/base/Makefile.in	2006-04-30 00:23:01.000000000 +0300 | ||||
| @@ -12,7 +12,8 @@ | ||||
|  CC=@CC@ | ||||
|  CFLAGS=@CFLAGS@ @DEFS@ -DNSCORE | ||||
|  #CFLAGS=-O3 -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -DHAVE_CONFIG_H -DNSCORE | ||||
| -LDFLAGS=@LDFLAGS@ @LIBS@ | ||||
| +LDFLAGS=@LDFLAGS@ | ||||
| +LDADD=@LIBS@ | ||||
|   | ||||
|  prefix=@prefix@ | ||||
|  exec_prefix=@exec_prefix@ | ||||
| @@ -88,7 +89,7 @@ | ||||
|  OBJS=checks.o config.o commands.o flapping.o logging.o notifications.o sehandlers.o utils.o $(RDATALIBS) $(CDATALIBS) $(ODATALIBS) $(SDATALIBS) $(PDATALIBS) $(DDATALIBS) $(BASEEXTRALIBS) $(SNPRINTF_O) | ||||
|   | ||||
|  nagios: nagios.c $(OBJS) nagios.h $(SRC_COMMON)/locations.h | ||||
| -	$(CC) $(CFLAGS) $(LDFLAGS) nagios.c $(OBJS) $(PERLLIBS) $(MATHLIBS) -o $@ | ||||
| +	$(CC) $(CFLAGS) $(LDFLAGS) nagios.c $(OBJS) $(PERLLIBS) $(MATHLIBS) $(LDADD) -o $@ | ||||
|   | ||||
|  #$(SRC_COMMON)/locations.h: $(SRC_COMMON)/locations.sub | ||||
|  #	perl -pe 's|\$${prefix}|${prefix}|g;s|\$${exec_prefix}|${exec_prefix}|g;s|\$${htmurl}|$(HTMURL)|g;s|\$${cgiurl}|$(CGIURL)|g;' $(SRC_COMMON)/locations.sub > $(SRC_COMMON)/locations.h | ||||
| --- nagios-1.3/cgi/Makefile.in.orig	2006-04-30 00:37:36.000000000 +0300 | ||||
| +++ nagios-1.3/cgi/Makefile.in	2006-04-30 00:38:56.000000000 +0300 | ||||
| @@ -27,7 +27,8 @@ | ||||
|  CC=@CC@ | ||||
|  CFLAGS=@CFLAGS@ @DEFS@ -DNSCGI | ||||
|  #CFLAGS=-O3 -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -DHAVE_CONFIG_H -DNSCGI | ||||
| -LDFLAGS=@LDFLAGS@ @LIBS@ | ||||
| +LDFLAGS=@LDFLAGS@ | ||||
| +LDADD=@LIBS@ | ||||
|   | ||||
|  CGIS=avail.cgi cmd.cgi config.cgi extinfo.cgi history.cgi notifications.cgi outages.cgi showlog.cgi status.cgi statuswml.cgi summary.cgi tac.cgi $(CGIEXTRAS) | ||||
|   | ||||
| @@ -95,58 +96,58 @@ | ||||
|  $(COMMENTLIBS): $(COMMENTHDRS) | ||||
|   | ||||
|  avail.cgi: avail.c $(CGIDEPS) | ||||
| -	$(CC) $(CFLAGS) $(LDFLAGS) avail.c $(CGILIBS) -o $@ | ||||
| +	$(CC) $(CFLAGS) $(LDFLAGS) avail.c $(CGILIBS) $(LDADD) -o $@ | ||||
|   | ||||
|  checksanity.cgi: checksanity.c $(CGIDEPS) $(CDATADEPS) $(EDATADEPS) $(DDATADEPS) | ||||
| -	$(CC) $(CFLAGS) $(LDFLAGS) checksanity.c $(CGILIBS) $(CDATALIBS) $(EDATALIBS) $(DDATALIBS) -o $@ | ||||
| +	$(CC) $(CFLAGS) $(LDFLAGS) checksanity.c $(CGILIBS) $(CDATALIBS) $(EDATALIBS) $(DDATALIBS) $(LDADD) -o $@ | ||||
|   | ||||
|  cmd.cgi: cmd.c $(CGIDEPS) $(CDATADEPS) | ||||
| -	$(CC) $(CFLAGS) $(LDFLAGS) cmd.c  $(CGILIBS) $(CDATALIBS) $(DDATALIBS) -o $@ | ||||
| +	$(CC) $(CFLAGS) $(LDFLAGS) cmd.c  $(CGILIBS) $(CDATALIBS) $(DDATALIBS) $(LDADD) -o $@ | ||||
|   | ||||
|  config.cgi: config.c $(CGIDEPS) | ||||
| -	$(CC) $(CFLAGS) $(LDFLAGS) config.c  $(CGILIBS) -o $@ | ||||
| +	$(CC) $(CFLAGS) $(LDFLAGS) config.c  $(CGILIBS) $(LDADD) -o $@ | ||||
|   | ||||
|  extinfo.cgi: extinfo.c $(CGIDEPS) $(CDATADEPS) $(EDATADEPS) $(DDATADEPS) | ||||
| -	$(CC) $(CFLAGS) $(LDFLAGS) extinfo.c $(CGILIBS) $(CDATALIBS) $(EDATALIBS) $(DDATALIBS) -o $@ | ||||
| +	$(CC) $(CFLAGS) $(LDFLAGS) extinfo.c $(CGILIBS) $(CDATALIBS) $(EDATALIBS) $(DDATALIBS) $(LDADD) -o $@ | ||||
|   | ||||
|  history.cgi: history.c $(CGIDEPS) $(LIFODEPS) | ||||
| -	$(CC) $(CFLAGS) $(LDFLAGS) history.c $(CGILIBS) $(LIFOLIBS) -o $@ | ||||
| +	$(CC) $(CFLAGS) $(LDFLAGS) history.c $(CGILIBS) $(LIFOLIBS) $(LDADD) -o $@ | ||||
|   | ||||
|  ministatus.cgi: ministatus.c $(CGIDEPS) | ||||
| -	$(CC) $(CFLAGS) $(LDFLAGS) ministatus.c $(CGILIBS) -o $@ | ||||
| +	$(CC) $(CFLAGS) $(LDFLAGS) ministatus.c $(CGILIBS) $(LDADD) -o $@ | ||||
|   | ||||
|  notifications.cgi: notifications.c $(CGIDEPS) $(LIFODEPS) | ||||
| -	$(CC) $(CFLAGS) $(LDFLAGS) notifications.c $(CGILIBS) $(LIFOLIBS) -o $@ | ||||
| +	$(CC) $(CFLAGS) $(LDFLAGS) notifications.c $(CGILIBS) $(LIFOLIBS) $(LDADD) -o $@ | ||||
|   | ||||
|  outages.cgi: outages.c $(CGIDEPS) $(CDATADEPS) | ||||
| -	$(CC) $(CFLAGS) $(LDFLAGS) outages.c $(CGILIBS) $(CDATALIBS) -o $@ | ||||
| +	$(CC) $(CFLAGS) $(LDFLAGS) outages.c $(CGILIBS) $(CDATALIBS) $(LDADD) -o $@ | ||||
|   | ||||
|  showlog.cgi: showlog.c $(CGIDEPS) $(LIFODEPS) | ||||
| -	$(CC) $(CFLAGS) $(LDFLAGS) showlog.c $(CGILIBS) $(LIFOLIBS) -o $@ | ||||
| +	$(CC) $(CFLAGS) $(LDFLAGS) showlog.c $(CGILIBS) $(LIFOLIBS) $(LDADD) -o $@ | ||||
|   | ||||
|  status.cgi: status.c $(CGIDEPS) $(CDATADEPS) $(EDATADEPS) | ||||
| -	$(CC) $(CFLAGS) $(LDFLAGS) status.c $(CGILIBS) $(CDATALIBS) $(EDATALIBS) -o $@ | ||||
| +	$(CC) $(CFLAGS) $(LDFLAGS) status.c $(CGILIBS) $(CDATALIBS) $(EDATALIBS) $(LDADD) -o $@ | ||||
|   | ||||
|  statuswml.cgi: statuswml.c $(CGIDEPS) | ||||
| -	$(CC) $(CFLAGS) $(LDFLAGS) statuswml.c $(CGILIBS) -o $@ | ||||
| +	$(CC) $(CFLAGS) $(LDFLAGS) statuswml.c $(CGILIBS) $(LDADD) -o $@ | ||||
|   | ||||
|  statusmap.cgi: statusmap.c $(CGIDEPS) $(EDATADEPS) | ||||
| -	$(CC) $(CFLAGS) $(LDFLAGS) statusmap.c $(CGILIBS) $(GDLIBS) $(EDATALIBS) -o $@ | ||||
| +	$(CC) $(CFLAGS) $(LDFLAGS) statusmap.c $(CGILIBS) $(GDLIBS) $(EDATALIBS) $(LDADD) -o $@ | ||||
|   | ||||
|  statuswrl.cgi: statuswrl.c $(CGIDEPS) $(EDATADEPS) | ||||
| -	$(CC) $(CFLAGS) $(LDFLAGS) statuswrl.c $(CGILIBS) $(MATHLIBS) $(EDATALIBS) -o $@ | ||||
| +	$(CC) $(CFLAGS) $(LDFLAGS) statuswrl.c $(CGILIBS) $(MATHLIBS) $(EDATALIBS) $(LDADD) -o $@ | ||||
|   | ||||
|  summary.cgi: summary.c $(CGIDEPS) | ||||
| -	$(CC) $(CFLAGS) $(LDFLAGS) summary.c $(CGILIBS) -o $@ | ||||
| +	$(CC) $(CFLAGS) $(LDFLAGS) summary.c $(CGILIBS) $(LDADD) -o $@ | ||||
|   | ||||
|  tac.cgi: tac.c $(CGIDEPS) $(CDATADEPS) $(EDATADEPS) | ||||
| -	$(CC) $(CFLAGS) $(LDFLAGS) tac.c $(CGILIBS) $(CDATALIBS) $(EDATALIBS) -o $@ | ||||
| +	$(CC) $(CFLAGS) $(LDFLAGS) tac.c $(CGILIBS) $(CDATALIBS) $(EDATALIBS) $(LDADD) -o $@ | ||||
|   | ||||
|  trends.cgi: trends.c $(CGIDEPS) | ||||
| -	$(CC) $(CFLAGS) $(LDFLAGS) trends.c $(CGILIBS) $(GDLIBS) -o $@ | ||||
| +	$(CC) $(CFLAGS) $(LDFLAGS) trends.c $(CGILIBS) $(GDLIBS) $(LDADD) -o $@ | ||||
|   | ||||
|  histogram.cgi: histogram.c $(CGIDEPS) | ||||
| -	$(CC) $(CFLAGS) $(LDFLAGS) histogram.c $(CGILIBS) $(GDLIBS) -o $@ | ||||
| +	$(CC) $(CFLAGS) $(LDFLAGS) histogram.c $(CGILIBS) $(GDLIBS) $(LDADD) -o $@ | ||||
|   | ||||
|  clean: | ||||
|  	rm -f $(CGIS) *.o *.cfg *.sub core | ||||
							
								
								
									
										19
									
								
								net-analyzer/nagios-core/files/nagios.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								net-analyzer/nagios-core/files/nagios.conf
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,19 @@ | ||||
| <IfDefine NAGIOS> | ||||
|  | ||||
| ScriptAlias /nagios/cgi-bin/ /usr/nagios/sbin/ | ||||
| <Directory "/usr/nagios/sbin/"> | ||||
|     AllowOverride AuthConfig | ||||
|     Options ExecCGI | ||||
|     Order allow,deny | ||||
|     Allow from all | ||||
| </Directory> | ||||
|  | ||||
|  | ||||
| Alias /nagios /usr/nagios/share/ | ||||
| <Directory "/usr/nagios/share"> | ||||
|     AllowOverride AuthConfig | ||||
|     Order allow,deny | ||||
|     Allow from all | ||||
| </Directory> | ||||
|  | ||||
| </IfDefine> | ||||
| @@ -0,0 +1,14 @@ | ||||
| --- contrib/eventhandlers/distributed-monitoring/submit_check_result_via_nsca.orig	2004-08-20 14:57:38.462260008 +0300 | ||||
| +++ contrib/eventhandlers/distributed-monitoring/submit_check_result_via_nsca	2004-08-20 15:06:46.647923120 +0300 | ||||
| @@ -32,7 +32,10 @@ | ||||
|   | ||||
|  NscaBin="/usr/local/nagios/libexec/send_nsca"  | ||||
|  NscaCfg="/usr/local/nagios/etc/send_nsca.cfg" | ||||
| -NagiosHost="nagioshost" | ||||
| + | ||||
| +# Gentoo Linux Users: configure the hostname in /etc/conf.d/nagios | ||||
| +source /etc/conf.d/nagios | ||||
| +NagiosHost="${NAGIOS_NSCA_HOST}" | ||||
|    | ||||
|  # create the command line to add to the command file | ||||
|  cmdline="$1;$2;$3;$4" | ||||
							
								
								
									
										225
									
								
								net-analyzer/nagios-core/nagios-core-2.7.ebuild
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										225
									
								
								net-analyzer/nagios-core/nagios-core-2.7.ebuild
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,225 @@ | ||||
| # Copyright 1999-2007 Gentoo Foundation | ||||
| # Distributed under the terms of the GNU General Public License v2 | ||||
| # $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/nagios-core-2.5-r1.ebuild,v 1.1 2007/02/03 07:04:42 mjolnir Exp $ | ||||
|  | ||||
| inherit eutils apache-module toolchain-funcs gnuconfig | ||||
|  | ||||
| MY_P=${PN/-core}-${PV/_} | ||||
| DESCRIPTION="Nagios Core - Check daemon, CGIs, docs" | ||||
| HOMEPAGE="http://www.nagios.org/" | ||||
| SRC_URI="mirror://sourceforge/nagios/${MY_P}.tar.gz" | ||||
| #	mirror://gentoo/nagios-2.0b.cfg-sample.gz" | ||||
|  | ||||
| LICENSE="GPL-2" | ||||
| SLOT="0" | ||||
| KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86" | ||||
| IUSE="noweb perl debug apache2" | ||||
| # mysql postgres | ||||
| DEPEND="virtual/mailx | ||||
| 	!noweb? ( | ||||
| 		>=media-libs/jpeg-6b-r3 | ||||
| 		>=media-libs/libpng-1.2.5-r4 | ||||
| 		>=media-libs/gd-1.8.3-r5 | ||||
| 		${NEED_APACHE_DEPEND} | ||||
| 		perl? ( net-analyzer/traceroute ) | ||||
| 	) | ||||
| 	perl? ( >=dev-lang/perl-5.6.1-r7 )" | ||||
|  | ||||
| S="${WORKDIR}/${MY_P}" | ||||
|  | ||||
| pkg_setup() { | ||||
| 	# If there's a gd lib on the system, it will try to build with it. | ||||
| 	# check if gdlib-config is on, and then check its output. | ||||
| 	if [[ -x ${ROOT}usr/bin/gdlib-config ]]; then | ||||
| 		if [[ ! $(${ROOT}usr/bin/gdlib-config --libs | grep -- -ljpeg) ]]; then | ||||
| 			eerror "Your gd has been compiled without jpeg support." | ||||
| 			eerror "Please re-emerge gd:" | ||||
| 			eerror "# USE="jpeg" emerge gd" | ||||
| 			die "pkg_setup failed" | ||||
| 		fi | ||||
| 	fi | ||||
|  | ||||
| 	enewgroup nagios | ||||
|  | ||||
| 	if use noweb; then | ||||
| 		enewuser nagios -1 /bin/bash /dev/null nagios | ||||
| 	else | ||||
| 		enewuser nagios -1 /bin/bash /dev/null nagios,apache | ||||
| 	fi | ||||
| } | ||||
|  | ||||
| src_unpack() { | ||||
| 	unpack ${A} | ||||
| 	cd ${S} | ||||
| 	epatch ${FILESDIR}/2.x-series-nsca.patch | ||||
| 	# ppc64 needs this | ||||
| 	gnuconfig_update | ||||
| } | ||||
|  | ||||
| src_compile() { | ||||
| 	local myconf | ||||
|  | ||||
| 	if use perl | ||||
| 	then | ||||
| 		myconf="${myconf} --enable-embedded-perl --with-perlcache" | ||||
| 	fi | ||||
|  | ||||
| 	if use debug; then | ||||
| 		myconf="${myconf} --enable-DEBUG0" | ||||
| 		myconf="${myconf} --enable-DEBUG1" | ||||
| 		myconf="${myconf} --enable-DEBUG2" | ||||
| 		myconf="${myconf} --enable-DEBUG3" | ||||
| 		myconf="${myconf} --enable-DEBUG4" | ||||
| 		myconf="${myconf} --enable-DEBUG5" | ||||
| 	fi | ||||
|  | ||||
| 	if use noweb; then | ||||
| 		myconf="${myconf} --with-command-grp=nagios" | ||||
| 	else | ||||
| 		myconf="${myconf} --with-command-grp=apache" | ||||
| 	fi | ||||
|  | ||||
| 	./configure ${myconf} \ | ||||
| 		--host=${CHOST} \ | ||||
| 		--prefix=/usr/nagios \ | ||||
| 		--localstatedir=/var/nagios \ | ||||
| 		--sysconfdir=/etc/nagios \ | ||||
| 		--infodir=/usr/share/info \ | ||||
| 		--mandir=/usr/share/man \ | ||||
| 		${myconf} || die "./configure failed" | ||||
|  | ||||
| 	emake CC=$(tc-getCC) nagios || die "make failed" | ||||
|  | ||||
| 	if use !noweb ; then | ||||
| 		# Only compile the CGI's if "noweb" useflag is not set. | ||||
| 		make CC=$(tc-getCC) DESTDIR=${D} cgis || die | ||||
| 	fi | ||||
|  | ||||
| 	emake -C contrib all || "contrib make filed" | ||||
|  | ||||
| } | ||||
|  | ||||
| src_install() { | ||||
| 	dodoc Changelog INSTALLING LEGAL LICENSE README UPGRADING | ||||
| 	docinto contrib | ||||
| 	dodoc contrib/README | ||||
|  | ||||
| 	if use noweb; then | ||||
| 		sed -i -e 's/cd $(SRC_CGI) && $(MAKE) $@/# line removed due to noweb use flag/' \ | ||||
| 			-e 's/cd $(SRC_HTM) && $(MAKE) $@/# line removed due to noweb use flag/' \ | ||||
| 			Makefile | ||||
| 	fi | ||||
|  | ||||
| 	sed -i -e 's/^contactgroups$//g' Makefile | ||||
|  | ||||
| 	make DESTDIR=${D} install | ||||
| 	make DESTDIR=${D} install-config | ||||
| 	make DESTDIR=${D} install-commandmode | ||||
|  | ||||
| 	docinto sample-configs | ||||
| 	dodoc ${D}/etc/nagios/* | ||||
| 	rm ${D}/etc/nagios/* | ||||
|  | ||||
| 	newdoc ${WORKDIR}/nagios-2.0b.cfg-sample nagios.cfg-sample | ||||
|  | ||||
| 	#contribs are not configured by the configure script, we'll configure them overselves... | ||||
| 	find ${S}/contrib/ -type f | xargs sed -e 's:/usr/local/nagios/var/rw:/var/nagios/rw:; | ||||
| 						s:/usr/local/nagios/libexec:/usr/nagios/libexec:; | ||||
| 						s:/usr/local/nagios/etc:/etc/nagios:; | ||||
| 						s:/usr/local/nagios/sbin:/usr/nagios/sbin:;' -i | ||||
|  | ||||
| 	insinto /usr/share/doc/${PF}/contrib | ||||
| 	doins -r contrib/eventhandlers | ||||
|  | ||||
| 	exeinto /etc/init.d | ||||
| 	doexe ${FILESDIR}/nagios | ||||
|  | ||||
| 	insinto /etc/conf.d | ||||
| 	newins ${FILESDIR}/conf.d nagios | ||||
|  | ||||
| 	chmod 644 ${S}/contrib/*.cgi | ||||
| 	into /usr/nagios | ||||
| 	for bin in `find contrib/ -type f -perm 0755 -maxdepth 1` ; do | ||||
| 		dobin $bin | ||||
| 	done | ||||
|  | ||||
| 	# Apache Module | ||||
| 	if use !noweb; then | ||||
| 		if use apache2; then | ||||
| 			insinto ${APACHE2_MODULES_CONFDIR} | ||||
| 			doins ${FILESDIR}/99_nagios.conf | ||||
| 		else | ||||
| 			insinto ${APACHE1_MODULES_CONFDIR} | ||||
| 			doins ${FILESDIR}/nagios.conf | ||||
| 		fi | ||||
| 		if use perl; then | ||||
| 			into /usr/nagios ; dosbin contrib/traceroute.cgi | ||||
| 		fi | ||||
| 	fi | ||||
|  | ||||
| 	for dir in etc/nagios usr/nagios var/nagios ; do | ||||
| 		chown -R nagios:nagios ${D}/${dir} || die "Failed chown of ${D}/${dir}" | ||||
| 	done | ||||
|  | ||||
| 	keepdir /etc/nagios | ||||
| 	keepdir /var/nagios | ||||
| 	keepdir /var/nagios/archives | ||||
| 	keepdir /usr/nagios/share/ssi | ||||
| 	keepdir /var/nagios/rw | ||||
|  | ||||
| 	if use noweb; then | ||||
| 		chown -R nagios:nagios ${D}/var/nagios/rw || die "Failed Chown of ${D}/var/nagios/rw" | ||||
| 	else | ||||
| 		chown -R nagios:apache ${D}/var/nagios/rw || die "Failed Chown of ${D}/var/nagios/rw" | ||||
| 	fi | ||||
|  | ||||
| 	chmod ug+s ${D}/var/nagios/rw || die "Failed Chmod of ${D}/var/nagios/rw" | ||||
| 	chmod 0750 ${D}/etc/nagios || die "Failed chmod of ${D}/etc/nagios" | ||||
| } | ||||
|  | ||||
| pkg_postinst() { | ||||
| 	einfo | ||||
| 	einfo "The example config files are located at /usr/share/doc/${PF}/sample-configs/." | ||||
| 	einfo | ||||
| 	einfo "Also, if you want nagios to start at boot time" | ||||
| 	einfo "remember to execute:" | ||||
| 	einfo "  rc-update add nagios default" | ||||
| 	einfo | ||||
|  | ||||
| 	if use !noweb; then | ||||
| 		einfo "This does not include cgis that are perl-dependent" | ||||
| 		einfo "Currently traceroute.cgi is perl-dependent" | ||||
| 		einfo "To have ministatus.cgi requires copying of ministatus.c" | ||||
| 		einfo "to cgi directory for compiling." | ||||
|  | ||||
| 		if use apache2; then | ||||
| 			einfo " Edit /etc/conf.d/apache2 and add \"-D NAGIOS\"" | ||||
| 		else | ||||
| 			einfo " Edit /etc/conf.d/apache and add \"-D NAGIOS\"" | ||||
| 		fi | ||||
|  | ||||
| 		einfo | ||||
| 		einfo "That will make nagios's web front end visable via" | ||||
| 		einfo "http://localhost/nagios/" | ||||
| 		einfo | ||||
|  | ||||
| 	else | ||||
| 		einfo "Please note that you have installed Nagios without web interface." | ||||
| 		einfo "Please don't file any bugs about having no web interface when you do this." | ||||
| 		einfo "Thank you!" | ||||
| 	fi | ||||
|  | ||||
| 	einfo | ||||
| 	einfo "If your kernel has /proc protection, nagios" | ||||
| 	einfo "will not be happy as it relies on accessing the proc" | ||||
| 	einfo "filesystem. You can fix this by adding nagios into" | ||||
| 	einfo "the group wheel, but this is not recomended." | ||||
| 	einfo | ||||
|  | ||||
| 	einfo | ||||
| 	ewarn "Use /usr/nagios/bin/convertcfg for configuration file conversion" | ||||
| } | ||||
|  | ||||
| pkg_prerm() { | ||||
| 	/etc/init.d/nagios stop | ||||
| } | ||||
		Reference in New Issue
	
	Block a user