From 023f92f9e3eec7de6c1286549000be79189a4fde Mon Sep 17 00:00:00 2001 From: Thomas Wiest Date: Mon, 15 Dec 2014 16:00:47 -0500 Subject: changed atomic proxy to use pre-built container images --- .../files/monitoring_container/Dockerfile | 22 ------------- .../monitoring_container/register-with-zabbix.rb | 36 ---------------------- 2 files changed, 58 deletions(-) delete mode 100644 roles/docker_img_monitoring/files/monitoring_container/Dockerfile delete mode 100755 roles/docker_img_monitoring/files/monitoring_container/register-with-zabbix.rb (limited to 'roles/docker_img_monitoring/files') diff --git a/roles/docker_img_monitoring/files/monitoring_container/Dockerfile b/roles/docker_img_monitoring/files/monitoring_container/Dockerfile deleted file mode 100644 index 14e7f8650..000000000 --- a/roles/docker_img_monitoring/files/monitoring_container/Dockerfile +++ /dev/null @@ -1,22 +0,0 @@ -# This FROM gives us the proper oo-rhui certs, basic runtime env vars, basic repos, etc. -# Otherwise we can't install anything -FROM rhel6ops - -MAINTAINER Thomas Wiest - -RUN yum -y update ; yum clean all - -# Container Specific RPMs -RUN yum -y install ruby193-rubygem-zbxapi cronie zabbix-sender ruby openshift-origin-util-scl ruby193-facter socat ; yum clean all - -# Setup ctr-ipc dir -RUN ln -s /shared/var/run/ctr-ipc /var/run/ctr-ipc - -# Container specific files -ADD start.rb /start.rb -ADD register-with-zabbix.rb /register-with-zabbix.rb - -# TEMP WORKAROUND: until cron-send-haproxy-status.rb doesn't check service to see if haproxy is running -RUN ln -sf /bin/true /etc/init.d/haproxy - -CMD ["/start.rb"] diff --git a/roles/docker_img_monitoring/files/monitoring_container/register-with-zabbix.rb b/roles/docker_img_monitoring/files/monitoring_container/register-with-zabbix.rb deleted file mode 100755 index 02659228f..000000000 --- a/roles/docker_img_monitoring/files/monitoring_container/register-with-zabbix.rb +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env oo-ruby - -require 'optparse' -require '/usr/local/lib/zabbix_helper' - - -if __FILE__ == $0 - $stdout.sync = true - $stderr.sync = true - - opt_name = nil - opt_hostgroup = [] - opt_template = [] - - optparse = OptionParser.new do |opts| - opts.banner = "\nUsage: #{File.basename $0}\n\n" - - opts.on('--name NAME', '[REQUIRED] The host name to register') { |value| opt_name = value } - opts.on('--hostgroup GROUP', '[REQUIRED] The hostgroup(s) with which to register') { |value| opt_hostgroup << value } - opts.on('--template TEMPLATE', '[REQUIRED] The template with which to register') { |value| opt_template << value } - end - - optparse.parse! - - abort optparse.help if opt_name.nil? || opt_hostgroup.empty? || opt_template.empty? - - puts "Adding host [#{opt_name}] to zabbix..." - - zh = ZabbixHelper.new() - result = zh.create_agentless_host(opt_name, opt_hostgroup, opt_template) - if result['hostids'].nil? - raise "failed to add #{opt_name}" - else - puts "Successfully registered host with hostid [#{result['hostids'].first}]" - end -end -- cgit v1.2.3