Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/prolinuxhub/public_html/wp-includes/script-loader.php on line 757

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/prolinuxhub/public_html/wp-includes/script-loader.php on line 757

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/prolinuxhub/public_html/wp-includes/script-loader.php on line 758

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/prolinuxhub/public_html/wp-includes/script-loader.php on line 758

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/load.php on line 926

Notice: Trying to access array offset on value of type bool in /home/prolinuxhub/public_html/wp-includes/theme.php on line 2360

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function create_function() is deprecated in /home/prolinuxhub/public_html/wp-content/plugins/synved-shortcodes/synved-shortcode/synved-shortcode.php on line 693

Deprecated: Function create_function() is deprecated in /home/prolinuxhub/public_html/wp-content/plugins/synved-shortcodes/synved-shortcode/synved-shortcode.php on line 693

Deprecated: Function create_function() is deprecated in /home/prolinuxhub/public_html/wp-content/plugins/synved-shortcodes/synved-shortcode/synved-shortcode.php on line 693

Deprecated: Function create_function() is deprecated in /home/prolinuxhub/public_html/wp-content/plugins/synved-shortcodes/synved-shortcode/synved-shortcode.php on line 693

Deprecated: Function create_function() is deprecated in /home/prolinuxhub/public_html/wp-content/plugins/synved-shortcodes/synved-shortcode/synved-shortcode.php on line 693

Deprecated: Function create_function() is deprecated in /home/prolinuxhub/public_html/wp-content/plugins/synved-shortcodes/synved-shortcode/synved-shortcode.php on line 693

Deprecated: Function create_function() is deprecated in /home/prolinuxhub/public_html/wp-content/plugins/synved-shortcodes/synved-shortcode/synved-shortcode.php on line 693

Deprecated: Function create_function() is deprecated in /home/prolinuxhub/public_html/wp-content/plugins/synved-shortcodes/synved-shortcode/synved-shortcode.php on line 774

Deprecated: Function create_function() is deprecated in /home/prolinuxhub/public_html/wp-content/plugins/synved-shortcodes/synved-shortcode/synved-shortcode.php on line 774

Deprecated: Function create_function() is deprecated in /home/prolinuxhub/public_html/wp-content/plugins/synved-shortcodes/synved-shortcode/synved-shortcode.php on line 774

Deprecated: Function create_function() is deprecated in /home/prolinuxhub/public_html/wp-content/plugins/synved-shortcodes/synved-shortcode/synved-shortcode.php on line 774

Deprecated: Function create_function() is deprecated in /home/prolinuxhub/public_html/wp-content/plugins/synved-shortcodes/synved-shortcode/synved-shortcode.php on line 774

Deprecated: Function create_function() is deprecated in /home/prolinuxhub/public_html/wp-content/plugins/synved-shortcodes/synved-shortcode/synved-shortcode.php on line 937

Deprecated: Function create_function() is deprecated in /home/prolinuxhub/public_html/wp-content/plugins/synved-shortcodes/synved-shortcode/synved-shortcode.php on line 937

Deprecated: Function create_function() is deprecated in /home/prolinuxhub/public_html/wp-content/plugins/synved-shortcodes/synved-shortcode/synved-shortcode.php on line 937

Deprecated: Function create_function() is deprecated in /home/prolinuxhub/public_html/wp-content/plugins/synved-shortcodes/synved-shortcode/synved-shortcode.php on line 937

Deprecated: Function create_function() is deprecated in /home/prolinuxhub/public_html/wp-content/plugins/synved-shortcodes/synved-shortcode/synved-shortcode.php on line 937

Deprecated: Function create_function() is deprecated in /home/prolinuxhub/public_html/wp-content/plugins/synved-shortcodes/synved-shortcode/synved-shortcode.php on line 937

Deprecated: Function create_function() is deprecated in /home/prolinuxhub/public_html/wp-content/plugins/synved-shortcodes/synved-shortcode/synved-shortcode.php on line 937

Deprecated: Function create_function() is deprecated in /home/prolinuxhub/public_html/wp-content/plugins/synved-shortcodes/synved-shortcode/synved-shortcode.php on line 937

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798
Change email address from which Nagios sends messages – PROLINUXHUB
Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Notice: Trying to access array offset on value of type null in /home/prolinuxhub/public_html/wp-content/plugins/cta/classes/class.cta.render.php on line 492

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Change email address from which Nagios sends messages

In some cases you want to change default email address of anonymous@hostname from which Nagios sends notifications. This can easily be done by changing following directives in Nagios configuration files.
1. Open the main Nagios configuration file nagios.cfg and edit the line containing admin_email

vim nagios.cfg
admin_email=nagios@localhost  # change to your desired smtp address

2. Edit commands.cfg file and edit “notify-host-by-email” directive by adding -f$ADMINEMAIL$ at the end

vim commands.cfg
define command{
        command_name    notify-host-by-email
        command_line    /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$ -f$ADMINEMAIL$

2. Edit same file – commands.cfg and this time edit notify-service-by-email by adding -f$ADMINEMAIL$ at the end

define command{
        command_name    notify-service-by-email
        command_line    /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$\n" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$ -f$ADMINEMAIL$

3. Restart Nagios services

service nagios restart

You are done !


Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798