Cloud and Infrastructure Monitoring Software and Tools
Please log in to access your account.
Please register to activate Opsview Monitor
An e-mail will be sent to your registered e-mail address.
I successfully installed and connected 2 slaves to my master server.
The problem is, neither are sending out alerts and the Postfix logs are empty.
What did I miss?
Are both of those slaves configured to send notifications, e.g. is the notification method set to be run on the master or the slaves?
I take it these are email notifications? If so, can you send an email manually on the servres without issue?
date | /usr/bin/Mail -s subject <email address>
The Slave guide on your Knowledge Base does not mention installing "mailutils".
After installing it and changing the default email script from using "/usr/bin/Mail" to "/usr/bin/mail" the emails started reaching Postfix.
However, I have yet to find out how to add a "sender name" i.e "Opsview IL" to the emails being sent as they are all nameless.
Adding a name to the nagios\root\opsview user on the linux machine does not cut it. It still remains empty.
Is there a way to fix this or must I re-write the sending script?
btw, how come I can only see your last response to my message rather than the entire conversation on the Forum?
People might find this useful...
/usr/bin/Mail should be available in another package (such as bsd-mailx on Debian) and you should not need to amend the script to get it working 'out of the box'.
I will check the package dependancies to see why this one was missed.
Also, amending the GCOS field in /etc/passwd is the right way to go when using Mail, otherwise 'mail' might have an option such as '-F Opsview' to override the default.
GCOS field has been edited but I still dont get no sender name...
I also tried editing the notify_by_email script but that didnt work at all.
I dont have knowledge in PERL but I believe the relevant part should be something like this:
($subject) = ( $output =~ /^(.+)$/m );
open EMAIL, "|-", "/usr/bin/Mail", "-s", $subject, "-a From: Opsview IL <email@example.com>", $email;
print EMAIL $output;
print "Sent email!\n";
Yet that does not work either...
Changing the part of the line from
"-s", $subject, "-a From: Opsview IL .....
"-s", $subject, "-a","From: Opsview IL ....
may make a difference, but can you just run the command directly and get it to work?
date | /usr/bin/Mail -s subject -a "From: Opsview LS <firstname.lastname@example.org>" email@address