This tutorial will show how to setup and test the email settings in Observium Professional version (TurnKey Linux image).
Note: We have already purchased and upgraded from Community to Professional version. This guide expects this has already been completed. Since this is in a production environment I have removed any information that could identify this instance.
To setup and test the email alert settings:
1. SSH or login to the observium appliance. In this case it is a VMware Virtual Machine that we are connected to the console.
2. Press Enter to go to the Advanced Menu -> Select Yes to quit.
3. Login using your root account.
Note: This guide is assuming you are not very familiar with Linux CLI commands and basic management tasks.
4. We will install a program to edit the observium configuration files. Type the command and hit enter: apt-get install vim
Note that I already have it installed. You may have to type “Y” for the install to complete.
5. Let’s navigate to the directory where Observium is installed. Type the command and hit enter: cd /opt/observium
6. Let’s see a list of all the files in this directory. Type the command and hit enter: dir
7. It is important to backup a file before you make changes to it in case you need to revert back to the previous version. We will take the Observiuym configuration file and add a .old to the end. To do this type the command and hit enter: cp config.php config.php.old
8. Let’s go ahead and edit the config.php file. To do this use the command: vim config.php
9. Press “i” on the keyboard. This is the “insert” key so we can make changes to the file.
10. Use the down arrow on the keyboard to move to the bottom of the file. Let’s add a comment to the file so we know where the Email Settings are. Type: //Email settings
Note: You will need a SMTP server you are allowed to send email through. In this instance we have a server configured as a SMTP relay server that forwards emails to our Office 365 instance. We do not need to authenticate to the SMTP relay server. These settings will vary depending on your email’s server configuration.
11. You must type in the information exactly as follows – EXCEPT for the variables like email address, smtp port, etc.
12. Once you have finished entering in your email settings:
Press the Esc key
Type a colon :
Type wq!
Hit Enter
Now that we have the email settings configured lets verify and test it.
13. Login to the Observium webpage and go to Global Settings. Scroll down to the “email” settings and click the red arrow. Make sure your settings show up like you configured in your config.php file.
14. Check for a device you have configured in observium. We will use this to test the email settings. Here we have a device:
15. In the Observium CLI type in (and replace the device name) and hit enter: php test_mail.php -h yourdevice.domain.com
16. Verify you receive the email. Now that we have the email alerts working we can configure specific alerts that we will get notifications from.
php test_mail.php -h yourdevice.domain.com this command is not opening.
error is : Could not open input file: test_mail.php
please reply, what should i do now?
thanks,
LikeLike
this command is not opening: php test_mail.php -h yourdevice.domain.com
the error is : Could not open input file: test_mail.php
what should i do now ?
thanks,
LikeLike
hi,
using this command – “php test_mail.php -h yourdevice.domain.com”
my error is – “Could not open input file: test_mail.php”
what should i do now?
please reply…
thanks®ards
Goutham
LikeLike
thanks for this helpful article! I followed along the steps but seem to be held up at the last part. My observium does not have test_mail.php and I noticed when you ran the dir command, it was already present in your environment. I did some searching but came up empty on getting that file. any help would be greatly appreciated. I confirmed that we have Pro and found some articles stating it needs to be downloaded from an Observium website but I’ve been coming up empty.
Thanks so much
LikeLike
Hello everyone test_mail.php has been replaced with test_alert.php, kindly follow this http://jira.observium.org/browse/OBSERVIUM-1468
LikeLike
does the current version support the email alert? I am running turnkey Observium CE?
LikeLike
I don’t believe the community edition supports alerting. That is the paid version.
LikeLike