Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Now I've got 10 serviced in error state, so I received 10 email about problem every hour. I now the problems. I don't need notifications every hour, or two. I need custom solution for that
Could it be possible to implement such workflow ?
From first error till 24h after that = one email per hour
After 24h till one week = one email every 6 hours
After that until solution = one email per day
Set it up with wildcards so it applies to all hosts. Count the number of emails you'll receive in 24 hours (looks like 24), then have the first escalation kick in. Define it to send one email every 6 hours, and count the total number (24 + (4perday)(6days)) that will be received over the course of the week. Then define a 2nd escalation that comes into effect after that amount of emails (looks like 48, but might be +/-1). Define that to go once every 24 hours forever.
All of this is found on your nagios site as well in the documentation. You could have found it if you did a bit of reading.
But I've got many hosts. If I use hostescalation I get info about host problem (reachable or not) or service problems also?
Totally I have 30 services on 10 hosts but 10 of them are in error state. Should I use service escalation? Should I define escalation for each service? If I define escalation, what happened with default e-mail notifications?
The use of the wildcard (*) will work for all services, or hosts. Some people report that instead of a wildcard, they have to use .* to have it work, but one of those 2 will send escalations for every service. You could also form a a list if you want, like have one escalation for smtp,pop3,imap and a different one for http. You can also define host escalations.
Again, check your documentation. Nagios is not new technology, there are gigabytes of data all across the internet about its use and configuration. All I did to find the example above was to put "nagios email escalation" into google (without the quotes).
By the way, having 10 hosts/services in an error state state probably indicates you either have bad settings for your nagios install or your network is in very bad shape!
I've been looking for Details about service escalation, but I don't have really a lot of time (other task to do).
Generally I don't use default Nagios plugins: I develop 5 or 6 custom plugins. 10 plugins in error state means only that host has problem with low disk space or some program just stop working. I tried to create Service Escalation Definition:
Send one e-mail every 6 hours after 24 e-mails already sent.
Last notification is after one week.
The hostgroup is fine, as long as the only hostgroup you want this done for is remote-servers. Service_description is also fine, but some people reported that they need .* instead of * to affect all hosts. You also have first_notification fine, but your last_notification is way off. You counted as if you were still getting 24 emails a day. Once this escalation kicks in, you only get 4 emails a day, one every six hours, which you setup correctly with a notification_interval of 360. With one email every 6 hours, you only get 4 emails a day. You want this to start at the beginning of the 2nd day, and go until the end of the 7th, that is 6 days of 4 emails a day. 6x4 is 24. The 24 in this escalation plus the 24 in the first day is 48 emails. So your last notification isn't 168, it is 48.
Interestingly, you start the final escalation correctly, which required the 48 you somehow changed to 168 above, but you're miles off the last_notification. At 1 email a day, the most you'll get in a year is 365. Since the first week of your year is 7 days less, your "year" of emails would be (365-7) = 358, and 358+48 (from the more active emails in the first week) = 406. If you sent 525,000 emails at 1 a day, you'd be sending a daily email for almost 1500 years! Your computer would be dust!
I've been testing this approach durning Christmas but it fails. I receive messages every hour. Is this working even after Nagios restart?
I can use other solution. Now I have 70 hosts with 5 services on each host. I want to send report about each host everyday about midnight. I know how to send email every day but not every day at midnight.