Nahios & Barracuda backup

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Emmermacher
Posts: 9
Joined: Thu May 15, 2014 11:43 pm

Re: Nahios & Barracuda backup

Post by Emmermacher »

Hello tmcdonald.

Here is the starting script:

Code: Select all

#! /bin/sh
# Copyright (c) 1995-2001 SuSE GmbH Nuernberg, Germany.
#                    2002 SuSE Linux AG Nuernberg, Germany.
#                    2007 SuSE Linux GmbH Nuernberg, Germany.
#                    2010-2012 SUSE LINUX Products GmbH, Nuernberg, Germany
#
# Author: Wolfgang Rosenauer, Lars Vogdt
# 
#
# /etc/init.d/nagios
#
#   and symbolic its link
#
# /usr/sbin/rcnagios
#
# System startup script for nagios
#
### BEGIN INIT INFO
# Provides: 	  nagios monitoring_daemon
# Required-Start: $local_fs $remote_fs $syslog $network 
# Required-Stop:  $local_fs $remote_fs $syslog $network
# Should-Start:   $time sendmail httpd2 xntpd $named cron ndo2db
# Should-Stop:    sendmail ndo2db
# Default-Start:  3 5
# Default-Stop:   0 1 2 6
# Short-Description: Network monitor Nagios
# Description:    Starts and stops the Nagios monitor
#	used to provide network services status for hosts,
#	services and networks.
### END INIT INFO

. /etc/rc.status

NAGIOS_BIN='/usr/sbin/nagios'
NAGIOS_CFG='/etc/nagios/nagios.cfg'
NAGIOS_PIDFILE='/var/run/nagios/nagios.pid'
NAGIOS_SYSCONFIG='/etc/sysconfig/nagios'
NAGIOS_CFG_ERR_LOG='/var/log/nagios/config.err'
NAGIOS_DAEMONCHK='/usr/lib/nagios/cgi/daemonchk.cgi'

# Read config and log errors in logfile
function config_check () {
    case "$1" in
        verbose)
            $NAGIOS_BIN -v "$NAGIOS_CFG" >"$NAGIOS_CFG_ERR_LOG" 2>&1
            if [ $? -eq 0 ]; then
                return 0
            else
                return 1
            fi
        ;;
        *)   
            $NAGIOS_BIN -v "$NAGIOS_CFG" >/dev/null 2>&1
            if [ $? -eq 0 ]; then
                return 0
            else
                $NAGIOS_BIN -v "$NAGIOS_CFG" >"$NAGIOS_CFG_ERR_LOG" 2>&1
                return 1
            fi
        ;;
    esac
}

# grab a config option 
function get_var() {
	if [ -n "$2" ]; then
		set -- `grep ^$1 $2 | sed 's@=@ @' | tr -d '[:cntrl:]'`
	else
		set -- `grep ^$1 "$NAGIOS_CFG" | sed 's@=@ @' | tr -d '[:cntrl:]'`
	fi
	shift # remove first ARG => search-string
	echo $*
}

# check some default files and directories
function check_files() {
    # remove some perhaps left over files 	
    for file in "$command_file" "$lock_file" "$status_file" "$temp_file" "/var/lock/subsys/nagios"; do
        test -f "$file" && rm -f "$file"
    done
    # set default access rights for files and directories
    for file in "$log_file" "$state_retention_file" "$status_file"; do
	  if [ ! -e "$file" ]; then
	        touch "$file"
	  fi
      chown $nagios_user:$nagios_cmdgrp "$file"
    done
	for dir in "$check_result_path" $(dirname $status_file); do
      if [ ! -d "$dir" ]; then
          mkdir -p "$dir"
      fi
      chown $nagios_user:$nagios_cmdgrp "$dir"
    done
    chmod 660 "$resource_file"
    chown $nagios_user:$nagios_cmdgrp "$resource_file"
}

