Bobcares

Configure email settings in Nagios Log Server – How to do it

by | Jan 22, 2021

Need help to configure email settings in Nagios? We can help you.

A proper email configuration will help us from spam or virus attacks. This documentation is to help you understand in detail how emails are sent by Nagios Log Server.

As part of our Server Management Services, we assist our customers with several Nagios Queries.

Today, let us see how to configure email settings in the Nagios log server.

 

Email settings in Nagios Log Server

Log Server, a powerful log monitoring and management application allows organizations to quickly view, sort, and configure logs from any source, on any given network.

If we have a log to monitor, Nagios Log Monitor can receive it for further analysis.

Furthermore, let us see how Nagios Log Server sends emails and the effective ways our Support Techs employ to configure them.

Nagios Log Server uses email to send alerts. Email settings in Nagios Log Server is in Admin > General > Mail Settings.

  • Web Browser Behavior

Generally, web browsers will auto-complete/auto-populate fields on a web page when it loads. Usually, this occurs when it sees a common field that does not have a value. It may already have a value for that “named field” and hence it populates that field.

For example, in the Mail Settings page in Nagios Log Server, when the Send Email Method selects SMTP Server, the username and password fields populate. This is simply our web browser trying to fill the data.

If we clear the username and password fields before clicking the Save Settings button, Nagios Log Server will correctly save those settings. Hence, it records that no username or password has been defined.

However, when the page refreshes, our web browser re-populate those fields as it thinks those values should go in there.

  • From & Reply-To

As we all know, these fields define where the email was sent from and the reply-to address.

The left field is the Display Name. The right field is the actual address and the format is:

alias@our.email.domain

We make sure this is a valid address so that when the receiver of the email clicks the reply button in their email client, then the reply-to address will be in use.

 

Configure email settings in Nagios

Nagios Log Server provides two methods for sending emails. Our Support Techs explains them in detail.

  • PHP Mail

This mail method uses Postfix to send an email. In the operating system, the command is sendmail.postfix, which provides the ability for Postfix to accept Sendmail commands.

With this method, the Nagios Log Server is responsible for sending emails directly to all the recipients. It contacts the email server for the email recipient and sends the message via SMTP port 25.

However, certain issues may arise with email recipients that have spam/virus detection software.

If the receiving mail server detects that the email it receives is not from the mail server, it can discard it or move it to a junk mail folder.

PHP Mail as the method on the Mail Settings page requires no additional settings.

  • SMTP Server

SMTP Server as the method for sending email allows configuring Nagios Log Server to use an email server for mail delivery.

This could be an internal email server like Microsoft Exchange, Postfix, etc, or an external email server like Hosted email services, Internet Service Provider, etc.

An SMTP server for mail delivery is generally the more secure method.

The SMTP Server Address field is the network address of the SMTP server. We can use an IP address or DNS record.

However, SMTP Security is optional.

  • Generally, SSL or TLS will encrypt the communication of the email.
  • TLS is recommended over SSL mostly.
  • STARTTLS offers a way to upgrade a plain text connection to an encrypted (SSL or TLS) connection.
  • The mail server needs to support SSL or TLS.

The SMTP Port field is the network port the SMTP server is listening on. Common ports are 25 and 587.

The Username and Password fields are optional. All of this depends on how we configure the email server. This may require allowing mail relaying.

 

SMTP Example 1: Postfix, No Authentication, No Security

Consider the SMTP server as a Postfix server that allows connections from the Nagios Log Server IP address. It requires no authentication and security settings.

It is most likely because this Postfix server defines the IP address of the Nagios Log Server in the mynetworks directive of the main.cf file.

SMTP Example 2: Exchange, Authentication, No Security

Here, the SMTP server is an Exchange server that allows connections from the Nagios Log Server because it provides a username and password. No security settings have been chosen.

All it requires is the credentials for a user account with a mailbox and no changes on the Exchange server.

SMTP Example 3: Exchange, Authentication, Security

This is identical to example 2, however, it chose the security setting as TLS. This will ensure emails are sent encrypted.

 

Mail Relay

A mail relay is when we request the SMTP server to send emails to an email domain that it is not responsible for.

In order to prevent a rogue computer from using that SMTP server to send spam email, Email servers may configure to deny mail relay. Because it can result in the email server being blacklisted on the internet.

This can occur only if we do not provide a username and password in SMTP settings. Most SMTP servers will allow us to send emails to other domains when using authentication credentials.

 

Which Instance Sends The Email

Nagios Log Server consists of one or more instances of Nagios Log Server. When an alert email is being sent, it is sent by the instance that is running the alert.

From the Mail Settings page, we can send a test email. In this situation, it is the instance our web browser that connects to that will send the email.

[Stuck with email configuration? We’d be happy to assist]

 

Conclusion

To conclude, we saw how Nagios Log Server sends emails and the effective ways our Support Techs employ to configure them.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF