From 1c3bcf2e5c77955fa2b40d58009911296b3f41de Mon Sep 17 00:00:00 2001 From: Martin Wilke Date: Fri, 29 May 2009 19:47:21 +0000 Subject: check_puppet - is a very simple Nagios plugin to check Puppet daemon availability with SNMP. Why check_puppet? 1. It does check whether puppetd and puppetmasterd is alive. 2. It does check state.yaml freshness 3. It does not require the full net-mgmt/nagios-plugins package on the client side 4. It is written in sh - code interpreter available in a base system WWW: http://renatasystems.org/freebsd/check_puppet.html PR: ports/135006 Submitted by: Alexey V. Degtyarev --- net-mgmt/nagios-check_puppet/Makefile | 33 +++++++++++++++++++++ net-mgmt/nagios-check_puppet/distinfo | 3 ++ net-mgmt/nagios-check_puppet/files/pkg-message.in | 36 +++++++++++++++++++++++ net-mgmt/nagios-check_puppet/pkg-descr | 15 ++++++++++ 4 files changed, 87 insertions(+) create mode 100644 net-mgmt/nagios-check_puppet/Makefile create mode 100644 net-mgmt/nagios-check_puppet/distinfo create mode 100644 net-mgmt/nagios-check_puppet/files/pkg-message.in create mode 100644 net-mgmt/nagios-check_puppet/pkg-descr (limited to 'net-mgmt/nagios-check_puppet') diff --git a/net-mgmt/nagios-check_puppet/Makefile b/net-mgmt/nagios-check_puppet/Makefile new file mode 100644 index 000000000000..faf181d1e675 --- /dev/null +++ b/net-mgmt/nagios-check_puppet/Makefile @@ -0,0 +1,33 @@ +# New ports collection makefile for: nagios-check_puppet +# Date created: Wed 27 May 2009 +# Whom: Alexey V. Degtyarev +# +# $FreeBSD$ +# + +PORTNAME= check_puppet +PORTVERSION= 1.1 +CATEGORIES= net-mgmt +MASTER_SITES= ftp://ftp.renatasystems.org/pub/FreeBSD/ports/distfiles/ +PKGNAMEPREFIX= nagios- + +MAINTAINER= alexey@renatasystems.org +COMMENT= Nagios plugin for checking Puppet daemon availability + +NO_BUILD= yes + +MAN1= check_puppet.1 +MANS= ${MAN1} + +SUB_FILES= pkg-message + +PLIST_FILES= bin/check_puppet + +do-install: + ${INSTALL_SCRIPT} ${WRKSRC}/check_puppet ${PREFIX}/bin/check_puppet +.for man in ${MANS} + ${INSTALL_MAN} ${WRKSRC}/${man} ${MAN${man:E}PREFIX}/man/man${man:E} +.endfor + @${CAT} ${PKGMESSAGE} + +.include diff --git a/net-mgmt/nagios-check_puppet/distinfo b/net-mgmt/nagios-check_puppet/distinfo new file mode 100644 index 000000000000..3eff39de2bfa --- /dev/null +++ b/net-mgmt/nagios-check_puppet/distinfo @@ -0,0 +1,3 @@ +MD5 (check_puppet-1.1.tar.gz) = 4837f430635fe550aebd0f3f56db8e4b +SHA256 (check_puppet-1.1.tar.gz) = 594b81de35977f3ebff70f62462abc37f54b503b6f70dd40258d9b06dffe81bf +SIZE (check_puppet-1.1.tar.gz) = 6652 diff --git a/net-mgmt/nagios-check_puppet/files/pkg-message.in b/net-mgmt/nagios-check_puppet/files/pkg-message.in new file mode 100644 index 000000000000..24dc12ded656 --- /dev/null +++ b/net-mgmt/nagios-check_puppet/files/pkg-message.in @@ -0,0 +1,36 @@ +******************************************************************************* + +Configuration expamle: + +1. On the client side in snmpd.conf(5) create a new exec command: + + exec check_puppet %%PREFIX%%/bin/check_puppet + +2. On the Nagios node create (if necessary) `check_snmp_oid' checkcommand: + + define command { + command_name check_snmp_oid + command_line $USER1$/check_snmp -H $HOSTADDRESS$ -o $ARG1$ -w $ARG2$ -c $ARG3$ + } + +Be sure to provide `command_line' here with correct authentication options +specific to your SNMP installation. You need to have package from +net-mgmt/nagios-plugins installed on your system compiled with WITH_NETSNMP +option enabled (disabled by default). + +3. Create a new check service: + + define service { + use generic-service + host_name your_hostname + service_description Puppet daemon + check_command check_snmp_oid!.1.3.6.1.4.1.2021.8.1.101.1,.1.3.6.1.4.1.2021.8.1.100.1!,0!,1! + } + +Adjust OID numbers to your SNMP installation by checking the output of +snmpwalk(1) command. The first OID should be the STRING output from exec, the +second should point to the INTEGER exit code. + +Restart Nagios and SNMP daemons to apply new configuration. + +******************************************************************************* diff --git a/net-mgmt/nagios-check_puppet/pkg-descr b/net-mgmt/nagios-check_puppet/pkg-descr new file mode 100644 index 000000000000..25fffdc98f54 --- /dev/null +++ b/net-mgmt/nagios-check_puppet/pkg-descr @@ -0,0 +1,15 @@ +check_puppet - is a very simple Nagios plugin to check Puppet daemon +availability with SNMP. + +Why check_puppet? + +1. It does check whether puppetd and puppetmasterd is alive. + +2. It does check state.yaml freshness + +3. It does not require the full net-mgmt/nagios-plugins package on the client +side + +4. It is written in sh - code interpreter available in a base system + +WWW: http://renatasystems.org/freebsd/check_puppet.html -- cgit v1.2.3