hello all!
i have installed nagios3 on ubuntu platform. I have configured notification using postfix.
Now, in from mail address i want to remove "nagios@" prefix. How to do?
Nagios Notification Configuration
Re: Nagios Notification Configuration
Hi nickyls,
There is a mailx option which lets you do this which is "-r".
Below is an example:
Kind Regards,
Gary Shergill
There is a mailx option which lets you do this which is "-r".
Below is an example:
Code: Select all
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/mailx -r newnagios@nagios.notify -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
}
Gary Shergill
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Nagios Notification Configuration
Again, Gary is correct, if you leave the -r off it is going to mail from nagios@machine_name
Re: Nagios Notification Configuration
Thank you for quick reply.
But in our instance if i add -r xxx@gmail.com the nagios didnt send any notification. The email id xxx@gmail.com is provided while configuring Postfix.
But in our instance if i add -r xxx@gmail.com the nagios didnt send any notification. The email id xxx@gmail.com is provided while configuring Postfix.
Re: Nagios Notification Configuration
Hi nickyls,
If it's no longer sending the notification after adding the "-r", there may be a mistake in your command definition.
Could you please paste the command definition you are using?
Also, just to confirm, are you using mailx?
Thank you.
Kind Regards,
Gary Shergill
If it's no longer sending the notification after adding the "-r", there may be a mistake in your command definition.
Could you please paste the command definition you are using?
Also, just to confirm, are you using mailx?
Thank you.
Kind Regards,
Gary Shergill
Re: Nagios Notification Configuration
Any update on this nickyls?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.