Nagios map setting issue 4.3.2
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Nagios map setting issue 4.3.2
It is for Case 2 that my recommendations would matter.
Can you send your .cfg files and the name of at least one contact receive these and I can suggest a fix.
Can you send your .cfg files and the name of at least one contact receive these and I can suggest a fix.
-
- Posts: 26
- Joined: Sat Jun 16, 2018 7:21 am
Re: Nagios map setting issue 4.3.2
scottwilkerson wrote:
It is for Case 2 that my recommendations would matter.
Can you send your .cfg files and the name of at least one contact receive these and I can suggest a fix
-> Here you are mentioning .cfg files means : commands.cfg file ?
It is for Case 2 that my recommendations would matter.
Can you send your .cfg files and the name of at least one contact receive these and I can suggest a fix
-> Here you are mentioning .cfg files means : commands.cfg file ?
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Nagios map setting issue 4.3.2
Yes pleasejagannathan wrote:-> Here you are mentioning .cfg files means : commands.cfg file ?scottwilkerson wrote:It is for Case 2 that my recommendations would matter.
Can you send your .cfg files and the name of at least one contact receive these and I can suggest a fix
-
- Posts: 26
- Joined: Sat Jun 16, 2018 7:21 am
Re: Nagios map setting issue 4.3.2
'' scottwilkerson wrote:
-> Ya whatever your are saying correct commands.cfg file only fetching the mail configuration parameter, but it will send both the case 1 ,as well as case 2 .
->For my doubt exactly case 2 : Automatical mail sending time that particular comment parameter only remove remaining all parameter should pass for that automatic case also.
-> Ya whatever your are saying correct commands.cfg file only fetching the mail configuration parameter, but it will send both the case 1 ,as well as case 2 .
->For my doubt exactly case 2 : Automatical mail sending time that particular comment parameter only remove remaining all parameter should pass for that automatic case also.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Nagios map setting issue 4.3.2
I don't understand, are you attaching the file?
-
- Posts: 26
- Joined: Sat Jun 16, 2018 7:21 am
Re: Nagios map setting issue 4.3.2
Hello Folks,
mail alerts Notification problem time : comment parameter need to remove is there any possible.
mail alerts Notification problem time : comment parameter need to remove is there any possible.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Nagios map setting issue 4.3.2
please attach commands.cfg
-
- Posts: 26
- Joined: Sat Jun 16, 2018 7:21 am
Re: Nagios map setting issue 4.3.2
Hello scottwilkerson ,
-> Here i attached commands.cfg file ,once verify those file and give me solution for fixing this mail alert issue.
.
-> Here i attached commands.cfg file ,once verify those file and give me solution for fixing this mail alert issue.
.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Nagios map setting issue 4.3.2
So, if you don't want the Comment: to show up you need to change the following 2 commands at the top of this file
from this
to this
from this
Code: Select all
# 'notify-host-by-email' command definition
define command{
command_name notify-host-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$\nComment: $NOTIFICATIONCOMMENT$ \n" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$
}
# 'notify-service-by-email' command definition
define command{
command_name notify-service-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$\n Comment : $NOTIFICATIONCOMMENT$ \n" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$ }
to this
Code: Select all
# 'notify-host-by-email' command definition
define command{
command_name notify-host-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" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$
}
# 'notify-service-by-email' command definition
define command{
command_name notify-service-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$\n" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$ }
-
- Posts: 26
- Joined: Sat Jun 16, 2018 7:21 am
Re: Nagios map setting issue 4.3.2
Scottwilkerson wrote :
-> Ya whatever your are saying is correct notification host by mail under passing parameter it will fetch the email alert i agree , but it should pass for all the scenario , previous post i already discussed for 2 cases
1st case it should be ok , but whenever moving to 2nd case comment no need to pass that is my exact question ?
-> Ya whatever your are saying is correct notification host by mail under passing parameter it will fetch the email alert i agree , but it should pass for all the scenario , previous post i already discussed for 2 cases
1st case it should be ok , but whenever moving to 2nd case comment no need to pass that is my exact question ?