diff options
Diffstat (limited to 'net-mgmt/nagios-check_kumofs')
-rw-r--r-- | net-mgmt/nagios-check_kumofs/Makefile | 31 | ||||
-rw-r--r-- | net-mgmt/nagios-check_kumofs/files/check_kumomgr.in | 65 | ||||
-rw-r--r-- | net-mgmt/nagios-check_kumofs/files/check_kumosvr.in | 52 | ||||
-rw-r--r-- | net-mgmt/nagios-check_kumofs/pkg-descr | 4 |
4 files changed, 0 insertions, 152 deletions
diff --git a/net-mgmt/nagios-check_kumofs/Makefile b/net-mgmt/nagios-check_kumofs/Makefile deleted file mode 100644 index d36927b8d25e..000000000000 --- a/net-mgmt/nagios-check_kumofs/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -# $FreeBSD$ - -PORTNAME= check_kumofs -PORTVERSION= 0.20100118 -CATEGORIES= net-mgmt -MASTER_SITES= # none -PKGNAMEPREFIX= nagios- -DISTFILES= # none - -MAINTAINER= ports@FreeBSD.org -COMMENT= Nagios plugin for kumofs manager/server - -RUN_DEPENDS= \ - nagios-plugins>0:${PORTSDIR}/net-mgmt/nagios-plugins \ - kumoctl:${PORTSDIR}/databases/kumofs - -PLIST_FILES= libexec/nagios/check_kumomgr libexec/nagios/check_kumosvr - -NO_STAGE= yes -do-build: - ${MKDIR} ${WRKSRC} -.for f in check_kumomgr check_kumosvr - ${SED} -e 's|/usr/local|${PREFIX}|' ${FILESDIR}/${f}.in > ${WRKSRC}/${f} -.endfor - -do-install: -.for f in check_kumomgr check_kumosvr - ${INSTALL_SCRIPT} ${WRKSRC}/${f} ${PREFIX}/libexec/nagios/${f} -.endfor - -.include <bsd.port.mk> diff --git a/net-mgmt/nagios-check_kumofs/files/check_kumomgr.in b/net-mgmt/nagios-check_kumofs/files/check_kumomgr.in deleted file mode 100644 index 61084edb852a..000000000000 --- a/net-mgmt/nagios-check_kumofs/files/check_kumomgr.in +++ /dev/null @@ -1,65 +0,0 @@ -#!/usr/bin/env ruby -# -# Copyright (C) Etolabo Corp. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# search kumoctl and load -[ - "/usr/local/bin", - File.dirname(__FILE__), -].map {|x| x+"/kumoctl"}.each do |ks| - if File::file?(ks) - load ks - break - end -end - -def usage - puts "Usage: #{File.basename($0)} address[:port=#{KumoRPC::MANAGER_DEFAULT_PORT}] command [options]" - puts "command:" - puts " status get status" - exit 1 -end - -$now = Time.now.strftime("%Y%m%d") - -if ARGV.length < 2 - usage -end - -addr = ARGV.shift -host, port = addr.split(':', 2) -port ||= KumoRPC::MANAGER_DEFAULT_PORT - -cmd = ARGV.shift - -case cmd -when "stat", "status" - usage if ARGV.length != 0 - attached, not_attached, date, clock = - KumoManager.new(host, port).GetStatus - puts "not attached node: #{not_attached.size}" - puts "attached node : #{attached.size}" - puts "hash space timestamp: #{date} clock #{clock}" - if not_attached.size == 0 - exit 0 - else - exit 1 - end -else - puts "unknown command #{cmd}" - puts "" - usage -end diff --git a/net-mgmt/nagios-check_kumofs/files/check_kumosvr.in b/net-mgmt/nagios-check_kumofs/files/check_kumosvr.in deleted file mode 100644 index 5f3a56c652fe..000000000000 --- a/net-mgmt/nagios-check_kumofs/files/check_kumosvr.in +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/env ruby -# -# Copyright (C) Etolabo Corp. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# search kumostat and load -[ - "/usr/local/bin", - File.dirname(__FILE__), -].map {|x| x+"/kumostat"}.each do |ks| - if File::file?(ks) - load ks - break - end -end - -NUMBER_OF_LOWEST_ITEMS = 500 - -def usage - puts "Usage: #{File.basename($0)} address[:port=#{KumoRPC::SERVER_DEFAULT_PORT}]" - exit 1 -end - -if ARGV.length != 1 - usage -end - -addr = ARGV.shift -host, port = addr.split(':', 2) -port ||= KumoRPC::SERVER_DEFAULT_PORT - -cmd = ARGV.shift - -n = KumoServer.new(host, port).GetStatus(KumoServer::STAT_DB_ITEMS) -puts "items: #{n}" -if n < NUMBER_OF_LOWEST_ITEMS - exit 1 -else - exit 0 -end diff --git a/net-mgmt/nagios-check_kumofs/pkg-descr b/net-mgmt/nagios-check_kumofs/pkg-descr deleted file mode 100644 index c4a3be13c699..000000000000 --- a/net-mgmt/nagios-check_kumofs/pkg-descr +++ /dev/null @@ -1,4 +0,0 @@ -This "check_kumofs" is Nagios plugin for monitoring kumofs server node -and manager node. - -WWW: http://github.com/etolabo/nagios-check_kumofs |