<div dir="ltr"><div id="yiv1477858288"><div id="yui_3_7_2_1_1363714170665_2396"><br></div><div id="yui_3_7_2_1_1363714170665_2396" style>Hi Guys,</div><div id="yui_3_7_2_1_1363714170665_2396" style><br></div><div id="yui_3_7_2_1_1363714170665_2396" style>
As per your suggestion i had checked miscommand.cfg and command.cfg file.I am attaching miscommand.cfg file content , Please look over it and suggest me.</div><div id="yui_3_7_2_1_1363714170665_2396" style><br></div><div id="yui_3_7_2_1_1363714170665_2396" style>
<br></div><div id="yui_3_7_2_1_1363714170665_2396"><div id="yiv1477858288"><div id="yui_3_7_2_1_1363714170665_2396">The message says "duplicate definition found".<br>
    I guess the definition exists in miscommand.cfg (or some other *.cfg
    file) apart from commands.cfg.<br>
    I wonder how this version was installed because I haven't seem this
    file layout until now.<br>
  </div></div></div><div id="yui_3_7_2_1_1363714170665_2396"><br></div><div id="yui_3_7_2_1_1363714170665_2396"><div id="yui_3_7_2_1_1363714170665_2396">define command {</div><div id="yui_3_7_2_1_1363714170665_2396">                command_name                          service_is_stale</div>
<div id="yui_3_7_2_1_1363714170665_2396">                command_line                          /usr/lib/nagios/plugins/eventhandlers/stale_service.sh</div><div id="yui_3_7_2_1_1363714170665_2396">}</div><div id="yui_3_7_2_1_1363714170665_2396">
<br></div><div id="yui_3_7_2_1_1363714170665_2396">#define command {</div><div id="yui_3_7_2_1_1363714170665_2396"> #               command_name                          notify-host-by-email</div><div id="yui_3_7_2_1_1363714170665_2396">
 #               command_line                          /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$ -- -f <a href="mailto:noc@evergent.com">noc@evergent.com</a></div>
<div id="yui_3_7_2_1_1363714170665_2396">#}</div><div id="yui_3_7_2_1_1363714170665_2396"><br></div><div id="yui_3_7_2_1_1363714170665_2396">#define command {</div><div id="yui_3_7_2_1_1363714170665_2396"> #               command_name                          notify-service-by-email</div>
<div id="yui_3_7_2_1_1363714170665_2396"> #               command_line                          /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$\n" | /bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$ -- -f <a href="mailto:noc@evergent.com">noc@evergent.com</a></div>
<div id="yui_3_7_2_1_1363714170665_2396">#}</div><div id="yui_3_7_2_1_1363714170665_2396"><br></div><div id="yui_3_7_2_1_1363714170665_2396">#define command {</div><div id="yui_3_7_2_1_1363714170665_2396"> #               command_name                          process-host-perfdata</div>
<div id="yui_3_7_2_1_1363714170665_2396"> #               command_line                          /usr/bin/printf "%b" "$LASTHOSTCHECK$\t$HOSTNAME$\t$HOSTSTATE$\t$HOSTATTEMPT$\t$HOSTSTATETYPE$\t$HOSTEXECUTIONTIME$\t$HOSTOUTPUT$\t$HOSTPERFDATA$\n" >> /usr/local/nagios/var/host-perfdata.out</div>
<div id="yui_3_7_2_1_1363714170665_2396">#}</div><div id="yui_3_7_2_1_1363714170665_2396"><br></div><div id="yui_3_7_2_1_1363714170665_2396">#define command {</div><div id="yui_3_7_2_1_1363714170665_2396">#                command_name                          process-service-perfdata</div>
<div id="yui_3_7_2_1_1363714170665_2396">#                command_line                          /usr/bin/printf "%b" "$LASTSERVICECHECK$\t$HOSTNAME$\t$SERVICEDESC$\t$SERVICESTATE$\t$SERVICEATTEMPT$\t$SERVICESTATETYPE$\t$SERVICEEXECUTIONTIME$\t$SERVICELATENCY$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$\n" >> /usr/local/nagios/var/service-perfdata.out</div>
<div id="yui_3_7_2_1_1363714170665_2396">#}</div><div id="yui_3_7_2_1_1363714170665_2396"><br></div><div id="yui_3_7_2_1_1363714170665_2396">#define command {</div><div id="yui_3_7_2_1_1363714170665_2396">#                command_name                          check-host-alive</div>
<div id="yui_3_7_2_1_1363714170665_2396">#                command_line                          /usr/lib/nagios/plugins/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5</div><div id="yui_3_7_2_1_1363714170665_2396">
#}</div><div id="yui_3_7_2_1_1363714170665_2396"><br></div><div id="yui_3_7_2_1_1363714170665_2396">define command {</div><div id="yui_3_7_2_1_1363714170665_2396">                command_name                          check_nrpe</div>
<div id="yui_3_7_2_1_1363714170665_2396">                command_line                          /usr/lib/nagios/plugins/check_tcp -H $HOSTADDRESS$ -p 5666</div><div id="yui_3_7_2_1_1363714170665_2396">}</div><div id="yui_3_7_2_1_1363714170665_2396">
<br></div></div><div id="yui_3_7_2_1_1363714170665_2396"><br></div><div id="yui_3_7_2_1_1363714170665_2396"><br>
  </div></div><br><div class="gmail_quote"><br><br>
 Hi Guys,<br>