function check_lock_file() {
	PIDDIR=$(dirname $lock_file)
	case "$PIDDIR" in
		/var/run)
			if [ x"$nagios_user" != x"root" ]; then
				DATESTRING=`date +"%Y%m%d"`
				mv -f "$NAGIOS_CFG" "$NAGIOS_CFG-$DATESTRING"
				sed -e "s|^lock_file.*|pid_file=$NAGIOS_PIDFILE|g" "$NAGIOS_CFG-$DATESTRING" > "$NAGIOS_CFG"
				/bin/logger -t rcnagios "Configured $lock_file in $NAGIOS_CFG moved to $NAGIOS_PIDFILE. Backup is $NAGIOS_CFG-$DATESTRING"
				test -f "$lock_file" && rm -f "$lock_file"
				install -d -m755 -o$nagios_user -g$nagios_cmdgrp $(dirname "$NAGIOS_PIDFILE")
			else
				test -d "$PIDDIR" || mkdir -p "$PIDDIR"
			fi
		;;
		*)
			install -d -m755 -o$nagios_user -g$nagios_cmdgrp $(dirname "$NAGIOS_PIDFILE")
	esac
}

# Check for missing binaries (stale symlinks should not happen)
# Note: Special treatment of stop for LSB conformance
test -x "$NAGIOS_BIN" || { echo "$NAGIOS_BIN not installed or not executable.";
    if [ "$1" = "stop" ]; then exit 0;
    else exit 5; fi; }

# Check for existence of needed config file
test -r "$NAGIOS_CFG" || { echo "$NAGIOS_CFG not existing or readable.";
    if [ "$1" = "stop" ]; then exit 0;
    else exit 6; fi; }

# Check for existence of sysconfig file and read it
test -r "$NAGIOS_SYSCONFIG" || { echo "$NAGIOS_SYSCONFIG not existing or readable.";
	if [ "$1" = "stop" ]; then exit 0;
	else exit 6; fi; }

. "$NAGIOS_SYSCONFIG"

# set values for sysconfig vars
if [ -n "$NAGIOS_NICELEVEL" ]; then
	NICELEVEL="-n $NAGIOS_NICELEVEL"
else
	NICELEVEL="-n 0"
fi
if [ -z "$NAGIOS_TIMEOUT" ]; then
	NAGIOS_TIMEOUT=10
fi

#
# get variables from config file
#
nagios_user="$(get_var nagios_user)"
lock_file="$(get_var lock_file)"
status_file="$(get_var status_file)"
log_file="$(get_var log_file)"
temp_file="$(get_var temp_file)"
state_retention_file="$(get_var state_retention_file)"
command_file="$(get_var command_file)"
resource_file="$(get_var resource_file)"
object_cache_file="$(get_var object_cache_file)"
check_result_path="$(get_var check_result_path)"
check_external_commands="$(get_var check_external_commands)"

#
# use default values if above check doesn't work
#
: ${nagios_user:=nagios}
: ${nagios_cmdgrp:=nagcmd}
: ${resource_file:=/etc/nagios/resource.cfg}
# check ownership files
: ${check_result_path:=/var/spool/nagios}
: ${log_file:=/var/log/nagios/nagios.log}
: ${state_retention_file:=/var/log/nagios/retention.dat}
: ${status_file:=/var/log/nagios/status.dat}
: ${check_external_commands:=0}
# files to remove
: ${command_file:=/var/spool/nagios/nagios.cmd}
: ${lock_file:=/var/run/nagios/nagios.pid}
: ${object_cache_file:=/var/lib/nagios/objects.cache}
: ${temp_file:=/var/log/nagios/nagios.tmp}

# Reset status of this service
rc_reset

case "$1" in
    start)
        echo -n "Starting Nagios "
        config_check
        if [ $? -eq 0 ]; then
            # check if nagios is already running
            NAGPID=$(pidof "$NAGIOS_BIN")
            if [ -n "$NAGPID" ]; then
                echo "- Error: looks like Nagios is still running with PID $NAGPID"
                echo -n "- trying to kill previous Nagios process"
                kill -9 $NAGPID
                sleep 2
            fi	
            check_files
            check_lock_file
            startproc $NICELEVEL -p "$lock_file" "$NAGIOS_BIN" -d "$NAGIOS_CFG"
            if [ "$check_external_commands" != 0 ]; then
                while [ ! -e "$command_file" ] && [ $NAGIOS_TIMEOUT -gt 0 ]; do
			sleep 1
			NAGIOS_TIMEOUT=$[$NAGIOS_TIMEOUT-1]
		done
                chgrp $nagios_cmdgrp "$command_file"
                chown $nagios_user:$nagios_cmdgrp "$check_result_path"
            fi
        else
            echo "Error in configuration - please read $NAGIOS_CFG_ERR_LOG"
            rc_failed
        fi
        rc_status -v
    ;;
    stop)
        echo -n "Shutting down Nagios "
        # we have to wait for nagios to exit and remove its
        # own Lockfile, otherwise a following "start" could
        # happen, and then the exiting nagios will remove the
        # new Lockfile, allowing multiple nagios daemons
        # to (sooner or later) run - John Sellens

        if checkproc "$NAGIOS_BIN" ; then
            killproc -p "$lock_file" -TERM "$NAGIOS_BIN"
            sleep 1
            if [ -e "$lock_file" ]; then
                echo "Warning - Nagios did not exit in a timely manner. Waiting..."
                while [ -e "$lock_file" ] && [ $NAGIOS_TIMEOUT -gt 0 ] ; do
                    sleep 1
                    NAGIOS_TIMEOUT=$[$NAGIOS_TIMEOUT-1]
                    echo -n '.'
                    [ $NAGIOS_TIMEOUT -eq 41 ] && echo
                done
            fi
            if checkproc "$NAGIOS_BIN" ; then
                killproc -p "$lock_file" -SIGKILL "$NAGIOS_BIN"
                echo -n "Warning: Nagios killed"
            fi
        else
            echo -n "Nagios not running"
            rc_failed 7
        fi
        check_files
		rc_reset
        rc_status -v
    ;;
    try-restart)
        ## Do a restart only if the service was active before.
        $0 status
        if test $? = 0; then
            $0 restart
        else
            rc_reset        # Not running is not a failure.
        fi
        rc_status
    ;;
    restart)
        $0 check
        $0 stop
        $0 start
        rc_status
    ;;
    reload|force-reload)
        echo -n "Reload service Nagios "
        config_check
        if [ $? -eq 0 ]; then
          echo -n "Passed configuration check - reloading..."
          killproc -HUP -p "$lock_file" "$NAGIOS_BIN"
        else
          echo "- Error in configuration files"
          echo -n "- aborting reload - please read $NAGIOS_CFG_ERR_LOG"
          rc_failed
        fi
        rc_status -v
    ;;
    status)
        echo -n "Checking for Nagios: "
        if [ -x "$NAGIOS_DAEMONCHK" ]; then
            if "$NAGIOS_DAEMONCHK" -l "$lock_file"; then
                rc_failed 0
            else
                rc_failed 1
            fi
        else
            checkproc -p "$lock_file" "$NAGIOS_BIN"
        fi
        rc_status -v
    ;;
    check)
        echo -n "Starting configuration check "
        config_check
        if [ $? -eq 0 ]; then
            echo "- passed configuration check"
            test -f $NAGIOS_CFG_ERR_LOG && rm $NAGIOS_CFG_ERR_LOG
            rc_reset
        else
            echo "- detected Error in configuration files"
            echo "Please read $NAGIOS_CFG_ERR_LOG"
            rc_failed
        fi
        rc_status -v
    ;;
    check_verbose)
        echo "Running verbose configuration check..."
        config_check verbose
        exitcode=$?
        cat "$NAGIOS_CFG_ERR_LOG"
        rc_failed $exitcode
        rc_status -v
        rc_exit
    ;;
    *)
        echo "Usage: $0 {start|stop|status|try-restart|restart|reload|check|check_verbose}"
        exit 1
        ;;
esac
rc_exit
Regards

Dirk

Mod Edit - Please use code tags when posting code, as I have done to your post
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Nahios & Barracuda backup

Post by tmcdonald »

Can you try adding the debug switch to that first line?

Code: Select all

#! /bin/sh -x
and then running through the process as normal? I want to see the debugging output, maybe see what function is calling the Barracuda script.
Former Nagios employee
Emmermacher
Posts: 9
Joined: Thu May 15, 2014 11:43 pm

Re: Nahios & Barracuda backup

Post by Emmermacher »

Hello tmcdonald.

Here is the output:

Code: Select all

