Subject nagios email

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
cesarvegast
Posts: 1
Joined: Wed Jun 25, 2014 11:44 am

Subject nagios email

Post by cesarvegast »

Hello guys:

I am new here and i wonder if It is possible to modify the subject of the emails sent by nagios?

Thanks.

César.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Subject nagios email

Post by dwhitfield »

First off, welcome!

The answer to your question will depend on how you have your mail set up, which may in part depend on what OS/version you are running.

That said, assuming you have the expected defaults, you'll have a file called /usr/local/nagios/etc/objects/commands.cfg.

In that file you'll see notify-host-by-email and notify-service-by-email.

In each of those, you'll see a pipe and then /usr/bin/mail -s and then a "" block. Everything between the two "" is the subject.

You'll then need to run /etc/init.d/nagios reload.

If that doesn't work for you, please provide in errors you get. Also, what version of Core are you using? Was it compiled from source or installed from distro repos? On what OS/version is nagios running? cat /etc/*-release may be of use.

If that does work for you, no need to respond, but you can tell us to lock it up if you like. :)
Locked