Monitoring Wizard - Configuration verification failed

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
gbnag
Posts: 26
Joined: Thu Jan 21, 2016 7:58 pm

Re: Monitoring Wizard - Configuration verification failed

Post 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%
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Monitoring Wizard - Configuration verification failed

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
gbnag
Posts: 26
Joined: Thu Jan 21, 2016 7:58 pm

Re: Monitoring Wizard - Configuration verification failed

Post 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:~#
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Monitoring Wizard - Configuration verification failed

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
gbnag
Posts: 26
Joined: Thu Jan 21, 2016 7:58 pm

Re: Monitoring Wizard - Configuration verification failed

Post 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:~#

--------------------------------------------------
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Monitoring Wizard - Configuration verification failed

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked