Lcarr has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/55795


Change subject: more nagios -> icinga cleanup
......................................................................

more nagios -> icinga cleanup

Change-Id: Ifee709cbe19f1296b5e11c0d33a75caa2203bb44
---
R files/icinga/check_udp2log_log_age
R files/icinga/check_udp2log_procs
D files/nagios/gammurc
D files/nagios/nagios-init
D files/nagios/nrpe_udp2log.cfg
M manifests/misc/udp2log.pp
6 files changed, 2 insertions(+), 290 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/95/55795/1

diff --git a/files/nagios/check_udp2log_log_age 
b/files/icinga/check_udp2log_log_age
similarity index 100%
rename from files/nagios/check_udp2log_log_age
rename to files/icinga/check_udp2log_log_age
diff --git a/files/nagios/check_udp2log_procs b/files/icinga/check_udp2log_procs
similarity index 100%
rename from files/nagios/check_udp2log_procs
rename to files/icinga/check_udp2log_procs
diff --git a/files/nagios/gammurc b/files/nagios/gammurc
deleted file mode 100644
index a460f8c..0000000
--- a/files/nagios/gammurc
+++ /dev/null
@@ -1,45 +0,0 @@
-# This is a generated gammurc file.
-# It was generated by Gammu configurator 0.4
-
-# In Unix/Linux  : copy it into your home directory and name it .gammurc
-#                  or into /etc and name it gammurc
-# In Win32       : copy it into directory with Gammu.exe and name gammurc
-
-# Port           : in Windows/DOS: "com*:",
-#                  (instead of "*" please put "1", "2", etc.)
-#                  in other (Linux/Unix) "/dev/ttyS%"
-#                                     or "/dev/ircomm%" ("irda" connection)
-#                  (instead of "%" please put "0", "1", "2", etc.)
-# Model          : use only, when Gammu doesn't recognize your phone model.
-#                  Put it here. Example values: "6110", "6150", "6210", "8210"
-# Connection     : type of connection. Use "fbus" or "mbus" or "dlr3" or
-#                  "irda" (Infrared over sockets) or "infrared" (DirectIR)
-#                  or "at19200" (AT commands on 19200, 8 bits, None parity,
-#                  1 stop bit, no flow control) or "at115200" (AT commands on
-#                  115200, 8 bits, None parity, 1 stop bit, no flow control)
-#                  or "atblue" (AT over BlueTooth) or "dlr3blue" (FBUS
-#                  over BlueTooth)
-# SynchronizeTime: if you want to set time from computer to phone during
-#                  starting connection. Do not rather use this option when want
-#                  to reset phone during connection (in some phones need to
-#                  set time again after restart)
-# Logfile        : Use, when want to have logfile from communication.
-# Logformat      : What debug info and format should be used:
-#                  "nothing" - no debug level, "text" - transmission dump in
-#                  text format, "textall" - all possible info in text format,
-#                  "errors"  - errors in text format, "binary" - transmission
-#                  dump in binary format
-# Use_Locking    : under Unix/Linux use "yes", if want to lock used device
-#                  to prevent using it by other applications
-# GammuLoc       : name of localisation file
-
-[gammu]
-
-port = /dev/ttyUSB0
-model = 
-connection = at115200
-synchronizetime = yes
-logfile = /var/tmp/gammusms.log
-logformat = errorsdate
-use_locking = yes
-gammuloc = 
diff --git a/files/nagios/nagios-init b/files/nagios/nagios-init
deleted file mode 100755
index bff0a74..0000000
--- a/files/nagios/nagios-init
+++ /dev/null
@@ -1,241 +0,0 @@
-#!/bin/sh
-# 
-# chkconfig: 345 99 01
-# description: Nagios network monitor
-#
-# File : nagios
-#
-# Author : Jorge Sanchez Aymar ([email protected])
-# 
-# Changelog :
-#
-# 1999-07-09 Karl DeBisschop <[email protected]>
-#  - setup for autoconf
-#  - add reload function
-# 1999-08-06 Ethan Galstad <[email protected]>
-#  - Added configuration info for use with RedHat's chkconfig tool
-#    per Fran Boon's suggestion
-# 1999-08-13 Jim Popovitch <[email protected]>
-#  - added variable for nagios/var directory
-#  - cd into nagios/var directory before creating tmp files on startup
-# 1999-08-16 Ethan Galstad <[email protected]>
-#  - Added test for rc.d directory as suggested by Karl DeBisschop
-# 2000-07-23 Karl DeBisschop <[email protected]>
-#  - Clean out redhat macros and other dependencies
-# 2003-01-11 Ethan Galstad <[email protected]>
-#  - Updated su syntax (Gary Miller)
-#
-# Description: Starts and stops the Nagios monitor
-#              used to provide network services status.
-#
-  
-status_nagios ()
-{
-
-       if test -x $NagiosCGI/daemonchk.cgi; then
-               if $NagiosCGI/daemonchk.cgi -l $NagiosRunFile; then
-                       return 0
-               else
-                       return 1
-               fi
-       else
-               if ps -p $NagiosPID > /dev/null 2>&1; then
-                       return 0
-               else
-                       return 1
-               fi
-       fi
-
-       return 1
-}
-
-
-printstatus_nagios()
-{
-
-       if status_nagios $1 $2; then
-               echo "nagios (pid $NagiosPID) is running..."
-       else
-               echo "nagios is not running"
-       fi
-}
-
-
-killproc_nagios ()
-{
-
-       kill $2 $NagiosPID
-
-}
-
-
-pid_nagios ()
-{
-
-       if test ! -f $NagiosRunFile; then
-               echo "No lock file found in $NagiosRunFile"
-               exit 1
-       fi
-
-       NagiosPID=`head -n 1 $NagiosRunFile`
-}
-
-
-# Source function library
-# Solaris doesn't have an rc.d directory, so do a test first
-if [ -f /etc/rc.d/init.d/functions ]; then
-       . /etc/rc.d/init.d/functions
-elif [ -f /etc/init.d/functions ]; then
-       . /etc/init.d/functions
-fi
-
-prefix=/usr/local/nagios
-exec_prefix=${prefix}
-NagiosBin=${exec_prefix}/bin/nagios
-NagiosCfgFile=${prefix}/etc/nagios.cfg
-NagiosStatusFile=${prefix}/var/status.dat
-NagiosRetentionFile=${prefix}/var/retention.dat
-NagiosCommandFile=${prefix}/var/rw/nagios.cmd
-NagiosVarDir=${prefix}/var
-NagiosRunFile=${prefix}/var/nagios.lock
-NagiosLockDir=/var/lock/subsys
-NagiosLockFile=nagios
-NagiosCGIDir=${exec_prefix}/sbin
-NagiosUser=nagios
-NagiosGroup=nagios
-NagiosPurge=/usr/local/sbin/purge-nagios-resources.py
-NagiosPurgeFiles="/etc/nagios/puppet_hosts.cfg 
/etc/nagios/puppet_hostgroups.cfg /etc/nagios/puppet_servicegroups.cfg 
/etc/nagios/puppet_services.cfg /etc/nagios/hosts.cfg 
/etc/nagios/puppet_checks.d/*"
-
-# Check that nagios exists.
-if [ ! -f $NagiosBin ]; then
-    echo "Executable file $NagiosBin not found.  Exiting."
-    exit 1
-fi
-
-# Check that nagios.cfg exists.
-if [ ! -f $NagiosCfgFile ]; then
-    echo "Configuration file $NagiosCfgFile not found.  Exiting."
-    exit 1
-fi
-          
-# See how we were called.
-case "$1" in
-
-       start)
-               echo -n "Starting nagios:"
-               $NagiosPurge $NagiosPurgeFiles
-               /usr/local/sbin/purge-nagios-resources.py 
/etc/nagios/puppet_hosts.cfg /etc/nagios/puppet_hostgroups.cfg 
/etc/nagios/puppet_servicegroups.cfg /etc/nagios/puppet_services.cfg 
/etc/nagios/hosts.cfg /etc/nagios/puppet_checks.d/*
-               /bin/chmod 444 /etc/nagios/puppet_checks.d/*
-               $NagiosBin -v $NagiosCfgFile > /dev/null 2>&1;
-               if [ $? -eq 0 ]; then
-                       su - $NagiosUser -c "touch $NagiosVarDir/nagios.log 
$NagiosRetentionFile"
-                       rm -f $NagiosCommandFile
-                       touch $NagiosRunFile
-                       chown $NagiosUser:$NagiosGroup $NagiosRunFile
-                       $NagiosBin -d $NagiosCfgFile
-                       if [ -d $NagiosLockDir ]; then touch 
$NagiosLockDir/$NagiosLockFile; fi
-                       echo " done."
-                       exit 0
-               else
-                       echo "CONFIG ERROR!  Start aborted.  Check your Nagios 
configuration."
-                       exit 1
-               fi
-               ;;
-
-       stop)
-               echo -n "Stopping nagios: "
-
-               pid_nagios
-               killproc_nagios nagios
-
-               # now we have to wait for nagios to exit and remove its
-               # own NagiosRunFile, otherwise a following "start" could
-               # happen, and then the exiting nagios will remove the
-               # new NagiosRunFile, allowing multiple nagios daemons
-               # to (sooner or later) run - John Sellens
-               #echo -n 'Waiting for nagios to exit .'
-               for i in 1 2 3 4 5 6 7 8 9 10 ; do
-                   if status_nagios > /dev/null; then
-                       echo -n '.'
-                       sleep 1
-                   else
-                       break
-                   fi
-               done
-               if status_nagios > /dev/null; then
-                   echo ''
-                   echo 'Warning - nagios did not exit in a timely manner'
-               else
-                   echo 'done.'
-               fi
-
-               rm -f $NagiosStatusFile $NagiosRunFile 
$NagiosLockDir/$NagiosLockFile $NagiosCommandFile
-               ;;
-
-       status)
-               pid_nagios
-               printstatus_nagios nagios
-               ;;
-
-       checkconfig)
-               printf "Running configuration check..."
-               $NagiosPurge $NagiosPurgeFiles
-               $NagiosBin -v $NagiosCfgFile > /dev/null 2>&1;
-               if [ $? -eq 0 ]; then
-                       echo " OK."
-               else
-                       echo " CONFIG ERROR!  Check your Nagios configuration."
-                       exit 1
-               fi
-               ;;
-
-       restart)
-               /bin/chmod 444 /etc/nagios/puppet_checks.d/*
-               printf "Running configuration check..."
-               $NagiosPurge $NagiosPurgeFiles
-               $NagiosBin -v $NagiosCfgFile > /dev/null 2>&1;
-               if [ $? -eq 0 ]; then
-                       echo "done."
-                       $0 stop
-                       $0 start
-               else
-                       echo " CONFIG ERROR!  Restart aborted.  Check your 
Nagios configuration."
-                       exit 1
-               fi
-               ;;
-
-       reload|force-reload)
-               printf "Purging decommissioned resources..."
-                $NagiosPurge $NagiosPurgeFiles
-               /bin/chmod 444 /etc/nagios/puppet_checks.d/*
-               printf "Running configuration check..."
-               $NagiosBin -v $NagiosCfgFile > /dev/null 2>&1;
-               if [ $? -eq 0 ]; then
-                       echo "done."
-                       if test ! -f $NagiosRunFile; then
-                               $0 start
-                       else
-                               pid_nagios
-                               if status_nagios > /dev/null; then
-                                       printf "Reloading nagios 
configuration..."
-                                       killproc_nagios nagios -HUP
-                                       echo "done"
-                               else
-                                       $0 stop
-                                       $0 start
-                               fi
-                       fi
-               else
-                       echo " CONFIG ERROR!  Reload aborted.  Check your 
Nagios configuration."
-                       exit 1
-               fi
-               ;;
-
-       *)
-               echo "Usage: nagios 
{start|stop|restart|reload|force-reload|status|checkconfig}"
-               exit 1
-               ;;
-
-esac
-  
-# End of this script
diff --git a/files/nagios/nrpe_udp2log.cfg b/files/nagios/nrpe_udp2log.cfg
deleted file mode 100644
index 1182900..0000000
--- a/files/nagios/nrpe_udp2log.cfg
+++ /dev/null
@@ -1,2 +0,0 @@
-command[check_udp2log_log]=/usr/lib/nagios/plugins/check_udp2log_log_age
-command[check_udp2log_procs]=/usr/lib/nagios/plugins/check_udp2log_procs
diff --git a/manifests/misc/udp2log.pp b/manifests/misc/udp2log.pp
index 73a154d..34521c4 100644
--- a/manifests/misc/udp2log.pp
+++ b/manifests/misc/udp2log.pp
@@ -300,7 +300,7 @@
                mode   => 0555,
                owner  => root,
                group  => root,
-               source => "puppet:///files/nagios/check_udp2log_log_age",
+               source => "puppet:///files/icinga/check_udp2log_log_age",
        }       
 
        file { "check_udp2log_procs":
@@ -308,7 +308,7 @@
                mode   => 0555,
                owner  => root,
                group  => root,
-               source => "puppet:///files/nagios/check_udp2log_procs",
+               source => "puppet:///files/icinga/check_udp2log_procs",
        }
 
        file { "PacketLossLogtailer.py":

-- 
To view, visit https://gerrit.wikimedia.org/r/55795
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifee709cbe19f1296b5e11c0d33a75caa2203bb44
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Lcarr <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to