Hi,
I want to change the default sender ([email protected])of nagios email notification. so the sender can be customized not [email protected],
maybe something likes [email protected]. Is it possible to modify this? how to?
Thanks
Gary
how to change the default sender of nagios mail notification
Re: how to change the default sender of nagios mail notifica
It all depends how you are sending mail. It could be a postfix setting, sendmail setting, exim, or others. Usually the mails are sent as user nagios as the mail is sent from the system user nagios. You will need to alter your mta config to send as a different user.
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.
Re: how to change the default sender of nagios mail notifica
Thanks for your reply. I use the sendmail as my MTA. but I don't know how to change it to meet with my demand.
Could you please show me the details?
Appreciate your help.
Could you please show me the details?
Appreciate your help.
Re: how to change the default sender of nagios mail notifica
You could try adding:
To the end of your notification commands. Then change the "admin_email" directive in nagios.conf to the email address of your choice.
Code: Select all
-- -r $ADMINEMAIL$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.
Re: how to change the default sender of nagios mail notifica
Great!
I got another way to make it true. I added "-- -f [email protected] -F sys-admin" in command.cfg
It works now. Thanks you again.
I have another question here. the command check_disk with parameter -u GB doesn't work
"command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_disk -u GB -a $ARG1$ $ARG2$ $ARG3$", I didn't find error in the command line
but I don;t know why it still display MB not GB. any suggestion?
thanks
I got another way to make it true. I added "-- -f [email protected] -F sys-admin" in command.cfg
It works now. Thanks you again.
I have another question here. the command check_disk with parameter -u GB doesn't work
"command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_disk -u GB -a $ARG1$ $ARG2$ $ARG3$", I didn't find error in the command line
but I don;t know why it still display MB not GB. any suggestion?
thanks
Re: how to change the default sender of nagios mail notifica
That will work as well, though the 'from address' and 'return address' are slightly different. If you have issues sending through relays, you may want to set both.gyang27 wrote:I got another way to make it true. I added "-- -f [email protected] -F sys-admin" in command.cfg
It looks like you may need move the unit (-u GB) switch into the arguments. I tested the check from the cli and it works correctly here.gyang27 wrote:but I don;t know why it still display MB not GB. any suggestion?
Do note: You will have to remove the RRD and XML associated with this check (if you rae using rrds and pnp4nagios) as the metric will change to GB (leading to much smaller performance numbers).
Can you run your check from the cli?
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.