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%
Monitoring Wizard - Configuration verification failed
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Monitoring Wizard - Configuration verification failed
We can see there is an error.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
What is the output of this command on your ubuntu system:
Code: Select all
head /usr/local/nagios/libexec/check_cpu_stats.shAs of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Monitoring Wizard - Configuration verification failed
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:~#
#!/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:~#
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Monitoring Wizard - Configuration verification failed
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.
#!/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.
Re: Monitoring Wizard - Configuration verification failed
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:~#
--------------------------------------------------
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
All right! I will be locking this topic.Great, this seems to work now.
I already let our developers know, and they are updating the plugin. The issue should be fixed shortly.Question, shouldn't the ubuntu agent have this set be default, especially since we selected the ubuntu dist during the installation process?
Be sure to check out our Knowledgebase for helpful articles and solutions!