++ test 80 -eq 0
++ export LINES COLUMNS
++ case ":$PATH:" in
++ test -t 1 -a xterm '!=' raw -a xterm '!=' dumb
++ stty size
+++ echo -en '\033'
++ esc=$'\E'
++ extd=''
++ warn=''
++ done=''
++ attn=''
+++ echo -en '\017'
++ norm=''
+++ echo -en '\015                                                   '
++ stat='                                                            '
++ rc_done='                                                         done'
++ rc_running='                                                      running'
++ rc_failed='                                                       failed'
++ rc_missed='                                                       missing'
++ rc_skipped='                                                      skipped'
++ rc_dead='                                                         dead'
++ rc_unused='                                                       unused'
++ rc_unknown='                                                      failed''
++ rc_reset=''p='
++ rc_save=''
++ rc_restor'='
++ _rc_service=/etc/init.d/nagios
++ _rc_status=0
++ _rc_status_all=0
++ _rc_todo=start
++ test start = status
++ test -n start
++ cmdline=
+ NAGIOS_BIN=/usr/sbin/nagios
+ NAGIOS_CFG=/etc/nagios/nagios.cfg
+ NAGIOS_PIDFILE=/var/run/nagios/nagios.pid
+ NAGIOS_SYSCONFIG=/etc/sysconfig/nagios
+ NAGIOS_CFG_ERR_LOG=/var/log/nagios/config.err
+ NAGIOS_DAEMONCHK=/usr/lib/nagios/cgi/daemonchk.cgi
+ test -x /usr/sbin/nagios
+ test -r /etc/nagios/nagios.cfg
+ test -r /etc/sysconfig/nagios
+ . /etc/sysconfig/nagios
++ NAGIOS_TIMEOUT=10
++ NAGIOS_NICELEVEL=0
++ NAGIOS_COMPRESS_LOGFILES=true
+ '[' -n 0 ']'
+ NICELEVEL='-n 0'
+ '[' -z 10 ']'
++ get_var nagios_user
++ '[' -n '' ']'
+++ grep '^nagios_user' /etc/nagios/nagios.cfg
+++ sed 's@=@ @'
+++ tr -d '[:cntrl:]'
++ set -- nagios_user nagios
++ shift
++ echo nagios
+ nagios_user=nagios
++ get_var lock_file
++ '[' -n '' ']'
+++ grep '^lock_file' /etc/nagios/nagios.cfg
+++ tr -d '[:cntrl:]'
+++ sed 's@=@ @'
++ set -- lock_file /var/run/nagios/nagios.pid
++ shift
++ echo /var/run/nagios/nagios.pid
+ lock_file=/var/run/nagios/nagios.pid
++ get_var status_file
++ '[' -n '' ']'
+++ grep '^status_file' /etc/nagios/nagios.cfg
+++ tr -d '[:cntrl:]'
+++ sed 's@=@ @'
++ set -- status_file /var/lib/nagios/status.dat
++ shift
++ echo /var/lib/nagios/status.dat
+ status_file=/var/lib/nagios/status.dat
++ get_var log_file
++ '[' -n '' ']'
+++ grep '^log_file' /etc/nagios/nagios.cfg
+++ sed 's@=@ @'
+++ tr -d '[:cntrl:]'
++ set -- log_file /var/log/nagios/nagios.log
++ shift
++ echo /var/log/nagios/nagios.log
+ log_file=/var/log/nagios/nagios.log
++ get_var temp_file
++ '[' -n '' ']'
+++ grep '^temp_file' /etc/nagios/nagios.cfg
+++ sed 's@=@ @'
+++ tr -d '[:cntrl:]'
++ set -- temp_file /var/lib/nagios/nagios.tmp
++ shift
++ echo /var/lib/nagios/nagios.tmp
+ temp_file=/var/lib/nagios/nagios.tmp
++ get_var state_retention_file
++ '[' -n '' ']'
+++ grep '^state_retention_file' /etc/nagios/nagios.cfg
+++ sed 's@=@ @'
+++ tr -d '[:cntrl:]'
++ set -- state_retention_file /var/lib/nagios/retention.dat
++ shift
++ echo /var/lib/nagios/retention.dat
+ state_retention_file=/var/lib/nagios/retention.dat
++ get_var command_file
++ '[' -n '' ']'
+++ grep '^command_file' /etc/nagios/nagios.cfg
+++ sed 's@=@ @'
+++ tr -d '[:cntrl:]'
++ set -- command_file /var/spool/nagios/nagios.cmd
++ shift
++ echo /var/spool/nagios/nagios.cmd
+ command_file=/var/spool/nagios/nagios.cmd
++ get_var resource_file
++ '[' -n '' ']'
+++ grep '^resource_file' /etc/nagios/nagios.cfg
+++ tr -d '[:cntrl:]'
+++ sed 's@=@ @'
++ set -- resource_file /etc/nagios/resource.cfg
++ shift
++ echo /etc/nagios/resource.cfg
+ resource_file=/etc/nagios/resource.cfg
++ get_var object_cache_file
++ '[' -n '' ']'
+++ grep '^object_cache_file' /etc/nagios/nagios.cfg
+++ sed 's@=@ @'
+++ tr -d '[:cntrl:]'
++ set -- object_cache_file /var/lib/nagios/objects.cache
++ shift
++ echo /var/lib/nagios/objects.cache
+ object_cache_file=/var/lib/nagios/objects.cache
++ get_var check_result_path
++ '[' -n '' ']'
+++ grep '^check_result_path' /etc/nagios/nagios.cfg
+++ sed 's@=@ @'
+++ tr -d '[:cntrl:]'
++ set -- check_result_path /var/spool/nagios
++ shift
++ echo /var/spool/nagios
+ check_result_path=/var/spool/nagios
++ get_var check_external_commands
++ '[' -n '' ']'
+++ grep '^check_external_commands' /etc/nagios/nagios.cfg
+++ sed 's@=@ @'
+++ tr -d '[:cntrl:]'
++ set -- check_external_commands 1
++ shift
++ echo 1
+ check_external_commands=1
+ : nagios
+ : nagcmd
+ : /etc/nagios/resource.cfg
+ : /var/spool/nagios
+ : /var/log/nagios/nagios.log
+ : /var/lib/nagios/retention.dat
+ : /var/lib/nagios/status.dat
+ : 1
+ : /var/spool/nagios/nagios.cmd
+ : /var/run/nagios/nagios.pid
+ : /var/lib/nagios/objects.cache
+ : /var/lib/nagios/nagios.tmp
+ rc_reset
+ _rc_status=0
+ _rc_status_all=0
+ rc_check
+ _rc_status_ret=0
+ test 0 -eq 0
+ test 0 -eq 0
+ return 0
+ return 0
+ case "$1" in
+ echo -n 'Starting Nagios '
Starting Nagios + config_check
+ case "$1" in
+ /usr/sbin/nagios -v /etc/nagios/nagios.cfg
+ '[' 0 -eq 0 ']'
+ return 0
+ '[' 0 -eq 0 ']'
++ pidof /usr/sbin/nagios
+ NAGPID=
+ '[' -n '' ']'
+ check_files
+ for file in '"$command_file"' '"$lock_file"' '"$status_file"' '"$temp_file"' '"/var/lock/subsys/nagios"'
+ test -f /var/spool/nagios/nagios.cmd
+ for file in '"$command_file"' '"$lock_file"' '"$status_file"' '"$temp_file"' '"/var/lock/subsys/nagios"'
+ test -f /var/run/nagios/nagios.pid
+ for file in '"$command_file"' '"$lock_file"' '"$status_file"' '"$temp_file"' '"/var/lock/subsys/nagios"'
+ test -f /var/lib/nagios/status.dat
+ rm -f /var/lib/nagios/status.dat
+ for file in '"$command_file"' '"$lock_file"' '"$status_file"' '"$temp_file"' '"/var/lock/subsys/nagios"'
+ test -f /var/lib/nagios/nagios.tmp
+ for file in '"$command_file"' '"$lock_file"' '"$status_file"' '"$temp_file"' '"/var/lock/subsys/nagios"'
+ test -f /var/lock/subsys/nagios
+ for file in '"$log_file"' '"$state_retention_file"' '"$status_file"'
+ '[' '!' -e /var/log/nagios/nagios.log ']'
+ chown nagios:nagcmd /var/log/nagios/nagios.log
+ for file in '"$log_file"' '"$state_retention_file"' '"$status_file"'
+ '[' '!' -e /var/lib/nagios/retention.dat ']'
+ chown nagios:nagcmd /var/lib/nagios/retention.dat
+ for file in '"$log_file"' '"$state_retention_file"' '"$status_file"'
+ '[' '!' -e /var/lib/nagios/status.dat ']'
+ touch /var/lib/nagios/status.dat
+ chown nagios:nagcmd /var/lib/nagios/status.dat
++ dirname /var/lib/nagios/status.dat
+ for dir in '"$check_result_path"' '$(dirname $status_file)'
+ '[' '!' -d /var/spool/nagios ']'
+ chown nagios:nagcmd /var/spool/nagios
+ for dir in '"$check_result_path"' '$(dirname $status_file)'
+ '[' '!' -d /var/lib/nagios ']'
+ chown nagios:nagcmd /var/lib/nagios
+ chmod 660 /etc/nagios/resource.cfg
+ chown nagios:nagcmd /etc/nagios/resource.cfg
+ check_lock_file
++ dirname /var/run/nagios/nagios.pid
+ PIDDIR=/var/run/nagios
+ case "$PIDDIR" in
++ dirname /var/run/nagios/nagios.pid
+ install -d -m755 -onagios -gnagcmd /var/run/nagios
Found product installed at /usr/local/barracuda/bbs/
Would you like to [r]einstall or [u]ninstall?
Regards

