email id of Gmail for sending nagios core email alerts
email id of Gmail for sending nagios core email alerts
Hi Team,
Sorry for posting again.
I configured Nagios Core and its working as expected but unable to configure Email alerts with my Gmail account like (abc.def123@gmail.com).
I tried to search for configuring Email ID of Gmail for sending Email alerts in Nagios Core but unable to understands and do it.
Hence requesting you to help me Step by Step Guideline for the same.
Thank you for advanced.
Regards
Somnath Pandey
Sorry for posting again.
I configured Nagios Core and its working as expected but unable to configure Email alerts with my Gmail account like (abc.def123@gmail.com).
I tried to search for configuring Email ID of Gmail for sending Email alerts in Nagios Core but unable to understands and do it.
Hence requesting you to help me Step by Step Guideline for the same.
Thank you for advanced.
Regards
Somnath Pandey
Re: email id of Gmail for sending nagios core email alerts
Not sure what you mean. You need to define a contact with an email address of user@gmail.com and then set alerts to send notifications to that user. Gmail email addresses are just like any other.
Re: email id of Gmail for sending nagios core email alerts
Thanks for the assist, @eloyd! OP, please let us know if you need further assistance.
Former Nagios employee
Re: email id of Gmail for sending nagios core email alerts
Thanks for your reply.
I have to two system, In one installed Nagios Core and other is Windows Server 2012 R2. I want to get alerts from Nagios Server through Gmail ID(like abc@gmail.com) if something goes wrong in Windows Server 2012 R2 to other EMAIL ID(like def@gmail.com).
Here is my some cfg files please check and help me.
Contacts.cfg:
define contact {
contact_name nagiosadmin ; Short name of user
use generic-contact ; Inherit default values from generic-contact template (defined above)
alias Nagios Admin ; Full name of user
email abc@gmail.com ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******
service_notification_period 24x7 ; service notifications can be sent anytime
host_notification_period 24x7 ; host notifications can be sent anytime
service_notification_options w,u,c,r ; send notifications for all service states, flapping events, and scheduled downtime events
host_notification_options d,u,r ; send notifications for all host states, flapping events, and scheduled downtime events
service_notification_commands notify-service-by-email ; send service notifications via email
host_notification_commands notify-host-by-email ; send host notifications via email
}
I have to two system, In one installed Nagios Core and other is Windows Server 2012 R2. I want to get alerts from Nagios Server through Gmail ID(like abc@gmail.com) if something goes wrong in Windows Server 2012 R2 to other EMAIL ID(like def@gmail.com).
Here is my some cfg files please check and help me.
Contacts.cfg:
define contact {
contact_name nagiosadmin ; Short name of user
use generic-contact ; Inherit default values from generic-contact template (defined above)
alias Nagios Admin ; Full name of user
email abc@gmail.com ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******
service_notification_period 24x7 ; service notifications can be sent anytime
host_notification_period 24x7 ; host notifications can be sent anytime
service_notification_options w,u,c,r ; send notifications for all service states, flapping events, and scheduled downtime events
host_notification_options d,u,r ; send notifications for all host states, flapping events, and scheduled downtime events
service_notification_commands notify-service-by-email ; send service notifications via email
host_notification_commands notify-host-by-email ; send host notifications via email
}
Re: email id of Gmail for sending nagios core email alerts
Here is the windows.cfg file
define host{
use windows-server ; Inherit default values from a template
host_name DC-2012 ; The name we're giving to this host
alias My Windows Server ; A longer name associated with the host
address 192.168.0.125 ; IP address of the host
}
There are many services but all are like the same type configured which is defined below,
define service{
use generic-service
host_name DC-2012
service_description NSClient++ Version
check_command check_nt!CLIENTVERSION
}
Please let me know, what to do next.
define host{
use windows-server ; Inherit default values from a template
host_name DC-2012 ; The name we're giving to this host
alias My Windows Server ; A longer name associated with the host
address 192.168.0.125 ; IP address of the host
}
There are many services but all are like the same type configured which is defined below,
define service{
use generic-service
host_name DC-2012
service_description NSClient++ Version
check_command check_nt!CLIENTVERSION
}
Please let me know, what to do next.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: email id of Gmail for sending nagios core email alerts
So you would need to add the following to each of the hosts and services you want to be alerted for when they go into a non-OK state
So your host example would change to:
Once you have all the changes made, you will need to restart the nagios service and you should start getting alerts when hosts/services go in to HARD non-OK states
Code: Select all
contacts nagiosadmin
Code: Select all
define host{
use windows-server ; Inherit default values from a template
host_name DC-2012 ; The name we're giving to this host
alias My Windows Server ; A longer name associated with the host
address 192.168.0.125 ; IP address of the host
contacts nagiosadmin
}
Re: email id of Gmail for sending nagios core email alerts
Hi scottwilkerson,
I configured same as you told in the trial post. After that, I stop the service (World Wide Web Publishing Service) in Windows Server 2012 R2. As the service is stopped so the W3SVC goes Critical and I wait more than an hour but I did not get any notification from Nagios Core Server.
define host{
use windows-server ; Inherit default values from a template
host_name DC-2012 ; The name we're giving to this host
alias My Windows Server ; A longer name associated with the host
address 192.168.0.125 ; IP address of the host
contacts nagiosadmin
}
define service{
use generic-service
host_name DC-2012
service_description W3SVC
check_command check_nt!SERVICESTATE!-d SHOWALL -l W3SVC
contacts nagisoadmin
}
Please help me on the same.
Can you please let me know, I configured my Email ID (abc@gmail.com) in contacts.cfg in which we receive the notification. Let us suppose If I received then "What is the sender Mail ID"
Sorry in advance if it is the foolish question but I want to learn for my future.
I configured same as you told in the trial post. After that, I stop the service (World Wide Web Publishing Service) in Windows Server 2012 R2. As the service is stopped so the W3SVC goes Critical and I wait more than an hour but I did not get any notification from Nagios Core Server.
define host{
use windows-server ; Inherit default values from a template
host_name DC-2012 ; The name we're giving to this host
alias My Windows Server ; A longer name associated with the host
address 192.168.0.125 ; IP address of the host
contacts nagiosadmin
}
define service{
use generic-service
host_name DC-2012
service_description W3SVC
check_command check_nt!SERVICESTATE!-d SHOWALL -l W3SVC
contacts nagisoadmin
}
Please help me on the same.
Can you please let me know, I configured my Email ID (abc@gmail.com) in contacts.cfg in which we receive the notification. Let us suppose If I received then "What is the sender Mail ID"
Sorry in advance if it is the foolish question but I want to learn for my future.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: email id of Gmail for sending nagios core email alerts
It should once it has been down for about 5 minutes based on a default configuration.cssp wrote:Can you please let me know, I configured my Email ID (abc@gmail.com) in contacts.cfg in which we receive the notification.
The from address will depend on what you have setup in the mail program on your server, may be sendmail or postfix
Re: email id of Gmail for sending nagios core email alerts
Thank you so much for your help.
Now I receiving the notification if something non-OK or Critical on the server after configuring Postfix Relay through Gmail.
You can lock the post. Really I am very happy with your everything (Like..Product/Service/Support ).
Now I receiving the notification if something non-OK or Critical on the server after configuring Postfix Relay through Gmail.
You can lock the post. Really I am very happy with your everything (Like..Product/Service/Support ).
Re: email id of Gmail for sending nagios core email alerts
Glad we could help you out!