<br>
we are facing some issue on icinga  when we are going to verify the<br>
configuration files and restart also. I had attached a file of<br>
 commands.cfg . I bolded the line no 231 where we got error in commands.cfg<br>
<br>
Please have a look and suggest me.<br>
<br>
Error we got as follow below<br>
<br>
root@evericinga:/usr/local/icinga/etc# /usr/local/icinga/bin/icinga -v<br>
/usr/local/icinga/etc/icinga.cfg<br>
<br>
Icinga 1.8.4<br>
Copyright (c) 2009-2012 Icinga Development Team (<a href="http://www.icinga.org" target="_blank">http://www.icinga.org</a>)<br>
Copyright (c) 2009-2012 Nagios Core Development Team and Community<br>
Contributors<br>
Copyright (c) 1999-2009 Ethan Galstad<br>
Last Modified: 01-13-2013<br>
License: GPL<br>
<br>
Reading configuration data...<br>
   Read main config file okay...<br>
Processing object config directory '/usr/local/icinga/etc/conf.d'...<br>
Processing object config directory '/etc/icinga/default'...<br>
Processing object config file '/etc/icinga/default/appgroups.cfg'...<br>
Processing object config file '/etc/icinga/default/hostgroups.cfg'...<br>
Processing object config file '/etc/icinga/default/hosts.cfg'...<br>
Processing object config directory '/etc/icinga/global'...<br>
Processing object config file '/etc/icinga/global/host_templates.cfg'...<br>
Processing object config file '/etc/icinga/global/miscommands.cfg'...<br>
Processing object config file<br>
'/usr/local/icinga/etc/objects/commands.cfg'...<br>
Warning: Duplicate definition found for command 'check_nrpe' (config file<br>
'/usr/local/icinga/etc/objects/commands.cfg', starting on line 230)<br>
Error: Could not add object property in file<br>
'/usr/local/icinga/etc/objects/commands.cfg' on line 231.<br>
   Error processing object config files!<br>
<br>
<br>
***> One or more problems was encountered while processing the config<br>
files...<br>
<br>
     Check your configuration file(s) to ensure that they contain valid<br>
     directives and data definitions.  If you are upgrading from a previous<br>
     version of Icinga, you should be aware that some variables/definitions<br>
     may have been removed or modified in this version.  Make sure to read<br>
     the HTML documentation regarding the config files, as well as the<br>
     'Whats New' section and the Changelog CHANGES section as well to find<br>
     out what has changed.<br>
<br>
<br>
<br>
<br>
vim /usr/local/icinga/etc/objects/commands.cfg<br>
<br>
##############################################################################<br>
# COMMANDS.CFG - SAMPLE COMMAND DEFINITIONS FOR ICINGA<br>
#<br>
# NOTES: This config file provides you with some example command definitions<br>
#        that you can reference in host, service, and contact definitions.<br>
#<br>
#        You don't need to keep commands in a separate file from your other<br>
#        object definitions.  This has been done just to make things easier<br>
to<br>
#        understand.<br>
#<br>
###############################################################################<br>
<br>
<br>
################################################################################<br>
#<br>
# SAMPLE NOTIFICATION COMMANDS<br>
#<br>
# These are some example notification commands.  They may or may not work on<br>
# your system without modification.  As an example, some systems will<br>
require<br>
# you to use "/usr/bin/mailx" instead of "/usr/bin/mail" in the commands<br>
below.<br>
#<br>
################################################################################<br>
<br>
<br>
# 'notify-host-by-email' command definition<br>
define command{<br>
        command_name    notify-host-by-email<br>
        }<br>
<br>
# 'notify-service-by-email' command definition<br>
define command{<br>
        command_name    notify-service-by-email<br>
        }<br>
<br>
<br>
<br>
<br>
<br>
################################################################################<br>
#<br>
# SAMPLE HOST CHECK COMMANDS<br>
#<br>
################################################################################<br>
<br>
<br>
# This command checks to see if a host is "alive" by pinging it<br>
# The check must result in a 100% packet loss or 5 second (5000ms) round<br>
trip<br>
# average time to produce a critical error.<br>
# Note: Five ICMP echo packets are sent (determined by the '-p 5' argument)<br>
<br>
# 'check-host-alive' command definition<br>
define command{<br>
        command_name    check-host-alive<br>
        command_line    $USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80%<br>
-c 5000.0,100% -p 5<br>
        }<br>
<br>
<br>
<br>
<br>
################################################################################<br>
#<br>
# SAMPLE SERVICE CHECK COMMANDS<br>
#<br>
# These are some example service check commands.  They may or may not work<br>
on<br>
# your system, as they must be modified for your plugins.  See the HTML<br>
# documentation on the plugins for examples of how to configure command<br>
definitions.<br>
#<br>
# NOTE:  The following 'check_local_...' functions are designed to monitor<br>
#        various metrics on the host that Icinga is running on (i.e. this<br>
one).<br>
################################################################################<br>
<br>
# 'check_local_disk' command definition<br>
define command{<br>
        command_name    check_local_disk<br>
        command_line    $USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$<br>
        }<br>