Dirk
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Nahios & Barracuda backup

Post by sreinhardt »

So you are getting hung up on the install command at line 108. Try commenting that out and running a restart again. I'm not really sure why it's using install to set the pid file instead of allowing nagios to set this itself. Comparing with our standard init files, it seems that this one is pretty heavily modified.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Emmermacher
Posts: 9
Joined: Thu May 15, 2014 11:43 pm

Re: Nahios & Barracuda backup

Post by Emmermacher »

Hello sreinhard.
Thanks for your answer.
I commented line 108. No changes.
I looked at "install". I found this command in line 114. I commend this line too. Now it works.

I never modified the script. So its not possible for me to say, how this lines are in /etc/init.d/nagios ...

Regards.

Dirk
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Nahios & Barracuda backup

Post by slansing »

Well, I don't believe that was standard. How was Nagios installed on this SLES system?
Emmermacher
Posts: 9
Joined: Thu May 15, 2014 11:43 pm

Re: Nahios & Barracuda backup

Post by Emmermacher »

Hello slansing.

The installationfiles are from novell monitoring. I tested nagios 3.5.1 on sles11 first. This don't work on this machine. Then I installed icinga. This also don't work. I uninstalled all and made a fresh nagios installation.
I wondered about the changed path on sles 11. I ran nagios on sles 10 before. I moved the the config files from my old server to the new machine. After modyfing the config files, nagios work witout any problems.
The courious phenomen comes with the barracuda agent.

The nagios paths:
myserver:/ # find . -name nagios
./usr/sbin/nagios
./usr/share/doc/packages/nagios
./usr/share/nagios
./usr/lib/nagios
./usr/lib/ruby/vendor_ruby/1.8/puppet/external/nagios
./etc/cron.weekly/nagios
./etc/init.d/nagios
./etc/nagios
./etc/sysconfig/nagios
./var/spool/nagios
./var/spool/mail/nagios
./var/lib/nagios
./var/run/nagios
./var/log/nagios
./home/nagios

From my tests with icinga are some folders on the system:
myserver:/ # find . -name icinga
./usr/share/icinga
./etc/icinga
./etc/sysconfig/icinga
./var/spool/icinga
./var/run/icinga
./var/log/icinga

There are no icinga processes running on the machine.

Regards.

Dirk
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Nahios & Barracuda backup

Post by sreinhardt »

I would highly suggest against running both monitoring solutions on one system. It is entirely possible, depending on how it was packaged that some files may conflict. Otherwise, this both sounds like it is working now, and if you wish for a more permanent resolve like you should submit a bug to the SLES maintainers as they have made many if not all of these changes. May we lock this topic, as it seems you are all set?
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Locked