Mail reminded by sms or mail by drive limited

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Mail reminded by sms or mail by drive limited

Postby michaelpn » Tue Mar 13, 2018 6:44 am

Hi,
I would like be reminded when my drive space is for example under 5 GB at my Exchange Server.
How do I do this ?
Right now I'm being reminded if one or more Servers are down through my SMS Gateway :).
As written I would also like to be reminded by a sms or mail if my drive is under a curtained limited.
Now I get a yellow warning at my Email Server FGMAil3 "please see attachments"
Do I have to edit my "Commands.cfg" and my contacts.cfg.
I attach my commands and contact files so you can follow me.
Attachments
commands.cfg
(8.12 KiB) Downloaded 37 times
contacts.cfg
(3.58 KiB) Downloaded 40 times
Service Fmail3 Nagios..JPG
Michael Pierre
Forenede Gruppeliv
2500 Valby
Copenhagen
michaelpn
 
Posts: 44
Joined: Fri Jul 14, 2017 12:12 am

Re: Mail reminded by sms or mail by drive limited

Postby mcapra » Tue Mar 13, 2018 8:44 am

Here's the official documentation regarding notifications:
https://assets.nagios.com/downloads/nag ... tions.html

michaelpn wrote:Hi,
I would like be reminded when my drive space is for example under 5 GB at my Exchange Server.
How do I do this ?

Essentially, you can configure your host/service objects to trigger a notification whenever and however you like. The conditions under which a notification is triggered for a given host/service object are dictated in that object's configuration.

I notice all of your contact objects are configured to use the following host notification options:
Code: Select all
host_notification_period 24x7
host_notification_options d,u,r
host_notification_commands notify-host-by-sms,notify-host-by-email


There are also directives that dictate how service notifications are handled for a given contact; Directives like:
Code: Select all
service_notifications_enabled   [0/1]
service_notification_period   timeperiod_name
service_notification_options   [w,u,c,r,f,s,n]
service_notification_commands   command_name


I assume you are currently inheriting these options from the generic-contact template? Can you share a copy of the generic-contact contact definition?

michaelpn wrote:As written I would also like to be reminded by a sms or mail if my drive is under a curtained limited.

You could essentially copy your notify-host-by-sms command definition and modify it a bit to create a notify-service-by-sms command that uses slightly different macros that are more appropriate for service notifications. Then, once that command definition is finished, assign it to your contact objects via the service_notification_commands directive.
Former Nagios employee
http://www.mcapra.com/
User avatar
mcapra
 
Posts: 3290
Joined: Thu May 05, 2016 3:54 pm

Re: Mail reminded by sms or mail by drive limited

Postby cdienger » Tue Mar 13, 2018 4:27 pm

If you haven't decided on a client yet, I would suggest ncpa. Configuring ncpa and how to run disk checks are covered in:

https://www.nagios.org/ncpa/getting-started.php
https://www.nagios.org/ncpa/help.php#api-modules-disk
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
cdienger
Support Tech
 
Posts: 1419
Joined: Tue Feb 07, 2017 11:26 am

Re: Mail reminded by sms or mail by drive limited

Postby michaelpn » Wed Mar 14, 2018 7:18 am

Hi mcapra,

thanks for a quickly answer. But if I would like be notified when my Exchange has arrived a sergeant limit for example under 3GB what definition should I then use. As you can see at the attachment I have now the check_nt!USEDDISKSPACE!-l c -w 80 -c 90 so the question is what kind of notification I should use at my contacts.cfg and do I have change my windows.cfg ? =>

define service{
use generic-service
host_name FGMAIL3
service_description C:\ Drive Space
check_command check_nt!USEDDISKSPACE!-l c -w 80 -c 90
Attachments
Service Fmail3 Nagios2..JPG
Michael Pierre
Forenede Gruppeliv
2500 Valby
Copenhagen
michaelpn
 
Posts: 44
Joined: Fri Jul 14, 2017 12:12 am

Re: Mail reminded by sms or mail by drive limited

Postby cdienger » Wed Mar 14, 2018 4:10 pm

Checks with check_nt are limited to only checking percentages. You could use check_nrpe or check_ncpa instead. Examples of each can be found at https://support.nagios.com/kb/article/d ... s-770.html . Links to install/configure ncpa were provided in the my last update and instructions for installing check_nrpe plugin can be found at https://support.nagios.com/kb/article.php?id=515 with config details at https://assets.nagios.com/downloads/nag ... e/NRPE.pdf.

commands.cfg would need to be updated like so:

define command{
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
}


and the check:

define service{
use generic-service
host_name FGMAIL3
service_description C:\ Drive Space
check_command check_nrpe!check_drivesize -a drive=C: 'warning=free<10G' 'critical=free<3G'
}
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
cdienger
Support Tech
 
Posts: 1419
Joined: Tue Feb 07, 2017 11:26 am

Re: Mail reminded by sms or mail by drive limited

Postby michaelpn » Mon Mar 19, 2018 2:40 am

Hi Cdienger,

sorry I answer you so late but I was on a vacation for a few days. It looks like what I'm searching for and I will get back to you as soon as I have tried it. Many Thanks for your cooperation.

Best Regards

Michael Pierre Nielsen
Michael Pierre
Forenede Gruppeliv
2500 Valby
Copenhagen
michaelpn
 
Posts: 44
Joined: Fri Jul 14, 2017 12:12 am

Re: Mail reminded by sms or mail by drive limited

Postby tmcdonald » Mon Mar 19, 2018 10:27 am

We'll keep this thread open for you pending your reply.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
tmcdonald
Operations Engineer
 
Posts: 9055
Joined: Mon Sep 23, 2013 8:40 am


Return to Nagios Core

Who is online

Users browsing this forum: Google [Bot] and 8 guests