diff options
Diffstat (limited to 'net-analyzer/nsca')
-rw-r--r-- | net-analyzer/nsca/Manifest | 7 | ||||
-rw-r--r-- | net-analyzer/nsca/files/nsca.conf | 5 | ||||
-rw-r--r-- | net-analyzer/nsca/files/nsca.init | 33 | ||||
-rw-r--r-- | net-analyzer/nsca/metadata.xml | 40 | ||||
-rw-r--r-- | net-analyzer/nsca/nsca-2.7.2-r103.ebuild | 87 |
5 files changed, 172 insertions, 0 deletions
diff --git a/net-analyzer/nsca/Manifest b/net-analyzer/nsca/Manifest new file mode 100644 index 000000000000..f0a8cb12d920 --- /dev/null +++ b/net-analyzer/nsca/Manifest @@ -0,0 +1,7 @@ +AUX nsca.conf 219 SHA256 f455eb68f207b7217026c2a5bb9e562956f3203dd1f3923f1bd4370f119485df SHA512 c7dda1f94611e028b52ae6bf330db1415b18a88590a8a7c54d1f862aaa326751b39e88380cd24217aab11f32ef5842c6b1d4a0333ca0310a5be0e94c573165b2 WHIRLPOOL 27abdd1e5e50e20490fac87b01e0e4da878733ed12cc86c60ee06e625e91987dcf63632625480bc551412945b2e726421e9fdf6191217dd705c5a050919e65dc +AUX nsca.init 645 SHA256 c54d4fd09b5d458ee96eebe8f0e47081984329291fd44a7fe013cac7307fa225 SHA512 88fab799a388dc6f10a2eac94b1ee5d1a76687c408958cc8cf5c22219d10b439d0c9c64a9ae9f34211e19eccb95cb2417e4b972c5549d23ef4bdd5493cdaf224 WHIRLPOOL 58b39783bce1cd943ad953f305945bb33284324ea4b4a9b0dd1eea136ba3b8c6cabf6c70ebfb5a83fe263dcadceceb97e9430505b9fa3e84e467327a1d3991d1 +DIST nsca-2.7.2.tar.gz 104953 SHA256 fb41e3b536735235056643fb12187355c6561b9148996c093e8faddd4fced571 SHA512 f84cac3613bbd0ded4ec700c1dadac71ed075544d0f48281a70946a67792b7f4bcdf6dc3bd5ccf1293cc6a0277638e0f034c33064bf9c05696b4f015e7f15010 WHIRLPOOL 77daad5cef0434e243fab3eff56b4df8b91abc15a166068f5398667483fb4de04ebdeeda6c340ef19ae17b5da5264e2b8cfe8e958866fc1f35ef504df2c4340c +EBUILD nsca-2.7.2-r103.ebuild 2123 SHA256 e85868c90c9819c69c4d7a7be8127d71d71443e149776c542d4aded0456e27ea SHA512 b1588edc660fa3909911d39a591631ab099863a823869facfa6bca35456a9faafee98718919686d0c62fc06cf62b87ce25a3e9a7fc9aceafbd1a425479bb8f6e WHIRLPOOL 5b21f0458ce4586ef511cd1c3357ce4ab6dfebfbc6f81f0fcc4dd4490e22ae6e7350f5683533dc4b02fed83d1fde2ca3ed99202045951b4912c25fe3f7abeeaa +MISC ChangeLog 2732 SHA256 c85e4db69cc77bfd95b90c7df70f45ff066b47fc67eebf92a563b69cf6408839 SHA512 e9b014f582da4dc565831fbd5fd08f4520762b56a84003d3d3aa7159eab30b443f489e94a80d5fdb7bed482eb1362b488b87b3513b522823b5eca79d832aaf48 WHIRLPOOL f4adc0a68df4354c8d6e3de699df24496cd045699fce51f5c78be887818aa1f06aa25fa92543adab52c134a975eabea5cb5f125c3ca21c7c43efb02d26734bc6 +MISC ChangeLog-2015 7709 SHA256 692e213b97797d54ff170963168efa3433dd70cac876470c8d0ad86096d2e874 SHA512 fec8b5665fdd919a8bc3ff5a5adc4b35a2eb8b22a8791ee4d362e59c8dd2edea729837abdc65ba310f433167af5600913a0f11840d18f8d1350f279c7e3bc70d WHIRLPOOL 46eed89dafd28ea730196a0e0934b535998bb19e2d10f6e3bdc18197e7228a57d4e8ad26bf7f4ac341ea24103f2403ab348f226eb877e0d6103b3f88423dec23 +MISC metadata.xml 1732 SHA256 b8a7749e3dabbe6e4248140a2d08f93acbad73386440bae1b4e403f725384d31 SHA512 1e24a8adef9fb860b05eed48d741e7b2b981ca826300f14ee3c2b7ddd6a497fbc3318a31a9f284eb11a7f216d71ad567d4a4438e03876c83985bd8683b525a1b WHIRLPOOL 396e4566bedbd890d7a566e51718593ed5e009dbcd48a3449477f24c70c31d040d62a7b44a75d7742dcf4f8125636d2b644d29302260a4eb4f95c6ca8b0ab834 diff --git a/net-analyzer/nsca/files/nsca.conf b/net-analyzer/nsca/files/nsca.conf new file mode 100644 index 000000000000..987cd10ebf58 --- /dev/null +++ b/net-analyzer/nsca/files/nsca.conf @@ -0,0 +1,5 @@ +# Choose the configuration file to use; the pre-defined configurations +# for Nagios and Icinga are available in their respective directories: +# /etc/nagios/nsca.cfg +# /etc/icinga/nsca.cfg +CFGFILE=/etc/nagios/nsca.cfg diff --git a/net-analyzer/nsca/files/nsca.init b/net-analyzer/nsca/files/nsca.init new file mode 100644 index 000000000000..cd47bb64e95c --- /dev/null +++ b/net-analyzer/nsca/files/nsca.init @@ -0,0 +1,33 @@ +#!/sbin/openrc-run +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +: ${CFGFILE:=/etc/nagios/nsca.cfg} + +get_config() { + [ -f ${CFGFILE} ] || return 1 + + sed -n -e 's:^[ \t]*'$1'=\([^#]\+\).*:\1:p' \ + ${CFGFILE} +} + +extra_started_commands="reload" + +command=/usr/libexec/${SVCNAME} +command_args="-c ${CFGFILE} --daemon" +pidfile=$(get_config pid_file) + +depend() { + config ${CFGFILE} + + case $(get_config nsca_user) in + icinga) need icinga ;; + nagios) need nagios ;; + esac +} + +reload() { + ebegin "Reloading ${SVCNAME}" + kill -HUP `cat $(get_config pid_file)` + eend $? +} diff --git a/net-analyzer/nsca/metadata.xml b/net-analyzer/nsca/metadata.xml new file mode 100644 index 000000000000..6d5b1ccd3d20 --- /dev/null +++ b/net-analyzer/nsca/metadata.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>sysadmin@gentoo.org</email> + <name>Gentoo Sysadmin Project</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> + <use> + <flag name="crypt"> + Build support for crypted communication with nsca, through + <pkg>dev-libs/libmcrypt</pkg>. It's recommended not to disable this + flag unless all the communication will be handled in an + absolutely safe environment. + </flag> + <flag name="minimal"> + Only build and install the send_nsca command and not the + daemon. This allows a very minimal install with no overhead when + setting up a node. + </flag> + </use> + <upstream> + <remote-id type="sourceforge">nagios</remote-id> + </upstream> +</pkgmetadata> diff --git a/net-analyzer/nsca/nsca-2.7.2-r103.ebuild b/net-analyzer/nsca/nsca-2.7.2-r103.ebuild new file mode 100644 index 000000000000..1f25434494ee --- /dev/null +++ b/net-analyzer/nsca/nsca-2.7.2-r103.ebuild @@ -0,0 +1,87 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=4 + +inherit multilib user eutils + +DESCRIPTION="Nagios Service Check Acceptor" +HOMEPAGE="http://www.nagios.org/" +SRC_URI="mirror://sourceforge/nagios/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 ppc ppc64 sparc x86" +IUSE="tcpd +crypt minimal" + +DEPEND="crypt? ( >=dev-libs/libmcrypt-2.5.1-r4 ) + !minimal? ( tcpd? ( sys-apps/tcp-wrappers ) )" + +RDEPEND="${DEPEND} + !minimal? ( || ( net-analyzer/icinga net-analyzer/nagios ) ) + sys-apps/openrc" + +pkg_setup() { + if ! use minimal; then + enewgroup nagios + enewgroup icinga + enewuser nagios -1 /bin/bash /var/nagios/home nagios + enewuser icinga -1 -1 /var/lib/icinga "icinga,nagios" + fi +} + +src_configure() { + use tcpd || export ac_cv_lib_wrap_main=no + use crypt || export ac_cv_path_LIBMCRYPT_CONFIG=/bin/false + + econf \ + --localstatedir=/var/nagios \ + --sysconfdir=/etc/nagios \ + --with-nsca-user=nagios \ + --with-nsca-grp=nagios +} + +src_compile() { + emake -C src send_nsca $(use minimal || echo nsca) + + # prepare the alternative configuration file + sed \ + -e '/nsca_\(user\|group\)/s:nagios:icinga:' \ + -e '/nsca_chroot/s:=.*:=/var/lib/icinga/rw:' \ + -e '/\(command\|alternate_dump\)_file/s:/var/nagios:/var/lib/icinga:' \ + "${S}"/sample-config/nsca.cfg > "${T}"/nsca.icinga.cfg +} + +src_install() { + dodoc LEGAL Changelog README SECURITY + + dobin src/send_nsca + + insinto /etc/nagios + doins "${S}"/sample-config/send_nsca.cfg + + if ! use minimal; then + exeinto /usr/libexec + doexe src/nsca + + newinitd "${FILESDIR}"/nsca.init nsca + newconfd "${FILESDIR}"/nsca.conf nsca + + insinto /etc/nagios + doins "${S}"/sample-config/nsca.cfg + + insinto /etc/icinga + newins "${T}"/nsca.icinga.cfg nsca.cfg + fi +} + +pkg_postinst() { + if ! use minimal; then + elog "If you are using the nsca daemon, remember to edit" + elog "the config file /etc/nagios/nsca.cfg" + elog "" + elog "If you intend to use nsca with Icinga, change the" + elog "configuration file path in /etc/conf.d/nsca so that" + elog "it will default to the correct paths and users." + fi +} |