{"id":7562,"date":"2023-12-16T01:35:13","date_gmt":"2023-12-15T20:05:13","guid":{"rendered":"https:\/\/pheonixsolutions.com\/blog\/?p=7562"},"modified":"2023-12-16T01:36:34","modified_gmt":"2023-12-15T20:06:34","slug":"how-to-enable-email-notifications-for-the-nagios-alerts","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/blog\/how-to-enable-email-notifications-for-the-nagios-alerts\/","title":{"rendered":"How to enable email notifications for the Nagios alerts"},"content":{"rendered":"\n<p><strong>Introduction<\/strong><\/p>\n\n\n\n<p>Nagios is an open-source IT system monitoring tool. It sends alerts when critical infrastructure components fail and recover, providing administrators with notice of important events<\/p>\n\n\n\n<p><strong>Prerequisites<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>SSH (sudo ) access to the Nagios host server<\/li>\n\n\n\n<li>The Nagios host should have an SMTP service (postfix &#8211; default) in the active state<\/li>\n<\/ol>\n\n\n\n<p><strong>Implementation<\/strong><\/p>\n\n\n\n<p><strong>(1) Define email notification commands<br><\/strong><br>$ vi \/usr\/local\/nagios\/etc\/objects\/commands.cfg<\/p>\n\n\n\n<p>========<\/p>\n\n\n\n<p>Add \/edit the below lines<\/p>\n\n\n\n<p># &#8216;notify-host-by-email&#8217; command definition<\/p>\n\n\n\n<p>define command {<\/p>\n\n\n\n<p>command_name&nbsp; &nbsp; notify-host-by-email command_line&nbsp; &nbsp; \/usr\/bin\/printf &#8220;%b&#8221; &#8220;***** Nagios *****\\n\\nNotification Type: $NOTIFICATIONTYPE$\\nHost: $HOSTNAME$\\nState: $HOSTSTATE$\\nAddress: $HOSTADDRESS$\\nInfo: $HOSTOUTPUT$\\n\\nDate\/Time: $LONGDATETIME$\\n&#8221; | mail -s &#8220;** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **&#8221; $CONTACTEMAIL$}<\/p>\n\n\n\n<p># &#8216;notify-service-by-email&#8217; command definition<\/p>\n\n\n\n<p>define command {<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;command_name&nbsp; &nbsp; notify-service-by-email&nbsp; &nbsp; command_line&nbsp; &nbsp; \/usr\/bin\/printf &#8220;%b&#8221; &#8220;***** 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&#8221; | mail -s &#8220;** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$\/$SERVICEDESC$ is $SERVICESTATE$ **&#8221; $CONTACTEMAIL$}<\/p>\n\n\n\n<p>=========<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/T9FY_ssuo4eVIM1Gu6Z8r6krkxV5hjQ9zx0hPqjJR-SQp5n3CyveN1kB0-29SzznHM9g5nx17b7ch2hBA6aP2Kmcek3pLsu_DdleKcqPawSjWOl2NKgMhS2r1xlumO1RmizpJtISdJ7k8gZtZs8yipg\" width=\"624\" height=\"172\"><\/p>\n\n\n\n<p><strong>(2) Define email contacts and groups<\/strong><\/p>\n\n\n\n<p>$ vi \/usr\/local\/nagios\/etc\/objects\/contacts.cfg<\/p>\n\n\n\n<p>Add\/edit the below lines<\/p>\n\n\n\n<p>define contact {<\/p>\n\n\n\n<p>\u00a0\u00a0\u00a0\u00a0contact_name\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0nagiosadmin\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/p>\n\n\n\n<p>\u00a0\u00a0\u00a0\u00a0use \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0            generic-contact\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/p>\n\n\n\n<p>\u00a0\u00a0\u00a0\u00a0alias \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0            Nagios Admin\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/p>\n\n\n\n<p>\u00a0\u00a0\u00a0\u00a0email \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0           user@email.com ; &lt;&lt;***** CHANGE THIS TO YOUR EMAIL ADDRESS ******<\/p>\n\n\n\n<p>}<\/p>\n\n\n\n<p>############### NEW CONTACT ###################<\/p>\n\n\n\n<p>define contact<\/p>\n\n\n\n<p>{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/p>\n\n\n\n<p>contact_name\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0                   contact-name\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/p>\n\n\n\n<p>use \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0                               generic-contact\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/p>\n\n\n\n<p>alias \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0                               Contact Name\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/p>\n\n\n\n<p>email \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0                              username1@email.com\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/p>\n\n\n\n<p>service_notification_commands \u00a0    notify-service-by-email\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/p>\n\n\n\n<p>host_notification_commands\u00a0 \u00a0 \u00a0       notify-host-by-email\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/p>\n\n\n\n<p>service_notification_period \u00a0 \u00a0            24\u00d77\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/p>\n\n\n\n<p>host_notification_period\u00a0 \u00a0 \u00a0 \u00a0               24\u00d77\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/p>\n\n\n\n<p>service_notification_options\u00a0 \u00a0           w,u,c,r,f\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/p>\n\n\n\n<p>host_notification_options \u00a0 \u00a0 \u00a0              d,u,r,f<\/p>\n\n\n\n<p>}<\/p>\n\n\n\n<p>############### ###################<\/p>\n\n\n\n<p>Modify the \u201ccontact_name\u201d and \u201cemail\u201d addresses as per the requirement\u00a0<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>w = notify on warning states<\/p>\n\n\n\n<p>c = critical states<\/p>\n\n\n\n<p>r = recovery<\/p>\n\n\n\n<p>f = start\/stop of flapping<\/p>\n\n\n\n<p>d = notify on down states<\/p>\n\n\n\n<p>u = notify on unreachable states<\/p>\n\n\n\n<p>s = notify on stopped states<\/p>\n\n\n\n<p><strong>(3) Define the email group to which the mail needs to be sent<\/strong><\/p>\n\n\n\n<p>$ vi \/usr\/local\/nagios\/etc\/objects\/contacts.cfg<\/p>\n\n\n\n<p>Add\/edit the below lines<\/p>\n\n\n\n<p>############# NEW CONTACT GROUPS ##############<\/p>\n\n\n\n<p>define contactgroup{<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;contactgroup_name &nbsp; &nbsp; &nbsp; admins<\/p>\n\n\n\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0alias \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0                   Nagios Administrators<\/p>\n\n\n\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0members \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0             contact-name,mailadmin,nagiosadmin<\/p>\n\n\n\n<p>}<\/p>\n\n\n\n<p>###############################################<\/p>\n\n\n\n<p><strong>(4) Define contact details in the host and service configuration<\/strong><\/p>\n\n\n\n<p>$ vi \/usr\/local\/nagios\/etc\/hosts\/cl2.cfg<\/p>\n\n\n\n<p># Host configuration Section <br>define host <br>{ <br>use                                  linux-server <br>host_name                    hostname <br>alias                                alias-name<br>Server address            IP <br>register                          1 <br>contact_groups           admins <br>}<br><br><strong>(5) Verify the Nagios configuration and check for error<\/strong><\/p>\n\n\n\n<p>\/usr\/local\/nagios\/bin\/nagios -v \/usr\/local\/nagios\/etc\/nagios.cfg<\/p>\n\n\n\n<p><strong>(6) Restart Nagios server <\/strong><\/p>\n\n\n\n<p>$ systemctl restart nagios<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Nagios is an open-source IT system monitoring tool. It sends alerts when critical infrastructure components fail and recover, providing administrators with notice of important events Prerequisites Implementation (1) Define email notification commands$ vi \/usr\/local\/nagios\/etc\/objects\/commands.cfg ======== Add \/edit the below lines # &#8216;notify-host-by-email&#8217; command definition define command { command_name&nbsp; &nbsp;&hellip; <a href=\"https:\/\/pheonixsolutions.com\/blog\/how-to-enable-email-notifications-for-the-nagios-alerts\/\" class=\"more-link read-more\" rel=\"bookmark\">Continue Reading <span class=\"screen-reader-text\">How to enable email notifications for the Nagios alerts<\/span><i class=\"fa fa-arrow-right\"><\/i><\/a><\/p>\n","protected":false},"author":495,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[285],"tags":[984],"class_list":{"0":"post-7562","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"hentry","6":"category-postfix","7":"tag-email-notifications-for-the-nagios-alerts","8":"h-entry","10":"h-as-article"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Pheonix Solutions - We Empower Your Business Growth<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/pheonixsolutions.com\/blog\/how-to-enable-email-notifications-for-the-nagios-alerts\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Pheonix Solutions - We Empower Your Business Growth\" \/>\n<meta property=\"og:description\" content=\"Introduction Nagios is an open-source IT system monitoring tool. It sends alerts when critical infrastructure components fail and recover, providing administrators with notice of important events Prerequisites Implementation (1) Define email notification commands$ vi \/usr\/local\/nagios\/etc\/objects\/commands.cfg ======== Add \/edit the below lines # &#8216;notify-host-by-email&#8217; command definition define command { command_name&nbsp; &nbsp;&hellip; Continue Reading How to enable email notifications for the Nagios alerts\" \/>\n<meta property=\"og:url\" content=\"https:\/\/pheonixsolutions.com\/blog\/how-to-enable-email-notifications-for-the-nagios-alerts\/\" \/>\n<meta property=\"og:site_name\" content=\"PHEONIXSOLUTIONS\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/PheonixSolutions-209942982759387\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-12-15T20:05:13+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-15T20:06:34+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/lh7-us.googleusercontent.com\/T9FY_ssuo4eVIM1Gu6Z8r6krkxV5hjQ9zx0hPqjJR-SQp5n3CyveN1kB0-29SzznHM9g5nx17b7ch2hBA6aP2Kmcek3pLsu_DdleKcqPawSjWOl2NKgMhS2r1xlumO1RmizpJtISdJ7k8gZtZs8yipg\" \/>\n<meta name=\"author\" content=\"meenakshi k\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@pheonixsolution\" \/>\n<meta name=\"twitter:site\" content=\"@pheonixsolution\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"meenakshi k\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/how-to-enable-email-notifications-for-the-nagios-alerts\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/how-to-enable-email-notifications-for-the-nagios-alerts\\\/\"},\"author\":{\"name\":\"meenakshi k\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d573de3a2c02cbeca49e90581a88b98f\"},\"headline\":\"How to enable email notifications for the Nagios alerts\",\"datePublished\":\"2023-12-15T20:05:13+00:00\",\"dateModified\":\"2023-12-15T20:06:34+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/how-to-enable-email-notifications-for-the-nagios-alerts\\\/\"},\"wordCount\":427,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/how-to-enable-email-notifications-for-the-nagios-alerts\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/lh7-us.googleusercontent.com\\\/T9FY_ssuo4eVIM1Gu6Z8r6krkxV5hjQ9zx0hPqjJR-SQp5n3CyveN1kB0-29SzznHM9g5nx17b7ch2hBA6aP2Kmcek3pLsu_DdleKcqPawSjWOl2NKgMhS2r1xlumO1RmizpJtISdJ7k8gZtZs8yipg\",\"keywords\":[\"email notifications for the Nagios alerts\"],\"articleSection\":[\"Postfix\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/how-to-enable-email-notifications-for-the-nagios-alerts\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/how-to-enable-email-notifications-for-the-nagios-alerts\\\/\",\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/how-to-enable-email-notifications-for-the-nagios-alerts\\\/\",\"name\":\"Pheonix Solutions - We Empower Your Business Growth\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/how-to-enable-email-notifications-for-the-nagios-alerts\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/how-to-enable-email-notifications-for-the-nagios-alerts\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/lh7-us.googleusercontent.com\\\/T9FY_ssuo4eVIM1Gu6Z8r6krkxV5hjQ9zx0hPqjJR-SQp5n3CyveN1kB0-29SzznHM9g5nx17b7ch2hBA6aP2Kmcek3pLsu_DdleKcqPawSjWOl2NKgMhS2r1xlumO1RmizpJtISdJ7k8gZtZs8yipg\",\"datePublished\":\"2023-12-15T20:05:13+00:00\",\"dateModified\":\"2023-12-15T20:06:34+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/how-to-enable-email-notifications-for-the-nagios-alerts\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/how-to-enable-email-notifications-for-the-nagios-alerts\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/how-to-enable-email-notifications-for-the-nagios-alerts\\\/#primaryimage\",\"url\":\"https:\\\/\\\/lh7-us.googleusercontent.com\\\/T9FY_ssuo4eVIM1Gu6Z8r6krkxV5hjQ9zx0hPqjJR-SQp5n3CyveN1kB0-29SzznHM9g5nx17b7ch2hBA6aP2Kmcek3pLsu_DdleKcqPawSjWOl2NKgMhS2r1xlumO1RmizpJtISdJ7k8gZtZs8yipg\",\"contentUrl\":\"https:\\\/\\\/lh7-us.googleusercontent.com\\\/T9FY_ssuo4eVIM1Gu6Z8r6krkxV5hjQ9zx0hPqjJR-SQp5n3CyveN1kB0-29SzznHM9g5nx17b7ch2hBA6aP2Kmcek3pLsu_DdleKcqPawSjWOl2NKgMhS2r1xlumO1RmizpJtISdJ7k8gZtZs8yipg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/how-to-enable-email-notifications-for-the-nagios-alerts\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to enable email notifications for the Nagios alerts\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/\",\"name\":\"Pheonix Solutions\",\"description\":\"We Empower Your Business Growth\",\"publisher\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#organization\",\"name\":\"PheonixSolutions\",\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/12\\\/logo.png\",\"contentUrl\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/12\\\/logo.png\",\"width\":454,\"height\":300,\"caption\":\"PheonixSolutions\"},\"image\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/PheonixSolutions-209942982759387\\\/\",\"https:\\\/\\\/x.com\\\/pheonixsolution\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d573de3a2c02cbeca49e90581a88b98f\",\"name\":\"meenakshi k\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/17c0a3923b9a31a41d8de2fdc928e514efe879fe17b6e5d2814b7f81ed2356e5?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/17c0a3923b9a31a41d8de2fdc928e514efe879fe17b6e5d2814b7f81ed2356e5?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/17c0a3923b9a31a41d8de2fdc928e514efe879fe17b6e5d2814b7f81ed2356e5?s=96&r=g\",\"caption\":\"meenakshi k\"},\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/author\\\/meenakshi\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Pheonix Solutions - We Empower Your Business Growth","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/pheonixsolutions.com\/blog\/how-to-enable-email-notifications-for-the-nagios-alerts\/","og_locale":"en_US","og_type":"article","og_title":"Pheonix Solutions - We Empower Your Business Growth","og_description":"Introduction Nagios is an open-source IT system monitoring tool. It sends alerts when critical infrastructure components fail and recover, providing administrators with notice of important events Prerequisites Implementation (1) Define email notification commands$ vi \/usr\/local\/nagios\/etc\/objects\/commands.cfg ======== Add \/edit the below lines # &#8216;notify-host-by-email&#8217; command definition define command { command_name&nbsp; &nbsp;&hellip; Continue Reading How to enable email notifications for the Nagios alerts","og_url":"https:\/\/pheonixsolutions.com\/blog\/how-to-enable-email-notifications-for-the-nagios-alerts\/","og_site_name":"PHEONIXSOLUTIONS","article_publisher":"https:\/\/www.facebook.com\/PheonixSolutions-209942982759387\/","article_published_time":"2023-12-15T20:05:13+00:00","article_modified_time":"2023-12-15T20:06:34+00:00","og_image":[{"url":"https:\/\/lh7-us.googleusercontent.com\/T9FY_ssuo4eVIM1Gu6Z8r6krkxV5hjQ9zx0hPqjJR-SQp5n3CyveN1kB0-29SzznHM9g5nx17b7ch2hBA6aP2Kmcek3pLsu_DdleKcqPawSjWOl2NKgMhS2r1xlumO1RmizpJtISdJ7k8gZtZs8yipg","type":"","width":"","height":""}],"author":"meenakshi k","twitter_card":"summary_large_image","twitter_creator":"@pheonixsolution","twitter_site":"@pheonixsolution","twitter_misc":{"Written by":"meenakshi k","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/pheonixsolutions.com\/blog\/how-to-enable-email-notifications-for-the-nagios-alerts\/#article","isPartOf":{"@id":"https:\/\/pheonixsolutions.com\/blog\/how-to-enable-email-notifications-for-the-nagios-alerts\/"},"author":{"name":"meenakshi k","@id":"https:\/\/pheonixsolutions.com\/blog\/#\/schema\/person\/d573de3a2c02cbeca49e90581a88b98f"},"headline":"How to enable email notifications for the Nagios alerts","datePublished":"2023-12-15T20:05:13+00:00","dateModified":"2023-12-15T20:06:34+00:00","mainEntityOfPage":{"@id":"https:\/\/pheonixsolutions.com\/blog\/how-to-enable-email-notifications-for-the-nagios-alerts\/"},"wordCount":427,"commentCount":0,"publisher":{"@id":"https:\/\/pheonixsolutions.com\/blog\/#organization"},"image":{"@id":"https:\/\/pheonixsolutions.com\/blog\/how-to-enable-email-notifications-for-the-nagios-alerts\/#primaryimage"},"thumbnailUrl":"https:\/\/lh7-us.googleusercontent.com\/T9FY_ssuo4eVIM1Gu6Z8r6krkxV5hjQ9zx0hPqjJR-SQp5n3CyveN1kB0-29SzznHM9g5nx17b7ch2hBA6aP2Kmcek3pLsu_DdleKcqPawSjWOl2NKgMhS2r1xlumO1RmizpJtISdJ7k8gZtZs8yipg","keywords":["email notifications for the Nagios alerts"],"articleSection":["Postfix"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/pheonixsolutions.com\/blog\/how-to-enable-email-notifications-for-the-nagios-alerts\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/pheonixsolutions.com\/blog\/how-to-enable-email-notifications-for-the-nagios-alerts\/","url":"https:\/\/pheonixsolutions.com\/blog\/how-to-enable-email-notifications-for-the-nagios-alerts\/","name":"Pheonix Solutions - We Empower Your Business Growth","isPartOf":{"@id":"https:\/\/pheonixsolutions.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/pheonixsolutions.com\/blog\/how-to-enable-email-notifications-for-the-nagios-alerts\/#primaryimage"},"image":{"@id":"https:\/\/pheonixsolutions.com\/blog\/how-to-enable-email-notifications-for-the-nagios-alerts\/#primaryimage"},"thumbnailUrl":"https:\/\/lh7-us.googleusercontent.com\/T9FY_ssuo4eVIM1Gu6Z8r6krkxV5hjQ9zx0hPqjJR-SQp5n3CyveN1kB0-29SzznHM9g5nx17b7ch2hBA6aP2Kmcek3pLsu_DdleKcqPawSjWOl2NKgMhS2r1xlumO1RmizpJtISdJ7k8gZtZs8yipg","datePublished":"2023-12-15T20:05:13+00:00","dateModified":"2023-12-15T20:06:34+00:00","breadcrumb":{"@id":"https:\/\/pheonixsolutions.com\/blog\/how-to-enable-email-notifications-for-the-nagios-alerts\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/pheonixsolutions.com\/blog\/how-to-enable-email-notifications-for-the-nagios-alerts\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/pheonixsolutions.com\/blog\/how-to-enable-email-notifications-for-the-nagios-alerts\/#primaryimage","url":"https:\/\/lh7-us.googleusercontent.com\/T9FY_ssuo4eVIM1Gu6Z8r6krkxV5hjQ9zx0hPqjJR-SQp5n3CyveN1kB0-29SzznHM9g5nx17b7ch2hBA6aP2Kmcek3pLsu_DdleKcqPawSjWOl2NKgMhS2r1xlumO1RmizpJtISdJ7k8gZtZs8yipg","contentUrl":"https:\/\/lh7-us.googleusercontent.com\/T9FY_ssuo4eVIM1Gu6Z8r6krkxV5hjQ9zx0hPqjJR-SQp5n3CyveN1kB0-29SzznHM9g5nx17b7ch2hBA6aP2Kmcek3pLsu_DdleKcqPawSjWOl2NKgMhS2r1xlumO1RmizpJtISdJ7k8gZtZs8yipg"},{"@type":"BreadcrumbList","@id":"https:\/\/pheonixsolutions.com\/blog\/how-to-enable-email-notifications-for-the-nagios-alerts\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/pheonixsolutions.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to enable email notifications for the Nagios alerts"}]},{"@type":"WebSite","@id":"https:\/\/pheonixsolutions.com\/blog\/#website","url":"https:\/\/pheonixsolutions.com\/blog\/","name":"Pheonix Solutions","description":"We Empower Your Business Growth","publisher":{"@id":"https:\/\/pheonixsolutions.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/pheonixsolutions.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/pheonixsolutions.com\/blog\/#organization","name":"PheonixSolutions","url":"https:\/\/pheonixsolutions.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/pheonixsolutions.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2016\/12\/logo.png","contentUrl":"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2016\/12\/logo.png","width":454,"height":300,"caption":"PheonixSolutions"},"image":{"@id":"https:\/\/pheonixsolutions.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/PheonixSolutions-209942982759387\/","https:\/\/x.com\/pheonixsolution"]},{"@type":"Person","@id":"https:\/\/pheonixsolutions.com\/blog\/#\/schema\/person\/d573de3a2c02cbeca49e90581a88b98f","name":"meenakshi k","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/17c0a3923b9a31a41d8de2fdc928e514efe879fe17b6e5d2814b7f81ed2356e5?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/17c0a3923b9a31a41d8de2fdc928e514efe879fe17b6e5d2814b7f81ed2356e5?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/17c0a3923b9a31a41d8de2fdc928e514efe879fe17b6e5d2814b7f81ed2356e5?s=96&r=g","caption":"meenakshi k"},"url":"https:\/\/pheonixsolutions.com\/blog\/author\/meenakshi\/"}]}},"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p7F4uM-1XY","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/7562","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/users\/495"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=7562"}],"version-history":[{"count":0,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/7562\/revisions"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=7562"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=7562"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=7562"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}