How to configure Observium email alerts

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.

2015-05-30 18_53_40

 

 

 

 

 

2. Press Enter to go to the Advanced Menu -> Select Yes to quit.

3. Login using your root account.

2015-05-30 19_01_54

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

2015-05-30 19_05_16-

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

2015-05-30 19_10_37

 

 

6. Let’s see a list of all the files in this directory. Type the command and hit enter: dir

2015-05-30 19_16_02

 

 

 

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

2015-05-30 19_17_04

 

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.

2015-05-30 19_26_59

 

 

 

 

12. Once you have finished entering in your email settings:

Press the Esc key

Type a colon :

Type wq!

Hit Enter

2015-05-30 19_32_01

 

 

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.

2015-05-30 19_36_56

 

 

 

 

14. Check for a device you have configured in observium. We will use this to test the email settings. Here we have a device:

2015-05-30 19_39_03-drawform40 - Remote Desktop Connection

 

15. In the Observium CLI type in (and replace the device name) and hit enter: php test_mail.php -h yourdevice.domain.com

2015-05-30 19_43_30-

 

 

 

 

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.

7 thoughts on “How to configure Observium email alerts

  1. 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,

    Like

  2. 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,

    Like

  3. 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&regards
    Goutham

    Like

  4. 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

    Like

Leave a comment