diff options
author | 2008-03-21 12:06:07 +0000 | |
---|---|---|
committer | 2008-03-21 12:06:07 +0000 | |
commit | 0e43e7ff7bf1f2018574e4d0d7957971b90630fc (patch) | |
tree | 9a75668ba18adca41aa4851480501331d952b58b | |
parent | add nagios-nrpe for nagios3 (diff) | |
download | dertobi123-0e43e7ff7bf1f2018574e4d0d7957971b90630fc.tar.gz dertobi123-0e43e7ff7bf1f2018574e4d0d7957971b90630fc.tar.bz2 dertobi123-0e43e7ff7bf1f2018574e4d0d7957971b90630fc.zip |
add nagios-nsca for nagios3
svn path=/; revision=31
-rw-r--r-- | net-analyzer/nagios-nsca/Manifest | 6 | ||||
-rw-r--r-- | net-analyzer/nagios-nsca/files/nsca-nagios3 | 36 | ||||
-rw-r--r-- | net-analyzer/nagios-nsca/files/nsca.cfg | 182 | ||||
-rw-r--r-- | net-analyzer/nagios-nsca/files/send_nsca.cfg | 63 | ||||
-rw-r--r-- | net-analyzer/nagios-nsca/metadata.xml | 25 | ||||
-rw-r--r-- | net-analyzer/nagios-nsca/nagios-nsca-2.7.2-r100.ebuild | 53 |
6 files changed, 365 insertions, 0 deletions
diff --git a/net-analyzer/nagios-nsca/Manifest b/net-analyzer/nagios-nsca/Manifest new file mode 100644 index 0000000..1c876f8 --- /dev/null +++ b/net-analyzer/nagios-nsca/Manifest @@ -0,0 +1,6 @@ +AUX nsca-nagios3 595 RMD160 446c5c70e1854ed3f1ec34086316ac4de2d3bfb5 SHA1 929e9bdbfaf889b0eef542d3d1d6907cab7b69b5 SHA256 5744bb0360d71ffa1ffb028c4049d8f708f7f60c4ea4daf554d39b2069a7526a +AUX nsca.cfg 4960 RMD160 0bcf00e89199c507c92c2104918fcfe6af016bc0 SHA1 16fed5874443e629a68e80e4e85c202626fd4ef7 SHA256 b121a6d18d608fc8b45cf70015cf7bd9ab738877cee44078e3997f59eac38c07 +AUX send_nsca.cfg 1628 RMD160 8895a57e593df3403526a6f19dc79c942e3942da SHA1 a5c976ce39a29bbb544a1b76a58dadef10f16b09 SHA256 515e14db40782e655ab748cb5ed8ea357c1346f36e028b73fbe96f2d15aaa781 +DIST nsca-2.7.2.tar.gz 104953 RMD160 951aa9d008f008ee932577ce03c848a69695564b SHA1 95e0778580b235ed47f0294ab9ef669c37f972dd SHA256 fb41e3b536735235056643fb12187355c6561b9148996c093e8faddd4fced571 +EBUILD nagios-nsca-2.7.2-r100.ebuild 1435 RMD160 d475f344a59893f3b5806f60126a8a901e3705b9 SHA1 485c13f1c272cf506af638bb1403a188afe778b3 SHA256 8d41e11884f684b3ecff637bc70d15eabde437f0cfd8dca044d5b4fe2537aae0 +MISC metadata.xml 1132 RMD160 4796a91a46db995b9b42f62d63654cba011a46f3 SHA1 5f86e17f4ca3f079263d8c6a6374c470f50d4461 SHA256 68279aa5c3962390542979ae19226435771726e7a009c139e11d7c1c56e0e1fa diff --git a/net-analyzer/nagios-nsca/files/nsca-nagios3 b/net-analyzer/nagios-nsca/files/nsca-nagios3 new file mode 100644 index 0000000..bef0cb7 --- /dev/null +++ b/net-analyzer/nagios-nsca/files/nsca-nagios3 @@ -0,0 +1,36 @@ +#!/sbin/runscript + +opts="${opts} reload" + +depend() { + need net +} + +start() { + ebegin "Starting nsca" + start-stop-daemon --start --quiet --name nsca \ + --startas /usr/bin/nsca \ + -c nagios:nagios \ + -- -c /etc/nagios/nsca.cfg \ + --daemon + eend $? "Failed to Start nsca" +} + +stop() { + ebegin "Stopping nsca" + start-stop-daemon --stop --quiet -n nsca + eend $? "Failed to Stop nsca" +} + +reload() { + ebegin "Reloading nsca" + kill -HUP `pgrep nsca` + eend $? "Failed to reload nsca" +} + +restart() { + ebegin "Restarting nsca" + svc_stop + svc_start + eend $? "Failed to Restart nsca" +} diff --git a/net-analyzer/nagios-nsca/files/nsca.cfg b/net-analyzer/nagios-nsca/files/nsca.cfg new file mode 100644 index 0000000..e7e0402 --- /dev/null +++ b/net-analyzer/nagios-nsca/files/nsca.cfg @@ -0,0 +1,182 @@ +#################################################### +# Sample NSCA Daemon Config File +# Written by: Ethan Galstad (nagios@nagios.org) +# +# Last Modified: 06-10-2002 +#################################################### + + + +# PORT NUMBER +# Port number we should wait for connections on. +# This must be a non-priveledged port (i.e. > 1024). + +server_port=5667 + + + +# SERVER ADDRESS +# Address that nrpe has to bind to in case there are +# more as one interface and we do not want nrpe to bind +# (thus listen) on all interfaces. + +#server_address=192.168.1.1 + + + +# ALLOWED HOST ADDRESSES +# This is a comma-delimited list of IP address of hosts that are allowed +# to talk to the NSCA daemon. +# +# Note: The daemon only does rudimentary checking of the client's IP +# address. I would highly recommend running as a service under +# inetd instead of as a standalone daemon and using TCP wrappers to +# limit access. + +allowed_hosts=127.0.0.1 + + + +# NSCA USER +# This determines the effective user that the NSCA daemon should run as. +# You can either supply a username or a UID. +# +# NOTE: This option is ignored if NSCA is running under either inetd or xinetd + +nsca_user=nagios + + + +# NSCA GROUP +# This determines the effective group that the NSCA daemon should run as. +# You can either supply a group name or a GID. +# +# NOTE: This option is ignored if NSCA is running under either inetd or xinetd + +nsca_group=nagios + + + +# DEBUGGING OPTION +# This option determines whether or not debugging +# messages are logged to the syslog facility. +# Values: 0 = debugging off, 1 = debugging on + +debug=0 + + + +# COMMAND FILE +# This is the location of the Nagios command file that the daemon +# should write all service check results that it receives. + +command_file=/var/nagios/rw/nagios.cmd + + +# ALTERNATE DUMP FILE +# This is used to specify an alternate file the daemon should +# write service check results to in the event the command file +# does not exist. It is important to note that the command file +# is implemented as a named pipe and only exists when Nagios is +# running. You may want to modify the startup script for Nagios +# to dump the contents of this file into the command file after +# it starts Nagios. Or you may simply choose to ignore any +# check results received while Nagios was not running... + +alternate_dump_file=/var/nagios/rw/nsca.dump + + + +# AGGREGATED WRITES OPTION +# This option determines whether or not the nsca daemon will +# aggregate writes to the external command file for client +# connections that contain multiple check results. If you +# are queueing service check results on remote hosts and +# sending them to the nsca daemon in bulk, you will probably +# want to enable bulk writes, as this will be a bit more +# efficient. +# Values: 0 = do not aggregate writes, 1 = aggregate writes + +aggregate_writes=0 + + + +# APPEND TO FILE OPTION +# This option determines whether or not the nsca daemon will +# will open the external command file for writing or appending. +# This option should almost *always* be set to 0! +# Values: 0 = open file for writing, 1 = open file for appending + +append_to_file=0 + + + +# MAX PACKET AGE OPTION +# This option is used by the nsca daemon to determine when client +# data is too old to be valid. Keeping this value as small as +# possible is recommended, as it helps prevent the possibility of +# "replay" attacks. This value needs to be at least as long as +# the time it takes your clients to send their data to the server. +# Values are in seconds. The max packet age cannot exceed 15 +# minutes (900 seconds). + +max_packet_age=30 + + + +# DECRYPTION PASSWORD +# This is the password/passphrase that should be used to descrypt the +# incoming packets. Note that all clients must encrypt the packets +# they send using the same password! +# IMPORTANT: You don't want all the users on this system to be able +# to read the password you specify here, so make sure to set +# restrictive permissions on this config file! + +#password= + + + +# DECRYPTION METHOD +# This option determines the method by which the nsca daemon will +# decrypt the packets it receives from the clients. The decryption +# method you choose will be a balance between security and performance, +# as strong encryption methods consume more processor resources. +# You should evaluate your security needs when choosing a decryption +# method. +# +# Note: The decryption method you specify here must match the +# encryption method the nsca clients use (as specified in +# the send_nsca.cfg file)!! +# Values: +# +# 0 = None (Do NOT use this option) +# 1 = Simple XOR (No security, just obfuscation, but very fast) +# +# 2 = DES +# 3 = 3DES (Triple DES) +# 4 = CAST-128 +# 5 = CAST-256 +# 6 = xTEA +# 7 = 3WAY +# 8 = BLOWFISH +# 9 = TWOFISH +# 10 = LOKI97 +# 11 = RC2 +# 12 = ARCFOUR +# +# 14 = RIJNDAEL-128 +# 15 = RIJNDAEL-192 +# 16 = RIJNDAEL-256 +# +# 19 = WAKE +# 20 = SERPENT +# +# 22 = ENIGMA (Unix crypt) +# 23 = GOST +# 24 = SAFER64 +# 25 = SAFER128 +# 26 = SAFER+ +# + +decryption_method=1 + diff --git a/net-analyzer/nagios-nsca/files/send_nsca.cfg b/net-analyzer/nagios-nsca/files/send_nsca.cfg new file mode 100644 index 0000000..60196c0 --- /dev/null +++ b/net-analyzer/nagios-nsca/files/send_nsca.cfg @@ -0,0 +1,63 @@ +#################################################### +# Sample NSCA Client Config File +# Written by: Ethan Galstad (nagios@nagios.org) +# +# Last Modified: 02-21-2002 +#################################################### + + +# ENCRYPTION PASSWORD +# This is the password/passphrase that should be used to encrypt the +# outgoing packets. Note that the nsca daemon must use the same +# password when decrypting the packet! +# IMPORTANT: You don't want all the users on this system to be able +# to read the password you specify here, so make sure to set +# restrictive permissions on this config file! + +#password= + + + +# ENCRYPTION METHOD +# This option determines the method by which the send_nsca client will +# encrypt the packets it sends to the nsca daemon. The encryption +# method you choose will be a balance between security and performance, +# as strong encryption methods consume more processor resources. +# You should evaluate your security needs when choosing an encryption +# method. +# +# Note: The encryption method you specify here must match the +# decryption method the nsca daemon uses (as specified in +# the nsca.cfg file)!! +# Values: +# 0 = None (Do NOT use this option) +# 1 = Simple XOR (No security, just obfuscation, but very fast) +# +# 2 = DES +# 3 = 3DES (Triple DES) +# 4 = CAST-128 +# 5 = CAST-256 +# 6 = xTEA +# 7 = 3WAY +# 8 = BLOWFISH +# 9 = TWOFISH +# 10 = LOKI97 +# 11 = RC2 +# 12 = ARCFOUR +# +# 14 = RIJNDAEL-128 +# 15 = RIJNDAEL-192 +# 16 = RIJNDAEL-256 +# +# 19 = WAKE +# 20 = SERPENT +# +# 22 = ENIGMA (Unix crypt) +# 23 = GOST +# 24 = SAFER64 +# 25 = SAFER128 +# 26 = SAFER+ +# + +encryption_method=1 + diff --git a/net-analyzer/nagios-nsca/metadata.xml b/net-analyzer/nagios-nsca/metadata.xml new file mode 100644 index 0000000..7ebc0ad --- /dev/null +++ b/net-analyzer/nagios-nsca/metadata.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>netmon</herd> + <maintainer> + <email>dertobi123@gentoo.org</email> + <name>Tobias Scherbaum</name> + </maintainer> + <longdescription lang="en"> + This program is designed to accept passive service check results from + clients that use the send_nsca utility (which is included in this + package) and pass them along to the Nagios process by using the external + command interface. The program can either be run as a standalone daemon + or as a service under inetd. If you have libmcrypt installed on your + systems, you can choose from multiple crypto algorithms (DES, 3DES, + CAST, xTEA, Twofish, LOKI97, RJINDAEL, SERPENT, GOST, SAFER/SAFER+, + etc.) for encrypting the traffic between the client and the server. + Encryption is important in this addon, as it prevents unauthorized users + from sending bogus check results to Nagios. Read the included SECURITY + document for more information. + + This package provides the send_nsca utility running on the client. + </longdescription> +</pkgmetadata> + diff --git a/net-analyzer/nagios-nsca/nagios-nsca-2.7.2-r100.ebuild b/net-analyzer/nagios-nsca/nagios-nsca-2.7.2-r100.ebuild new file mode 100644 index 0000000..96307ed --- /dev/null +++ b/net-analyzer/nagios-nsca/nagios-nsca-2.7.2-r100.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-nsca/nagios-nsca-2.7.2.ebuild,v 1.5 2008/03/14 11:57:19 caleb Exp $ + +inherit multilib + +DESCRIPTION="Nagios NSCA - Nagios Service Check Acceptor" +HOMEPAGE="http://www.nagios.org/" +SRC_URI="mirror://sourceforge/nagios/nsca-${PV}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 ~ppc ppc64 sparc x86" +IUSE="" + +DEPEND=">=net-analyzer/nagios-plugins-1.3.1 + >=dev-libs/libmcrypt-2.5.1-r4" +S="${WORKDIR}/nsca-${PV}" + +src_compile() { + ./configure \ + --host=${CHOST} \ + --prefix=/usr \ + --localstatedir=/var/nagios \ + --sysconfdir=/etc/nagios \ + --with-nsca-user=nagios \ + --with-nsca-grp=nagios \ + --infodir=/usr/share/info \ + --mandir=/usr/share/man || die "./configure failed" + emake all || die "emake failed" +} + +src_install() { + dodoc LEGAL Changelog README SECURITY + insinto /etc/nagios + doins "${S}"/sample-config/nsca.cfg + doins "${S}"/sample-config/send_nsca.cfg + + exeinto /usr/bin + doexe src/nsca + fowners nagios:nagios /usr/nagios/bin/nsca + + exeinto /usr/$(get_libdir)/nagios/plugins + doexe src/send_nsca + fowners nagios:nagios /usr/$(get_libdir)/nagios/plugins/send_nsca + newinitd "${FILESDIR}"/nsca-nagios3 nsca +} +pkg_postinst() { + einfo + einfo "If you are using the nsca daemon, remember to edit" + einfo "the config file /etc/nagios/nsca.cfg" + einfo +} |