LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Nagios - Can I configure Nagios to do this? (https://www.linuxquestions.org/questions/linux-newbie-8/nagios-can-i-configure-nagios-to-do-this-891878/)

jprosiak 07-15-2011 08:20 AM

Nagios - Can I configure Nagios to do this?
 
So we monitor all of our disk space, but only get pages for critical. What we would like to do is have one email sent to our team every month with all the "Warnings" for our disk. I have been searching and haven't found a way to do this. Any suggestions?

never say never 07-15-2011 10:52 AM

I don't think there is a way to do that monthly from within Nagios. You would need to write a script to scrape that info and send it out.

However, from within Nagios you certainly could set up weekly notifications. Just set a Timeperiod that is something like:

Code:

define timeperiod{
        timeperiod_name Week
        alias          Once a Week Notifications
        sunday          00:00-01:00
        monday          00:00-00:00
        tuesday        00:00-00:00
        wednesday      00:00-00:00
        thursday        00:00-00:00
        friday          00:00-00:00
        saturday        00:00-00:00
        }

Next set up a special contact group:

Code:

define contact{
        contact_name                    Weekly
        alias                          Weekly Notify
        service_notification_period    Week
        host_notification_period        Week
        service_notification_options    w
        host_notification_options     
        service_notification_commands  notify-service-by-email
        host_notification_commands      notify-host-by-email
        email                          notifygroup@yourcompany.com
        }

Notice I chose only to be notified of warnings.

Finally add the contact group to the services you wish to monitor

Code:

define service{
        use                            generic-service        ; Name of service template to use
        host_name                      server1.yourcompany
        service_description            DRIVESPACE
        is_volatile                    0
        check_period                    24x7
        max_check_attempts              3
        normal_check_interval          2
        retry_check_interval            1
        contact_groups                  admins, Week
        notification_interval          120
        notification_period            extended
        notification_options            w,u,c,r
        check_command                  check_ping!100.0,20%!500.0,60%
        }

Notice I added the contact group week.

You might have to mess with the times so that you get a notification only once, but that would depend on how you have notifications set up now.

Anyway, I think this gives you what you want on a weekly basis. If you really wanted to be super fancy I guess you could create a script to restart nagios using different config files for one day a month or something.

Hope this helps.


All times are GMT -5. The time now is 11:05 AM.