<br>
<br>
# 'check_local_load' command definition<br>
define command{<br>
        command_name    check_local_load<br>
        command_line    $USER1$/check_load -w $ARG1$ -c $ARG2$<br>
        }<br>
<br>
<br>
# 'check_local_procs' command definition<br>
define command{<br>
        command_name    check_local_procs<br>
        command_line    $USER1$/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$<br>
        }<br>
<br>
<br>
# 'check_local_users' command definition<br>
define command{<br>
        command_name    check_local_users<br>
        command_line    $USER1$/check_users -w $ARG1$ -c $ARG2$<br>
        }<br>
<br>
<br>
# 'check_local_swap' command definition<br>
define command{<br>
        command_name    check_local_swap<br>
        command_line    $USER1$/check_swap -w $ARG1$ -c $ARG2$<br>
        }<br>
<br>
<br>
# 'check_local_mrtgtraf' command definition<br>
define command{<br>
        command_name    check_local_mrtgtraf<br>
        command_line    $USER1$/check_mrtgtraf -F $ARG1$ -a $ARG2$ -w<br>
$ARG3$ -c $ARG4$ -e $ARG5$<br>
        }<br>
<br>
<br>
################################################################################<br>
# NOTE:  The following 'check_...' commands are used to monitor services on<br>
#        both local and remote hosts.<br>
################################################################################<br>
<br>
# 'check_ftp' command definition<br>
define command{<br>
        command_name    check_ftp<br>
        command_line    $USER1$/check_ftp -H $HOSTADDRESS$ $ARG1$<br>
        }<br>
<br>
<br>
# 'check_hpjd' command definition<br>
define command{<br>
        command_name    check_hpjd<br>
        command_line    $USER1$/check_hpjd -H $HOSTADDRESS$ $ARG1$<br>
        }<br>
<br>
<br>
# 'check_snmp' command definition<br>
define command{<br>
        command_name    check_snmp<br>
        command_line    $USER1$/check_snmp -H $HOSTADDRESS$ $ARG1$<br>
        }<br>
<br>
<br>
# 'check_http' command definition<br>
define command{<br>
        command_name    check_http<br>
        command_line    $USER1$/check_http -I $HOSTADDRESS$ $ARG1$<br>
        }<br>
<br>
<br>
# 'check_ssh' command definition<br>
define command{<br>
        command_name    check_ssh<br>
        command_line    $USER1$/check_ssh $ARG1$ $HOSTADDRESS$<br>
        }<br>
<br>
<br>
# 'check_dhcp' command definition<br>
define command{<br>
        command_name    check_dhcp<br>
        command_line    $USER1$/check_dhcp $ARG1$<br>
        }<br>
<br>
<br>
# 'check_ping' command definition<br>
define command{<br>
        command_name    check_ping<br>
        command_line    $USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c<br>
$ARG2$ -p 5<br>
        }<br>
