Hello Everybody,
I am using nagios to monitor more than 50 linux servers and its working perfectly.
Now I would like to get an email alert from for services on each day morning evenif the status is okay. is it possible to do with nagios?
Thanks in advance
send alert once in a day evenif the status is "OK"
Re: send alert once in a day evenif the status is "OK"
Just to clarify, are you looking to receive an OK email once a day?
If so, do you want to do so for specific services, or all services?
What is the use case for this?
If so, do you want to do so for specific services, or all services?
What is the use case for this?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: send alert once in a day evenif the status is "OK"
Thanks for you reply.
yes, i need to receive OK email once a day.
I want to do this for only one service.
yes, i need to receive OK email once a day.
I want to do this for only one service.
-
jdalrymple
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: send alert once in a day evenif the status is "OK"
There is no simple way to do this - especially if you want it to be done at a set time each day. The best method that comes to mind would be to write a script in your language of choice that parses the status.dat file and polls the information you seek and E-mails you. I've searched the exchange for such a script and don't see one so you may have to write it yourself or aggregate a group of similarly functioning scripts to achieve your goal.
-
AlexZ0nder
- Posts: 2
- Joined: Tue Jan 19, 2016 12:18 am
Re: send alert once in a day evenif the status is "OK"
Hi everyone!
Today I tried to resolve this issue and realized that we have time periods in Nagios and what if you could create new time period for one hour in the morning for every day... and set this time period in your service as this one.
I have created one like this and right now just waiting the result.
P.S. itzforu, please let me know if it will help you.
Today I tried to resolve this issue and realized that we have time periods in Nagios and what if you could create new time period for one hour in the morning for every day... and set this time period in your service as this one.
I have created one like this and right now just waiting the result.
P.S. itzforu, please let me know if it will help you.
Re: send alert once in a day evenif the status is "OK"
@AlexZ0nder thanks for the information. Let us know how it goes!
Former Nagios Employee.
me.
me.
-
AlexZ0nder
- Posts: 2
- Joined: Tue Jan 19, 2016 12:18 am
Re: send alert once in a day evenif the status is "OK"
Hi there!
So... about my thought... It's alive!!!
Here is my config files:
/usr/local/nagios/etc/services/puppet_filed_nodes_prod.cfg
/usr/local/nagios/etc/timeperiods.cfg
P.S. We use Nagios XI Version : 2012R2.9
So... about my thought... It's alive!!!
Here is my config files:
/usr/local/nagios/etc/services/puppet_filed_nodes_prod.cfg
Code: Select all
....
define service {
host_name prod-puppet
service_description Puppet failed nodes PROD
display_name Puppet_failed_nodes_PROD
check_command check_puppet_failed!!!!!!!!
initial_state u
max_check_attempts 5
check_interval 1
retry_interval 1
check_period 24x7
notification_interval 60
first_notification_delay 0
notification_period Once_a_day_morning
notification_options w,c,u,r,f,s,
notifications_enabled 1
contact_groups PROD
register 1
}
....
Code: Select all
....
define timeperiod {
timeperiod_name Once_a_day_morning
alias Once in a day in the morning
sunday 09:00-09:50
monday 09:00-09:50
tuesday 09:00-09:50
wednesday 09:00-09:50
thursday 09:00-09:50
friday 09:00-09:50
saturday 09:00-09:50
}
.....
Re: send alert once in a day evenif the status is "OK"
Is this working as expected then, or did you have a question about your configuration?
Former Nagios Employee