problem while doing check configuration in GUI
Re: problem while doing check configuration in GUI
define contact {
contact_name rforte-notify
alias Rod J Forte (Notify)
email [email protected]
use ,,
}
I deleted the 5th line use " manualy and while importing again i am getting the same error.
contact_name rforte-notify
alias Rod J Forte (Notify)
email [email protected]
use ,,
}
I deleted the 5th line use " manualy and while importing again i am getting the same error.
Re: problem while doing check configuration in GUI
define contact {
contact_name rforte-notify
alias Rod J Forte (Notify)
email [email protected]
use ,,
}
tried removing 5th line use " manually but after that when we import the file we are getting same error
contact_name rforte-notify
alias Rod J Forte (Notify)
email [email protected]
use ,,
}
tried removing 5th line use " manually but after that when we import the file we are getting same error
Re: problem while doing check configuration in GUI
Are you trying to modify the config manually? In Nagios XI you must use the Core Config Manager.
Go to the Core Config Manager->Contacts->rforte-notify->Modify, fill in all of the required info, and click on "Save". Don't Apply Configuration, yet.
Go to the Core Config Manager->Tools->Write Config Files, click on four "Go" buttons to verify your configs. If you don't have any errors, Apply Configuration.
Hope this helps.
Go to the Core Config Manager->Contacts->rforte-notify->Modify, fill in all of the required info, and click on "Save". Don't Apply Configuration, yet.
Go to the Core Config Manager->Tools->Write Config Files, click on four "Go" buttons to verify your configs. If you don't have any errors, Apply Configuration.
Hope this helps.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: problem while doing check configuration in GUI
Thank you very much .I could modify that in GUI CCM.
Now i am getting this error.Though I did not find any duplicate entries for it to clear.
Warning: Duplicate definition found for command 'host-notify-by-email' (config file '/usr/local/nagios/etc/commands.cfg', starting on line 639)
Error: Could not add object property in file '/usr/local/nagios/etc/commands.cfg' on line 640.
Error processing object config files!
Now i am getting this error.Though I did not find any duplicate entries for it to clear.
Warning: Duplicate definition found for command 'host-notify-by-email' (config file '/usr/local/nagios/etc/commands.cfg', starting on line 639)
Error: Could not add object property in file '/usr/local/nagios/etc/commands.cfg' on line 640.
Error processing object config files!
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: problem while doing check configuration in GUI
Open the CCM -> Commands
Search for notify
Make sure we don't have 2 named the same thing
Delete any extras
Search for notify
Make sure we don't have 2 named the same thing
Delete any extras
Re: problem while doing check configuration in GUI
we do not have any duplicate entries in that for host-notify-by-email.
define command {
command_name host-notify-by-email
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 "Host $HOSTSTATE$ alert for $HOSTNAME$!" $CONTACTEMAIL$
}
define command {
command_name host-notify-by-epager
command_line /usr/bin/printf "%b" "Host '$HOSTALIAS$' is $HOSTSTATE$\nInfo: $HOSTOUTPUT$\nTime: $LONGDATETIME$" | /bin/mail -s "$NOTIFICATIONTYPE$ alert - Host $HOSTNAME$ is $HOSTSTATE$" $CONTACTPAGER$
}
define command {
command_name notify-by-email
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$" | /bin/mail -s "** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
}
define command {
command_name notify-by-epager
command_line /usr/bin/printf "%b" "Service: $SERVICEDESC$\nHost: $HOSTNAME$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\nInfo: $SERVICEOUTPUT$\nDate: $LONGDATETIME$" | /bin/mail -s "$NOTIFICATIONTYPE$: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$" $CONTACTPAGER$
define command {
command_name host-notify-by-email
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 "Host $HOSTSTATE$ alert for $HOSTNAME$!" $CONTACTEMAIL$
}
define command {
command_name host-notify-by-epager
command_line /usr/bin/printf "%b" "Host '$HOSTALIAS$' is $HOSTSTATE$\nInfo: $HOSTOUTPUT$\nTime: $LONGDATETIME$" | /bin/mail -s "$NOTIFICATIONTYPE$ alert - Host $HOSTNAME$ is $HOSTSTATE$" $CONTACTPAGER$
}
define command {
command_name notify-by-email
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$" | /bin/mail -s "** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
}
define command {
command_name notify-by-epager
command_line /usr/bin/printf "%b" "Service: $SERVICEDESC$\nHost: $HOSTNAME$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\nInfo: $SERVICEOUTPUT$\nDate: $LONGDATETIME$" | /bin/mail -s "$NOTIFICATIONTYPE$: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$" $CONTACTPAGER$
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: problem while doing check configuration in GUI
Lets run the write config tool top 3 buttons
Configure -> CCM -> Tools -> Write Config tool
After getting the error, go to ssh console for your xi server and run
Report the output
Configure -> CCM -> Tools -> Write Config tool
After getting the error, go to ssh console for your xi server and run
Code: Select all
grep -r "host-notify-by-email" /usr/local/nagios/etc/Re: problem while doing check configuration in GUI
Here is the output of the command attached.
Could see only one entry for in commands.cfg file
/usr/local/nagios/etc/commands.cfg: command_name host-notify-by-email
Could see only one entry for in commands.cfg file
/usr/local/nagios/etc/commands.cfg: command_name host-notify-by-email
You do not have the required permissions to view the files attached to this post.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: problem while doing check configuration in GUI
And you have one in the import folder in the following...
/usr/local/nagios/etc/import/misccommands.cfg
This is the problem
/usr/local/nagios/etc/import/misccommands.cfg
This is the problem
Re: problem while doing check configuration in GUI
thank you .Let me try removing it and compile