<br>
<br>
# 'check_pop' command definition<br>
define command{<br>
        command_name    check_pop<br>
        command_line    $USER1$/check_pop -H $HOSTADDRESS$ $ARG1$<br>
        }<br>
<br>
<br>
# 'check_imap' command definition<br>
define command{<br>
        }<br>
<br>
<br>
# 'check_smtp' command definition<br>
define command{<br>
        command_name    check_smtp<br>
        command_line    $USER1$/check_smtp -H $HOSTADDRESS$ $ARG1$<br>
        }<br>
<br>
<br>
# 'check_tcp' command definition<br>
define command{<br>
        command_name    check_tcp<br>
        command_line    $USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$<br>
        }<br>
<br>
<br>
# 'check_udp' command definition<br>
define command{<br>
        command_name    check_udp<br>
        command_line    $USER1$/check_udp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$<br>
        }<br>
<br>
<br>
# 'check_nt' command definition<br>
define command{<br>
        command_name    check_nt<br>
        command_line    $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -v<br>
$ARG1$ $ARG2$<br>
        }<br>
# 'check_dummy' command definition<br>
define command{<br>
        command_name    check_dummy<br>
        command_line    $USER1$/check_dummy $ARG1$<br>
        }<br>
<br>
        command_name    check_icinga_startup_delay<br>
        command_line    $USER1$/check_dummy 0 "Icinga started with<br>
$$(($EVENTSTARTTIME$-$PROCESSSTARTTIME$)) seconds delay |<br>
delay=$$(($EVENTSTARTTIME$-$PROCESSSTARTTIME$))"<br>
}<br>
<br>
# 'check_mysql' command definition<br>
define command{<br>
        command_name    check_mysql<br>
        command_line    $USER1$/check_mysql -H $HOSTADDRESS$ -u $ARG1$ -p<br>
$ARG2$ -p $ARG3$<br>
       }<br>
<br>
* define command {*<br>
*                command_name                          check_nrpe*<br>
*                command_line<br>
 /usr/lib/nagios/plugins/check_tcp -H $HOSTADDRESS$ -p 5666*<br>
* }*<br>
<br>
<br>
################################################################################<br>
#<br>
# SAMPLE PERFORMANCE DATA COMMANDS<br>
#<br>
# These are sample performance data commands that can be used to send<br>
performance<br>
# data output to two text files (one for hosts, another for services).  If<br>
you<br>
# plan on simply writing performance data out to a file, consider using the<br>
# host_perfdata_file and service_perfdata_file options in the main config<br>
file.<br>
#<br>
################################################################################<br>
<br>
<br>
# 'process-host-perfdata' command definition<br>
define command{<br>
        command_name    process-host-perfdata<br>
        command_line    /usr/bin/printf "%b"<br>
"$LASTHOSTCHECK$\t$HOSTNAME$\t$HOSTSTATE$\t$HOSTATTEMPT$\t$HOSTSTATETYPE$\t$HOSTEXECUTIONTIME$\t$HOSTOUTPUT$\t$HOSTPERFDATA$\n"<br>
>> /usr/local/icinga/var/host-perfdata.out<br>
        }<br>
<br>
<br>
# 'process-service-perfdata' command definition<br>
define command{<br>
        command_name    process-service-perfdata<br>
        command_line    /usr/bin/printf "%b"<br>
"$LASTSERVICECHECK$\t$HOSTNAME$\t$SERVICEDESC$\t$SERVICESTATE$\t$SERVICEATTEMPT$\t$SERVICESTATETYPE$\t$SERVICEEXECUTIONTIME$\t$SERVICELATENCY$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$\n"<br>
>> /usr/local/icinga/var/service-perfdata.out<br>
}<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
<br>
------------------------------<br>
<br>
------------------------------------------------------------------------------<br>
Everyone hates slow websites. So do we.<br>
Make your web apps faster with AppDynamics<br>
Download AppDynamics Lite for free today:<br>
<a href="http://p.sf.net/sfu/appdyn_d2d_mar" target="_blank">http://p.sf.net/sfu/appdyn_d2d_mar</a><br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
icinga-users mailing list<br>
<a href="mailto:icinga-users@lists.sourceforge.net">icinga-users@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/icinga-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/icinga-users</a><br>
<br>
<br>
End of icinga-users Digest, Vol 47, Issue 15<br>
********************************************<br>
</div><br><br clear="all"><div><br></div>-- <br>M.KANAKAIAH<br>9959491677
</div>