Nagios Notifications not sending
Re: Nagios Notifications not sending
Guys
I now can send email internally and externally via command line using mailx
Setup the command in Nagios with the -r
All looks good.
Problem is I am still not getting notified by either text or email when I get an alarm on Nagios.
I checked the mail queue and I have no new messages queued up. just a couple of old ones during testing still there,
What else can I check? Note I recently setup escalations
Thoughts?
I now can send email internally and externally via command line using mailx
Setup the command in Nagios with the -r
All looks good.
Problem is I am still not getting notified by either text or email when I get an alarm on Nagios.
I checked the mail queue and I have no new messages queued up. just a couple of old ones during testing still there,
What else can I check? Note I recently setup escalations
Thoughts?
- tacolover101
- Posts: 432
- Joined: Mon Apr 10, 2017 11:55 am
Re: Nagios Notifications not sending
can you please show us your mailx commands, and also your objects.cache? (/usr/local/nagios/var/objects.cache)
what contact is not receiving notifications properly, and for what host & service?
that should be enough to tack it down.
what contact is not receiving notifications properly, and for what host & service?
that should be enough to tack it down.
Re: Nagios Notifications not sending
This command line works
echo "test text2" | mailx -s testtext -r support@tgcsnet.com 3052400267@vtext.com
I am now getting email alerts but randomly not all the alerts are sending notifications.
I and not getting and text alerts at all I set up a separate group for them maybe that's the problem?
contact group admins works sometimes. group textit does not at all
My escalations config
I attached my objects.cache file as a txt file hope this helps
On my checks for the computers some have notification_interval set to 0 and others do not have that setting ????
hope this helps
echo "test text2" | mailx -s testtext -r support@tgcsnet.com 3052400267@vtext.com
I am now getting email alerts but randomly not all the alerts are sending notifications.
I and not getting and text alerts at all I set up a separate group for them maybe that's the problem?
Code: Select all
define contact{
contact_name support
alias Network Support
service_notification_period 24x7
host_notification_period 24x7
service_notification_options c,r
host_notification_options d,r
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
email systems-alert@tgcsnet.com
}
define contact{
contact_name text305
alias Network Support
service_notification_period 24x7
host_notification_period 24x7
service_notification_options c,r
host_notification_options d,r
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
email 3052400267@vtext.com
}
define contact{
contact_name text551
alias Network Support
service_notification_period 24x7
host_notification_period 24x7
service_notification_options c,r
host_notification_options d,r
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
email 5512068030@vtext.com
}
define contactgroup{
contactgroup_name admins
alias Nagios Administrators
members nagiosadmin, support, iosapp
}
define contactgroup{
contactgroup_name textit
alias Nagios Admins
members text305, text551
}
My escalations config
Code: Select all
define serviceescalation{
hostgroup_name windows-servers,windows-servers-vm,linux-servers
service_description *
first_notification 24
last_notification 48
notification_interval 360
contact_groups admins,textit
}
define serviceescalation{
hostgroup_name Windows-Desktops,windows-desktops-vm
service_description *
first_notification 24
last_notification 48
notification_interval 360
contact_groups admins,textit
}
define hostescalation{
hostgroup_name windows-servers,windows-servers-vm,linux-servers
first_notification 5
last_notification 8
notification_interval 60
contact_groups admins,textit
}
define hostescalation{
hostgroup_name Windows-Desktops,windows-desktops-vm
first_notification 5
last_notification 8
notification_interval 60
contact_groups admins,textit
}
define hostescalation{
hostgroup_name nas-storage,network-printers,switches
first_notification 5
last_notification 8
notification_interval 60
contact_groups admins,textit
}
~
On my checks for the computers some have notification_interval set to 0 and others do not have that setting ????
hope this helps
- Attachments
-
- objects-cache.txt
- objects.cache
- (841.82 KiB) Downloaded 396 times
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Nagios Notifications not sending
text305 is only part of the textit contact group, when I searched your objects.cached, textit is only attached to escalations most of which have a first_notification of 24
This means 24 regular notifications have to go out before this escalation triggers.
For everything where notification_interval = 0 this will never happen, because these will not renotify
This means 24 regular notifications have to go out before this escalation triggers.
For everything where notification_interval = 0 this will never happen, because these will not renotify
Re: Nagios Notifications not sending
Thanks
Should I add contact_groups admins, textit to each of my hosts ?
If I do that I do not need to add contact_groups to all my services correct?
I am not sure why I made the notification_interval = 0 I will change them to the default 60
Thoughts
Update I now remember why I changed the notification_interval to 0 I have a check_Interval = 1440 or 10080 or 1 or 360 etc
How would I setup notification_internavals with values like that?
Should I add contact_groups admins, textit to each of my hosts ?
If I do that I do not need to add contact_groups to all my services correct?
I am not sure why I made the notification_interval = 0 I will change them to the default 60
Thoughts
Update I now remember why I changed the notification_interval to 0 I have a check_Interval = 1440 or 10080 or 1 or 360 etc
How would I setup notification_internavals with values like that?
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Nagios Notifications not sending
that would be correct, except, if you manually add a contact to a service you would also want to add the contact group because it would break the host-> service implied inheritance.kwhogster wrote:Should I add contact_groups admins, textit to each of my hosts ?
If I do that I do not need to add contact_groups to all my services correct?
Not sure of your desired affect, but setting notification_interval to 0 disables re-notifications. You would want to set this value to the frequency you want to be re-notifiedkwhogster wrote: Update I now remember why I changed the notification_interval to 0 I have a check_Interval = 1440 or 10080 or 1 or 360 etc
How would I setup notification_internavals with values like that?
Re: Nagios Notifications not sending
I get this when I change the notification_interval to the default value of 60
Warning: Service 'NSClient++ Version' on host 'TGKW001' has a notification interval less than its check interval! Notifications are only re-sent after checks are made, so the effective notification interval will be that of the check interval.
define service{
use generic-service
host_name TGKW001
service_description NSClient++ Version
servicegroups nsclients
check_interval 10080
notification_interval 60
check_command check_nt!CLIENTVERSION
}
If I set it to 0 no warnings. I only need to check this once a week as 10080 means.
If I make the value the same as the check_interval 10080 then it does not give a warning either
But what does that mean? Will I only get a notification once a week also?
Has any one set the check_interval to a higher value than the default?
Thanks
Warning: Service 'NSClient++ Version' on host 'TGKW001' has a notification interval less than its check interval! Notifications are only re-sent after checks are made, so the effective notification interval will be that of the check interval.
define service{
use generic-service
host_name TGKW001
service_description NSClient++ Version
servicegroups nsclients
check_interval 10080
notification_interval 60
check_command check_nt!CLIENTVERSION
}
If I set it to 0 no warnings. I only need to check this once a week as 10080 means.
If I make the value the same as the check_interval 10080 then it does not give a warning either
But what does that mean? Will I only get a notification once a week also?
Has any one set the check_interval to a higher value than the default?
Thanks
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Nagios Notifications not sending
this is just a warning, AKA a reminder, not to expect notifications more frequently than your check intervalkwhogster wrote:Warning: Service 'NSClient++ Version' on host 'TGKW001' has a notification interval less than its check interval! Notifications are only re-sent after checks are made, so the effective notification interval will be that of the check interval.
It will act the same way as if the notification_interval was less than the check_interval UNLESS the notification_interval is set to 0 which is special and disables re-notifications.kwhogster wrote:If I make the value the same as the check_interval 10080 then it does not give a warning either
But what does that mean?
yes.kwhogster wrote:Will I only get a notification once a week also?
yes all the time, you just need to know that you will never get a notification more frequently than you are allowing the check to run (check_interval)kwhogster wrote:Has any one set the check_interval to a higher value than the default?
Re: Nagios Notifications not sending
Cool
I will go thru all my checks
Will post results
Off to shovel snow now
I will go thru all my checks
Will post results
Off to shovel snow now
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Nagios Notifications not sending
let us know if we can be of further assistance