Page 3 of 3

Re: Monitoring Wizard - Configuration verification failed

Posted: Thu Sep 08, 2016 2:16 pm
by gbnag
on the ubuntu system:

root@gberger-ubuntu:/usr/local/nagios/libexec# /usr/local/nagios/libexec/check_cpu_stats.sh -w 85 -c 95
/usr/local/nagios/libexec/check_cpu_stats.sh: 140: /usr/local/nagios/libexec/check_cpu_stats.sh: Syntax error: redirection unexpected

on a RHEL6 system:
[root@ehealth-linux ~]# /usr/local/nagios/libexec/check_cpu_stats.sh -w 85 -c 95
CPU STATISTICS OK: user=2.61% system=10.02% iowait=0.00% idle=87.37% | user=2.61% system=10.02% iowait=0.0%;85;95 idle=87.37%

Re: Monitoring Wizard - Configuration verification failed

Posted: Thu Sep 08, 2016 2:28 pm
by Box293
gbnag wrote:on the ubuntu system:

root@gberger-ubuntu:/usr/local/nagios/libexec# /usr/local/nagios/libexec/check_cpu_stats.sh -w 85 -c 95
/usr/local/nagios/libexec/check_cpu_stats.sh: 140: /usr/local/nagios/libexec/check_cpu_stats.sh: Syntax error: redirection unexpected
We can see there is an error.

What is the output of this command on your ubuntu system:

Code: Select all

head /usr/local/nagios/libexec/check_cpu_stats.sh

Re: Monitoring Wizard - Configuration verification failed

Posted: Thu Sep 08, 2016 6:46 pm
by gbnag
root@gberger-ubuntu:~# head /usr/local/nagios/libexec/check_cpu_stats.sh
#!/bin/sh
# ========================================================================================
# CPU Utilization Statistics plugin for Nagios
#
# Written by : Steve Bosek ([email protected])
# Release : 1.3
# Creation date : 8 September 2007
# Revision date : 18 October 2007
# Package : DTB Nagios Plugin
# Description : Nagios plugin (script) to check cpu utilization statistics.
root@gberger-ubuntu:~#

Re: Monitoring Wizard - Configuration verification failed

Posted: Fri Sep 09, 2016 9:25 am
by Box293
Change the first line from:
#!/bin/sh
To:
#!/bin/bash

Then try running the plugin from the command line again it should fix the problem.

Re: Monitoring Wizard - Configuration verification failed

Posted: Fri Sep 09, 2016 4:17 pm
by gbnag
Great, this seems to work now.

Question, shouldn't the ubuntu agent have this set be default, especially since we selected the ubuntu dist during the installation process?


We did not have an issue witth the RHEL6 and CentOS systems.


------------------------------------------------

root@gberger-ubuntu:~# head /usr/local/nagios/libexec/check_cpu_stats.sh
#!/bin/bash
# ========================================================================================
# CPU Utilization Statistics plugin for Nagios
#
# Written by : Steve Bosek ([email protected])
# Release : 1.3
# Creation date : 8 September 2007
# Revision date : 18 October 2007
# Package : DTB Nagios Plugin
# Description : Nagios plugin (script) to check cpu utilization statistics.
root@gberger-ubuntu:~# :/usr/local/nagios/libexec# /usr/local/nagios/libexec/check_cpu_stats.sh -w 85 -c 95
-su: :/usr/local/nagios/libexec#: No such file or directory
root@gberger-ubuntu:~# head /usr/local/nagios/libexec/check_cpu_stats.sh
#!/bin/bash
# ========================================================================================
# CPU Utilization Statistics plugin for Nagios
#
# Written by : Steve Bosek ([email protected])
# Release : 1.3
# Creation date : 8 September 2007
# Revision date : 18 October 2007
# Package : DTB Nagios Plugin
# Description : Nagios plugin (script) to check cpu utilization statistics.
root@gberger-ubuntu:~# /usr/local/nagios/libexec/check_cpu_stats.sh -w 85 -c 95
CPU STATISTICS OK: user=0.20% system=0.00% iowait=0.80% idle=99.00% | user=0.0% system=0.0% iowait=0.0%;85;95 idle=99.00%
root@gberger-ubuntu:~#

--------------------------------------------------

Re: Monitoring Wizard - Configuration verification failed

Posted: Mon Sep 12, 2016 12:20 pm
by lmiltchev
Great, this seems to work now.
All right! I will be locking this topic.
Question, shouldn't the ubuntu agent have this set be default, especially since we selected the ubuntu dist during the installation process?
I already let our developers know, and they are updating the plugin. The issue should be fixed shortly.