[Nagios-users] About service contacts
Dear, I am a beginning user of nagios, and trying to find a convenient way to define different service contacts. For example this, define service{ namecheck_ssh use generic-service service_description SSH host_name mail,file,backup check_command check_ssh } if the mail server ssh has problem, I want to notify user A. If file server ssh has prolem, I want to notify user B, and etc. Please advice how to do that? Thanks a lot! -- --- Mika Chu -- The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://ad.doubleclick.net/clk;226879339;13503038;l? http://clk.atdmt.com/CRS/go/247765532/direct/01/ ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] About service contacts
Hello Jorge, If the http service on your www2 host down, I believe all of contacts will get the notification? Is it possible only let your fernando steria get the notification, but we can use less define in .cfg file? 2010/7/28, Jorge Gil georgy...@gmail.com: Dear, I copy you a working example of my Nagios, just define two times the service with different contacts -it will make it work different for warning different administrators of different servers: define service{ use generic-service host_name www2 service_description HTTP check_command check_http is_volatile 0 check_period 24x7 max_check_attempts 2 normal_check_interval 5 retry_check_interval 5 contacts nagiosadmin,nagiosadmin2,nagiosadmin3,nagiosadmin4 notification_interval 0 notification_period 24x7 notification_options c,r,w,u,f notifications_enabled 1 } define service{ use generic-service host_name www2 service_description HTTP check_command check_http is_volatile 0 check_period 24x7 max_check_attempts 2 normal_check_interval 5 retry_check_interval 5 contacts fernando,steria notification_interval 0 notification_period 24x7 notification_options c,r,w,u,f notifications_enabled 1 } Kind regards, Jorge On Wed, Jul 28, 2010 at 9:51 AM, Mika Chu ledondo2...@gmail.com wrote: Dear, I am a beginning user of nagios, and trying to find a convenient way to define different service contacts. For example this, define service{ namecheck_ssh use generic-service service_description SSH host_name mail,file,backup check_command check_ssh } if the mail server ssh has problem, I want to notify user A. If file server ssh has prolem, I want to notify user B, and etc. Please advice how to do that? Thanks a lot! -- --- Mika Chu -- The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://ad.doubleclick.net/clk;226879339;13503038;l? http://clk.atdmt.com/CRS/go/247765532/direct/01/ ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null -- --- Mika Chu -- The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://ad.doubleclick.net/clk;226879339;13503038;l? http://clk.atdmt.com/CRS/go/247765532/direct/01/ ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] About service contacts
Dear Jorge, I think I had a mistake I defined a name for every service, so nagios warns me if I define different contact, about name conflict. Your answer is correct me, thanks a lot! 2010/7/28, Jorge Gil georgy...@gmail.com: Yes, i edited the extract of the config file You wanted www1 to notify contact1, use the first service deinition and for www2 to notify contact2, the second like: define service{ use generic-service host_name www1 service_description HTTP check_command check_http is_volatile 0 check_period 24x7 max_check_attempts 2 normal_check_interval 5 retry_check_interval 5 contacts nagiosadmin,nagiosadmin2,nagiosadmin3,nagiosadmin4 notification_interval 0 notification_period 24x7 notification_options c,r,w,u,f notifications_enabled 1 } define service{ use generic-service host_name www2 service_description HTTP check_command check_http is_volatile 0 check_period 24x7 max_check_attempts 2 normal_check_interval 5 retry_check_interval 5 contacts fernando,steria notification_interval 0 notification_period 24x7 notification_options c,r,w,u,f notifications_enabled 1 } I hope now it s more clear. Jorge On Wed, Jul 28, 2010 at 10:14 AM, Mika Chu ledondo2...@gmail.com wrote: Hello Jorge, If the http service on your www2 host down, I believe all of contacts will get the notification? Is it possible only let your fernando steria get the notification, but we can use less define in .cfg file? 2010/7/28, Jorge Gil georgy...@gmail.com: Dear, I copy you a working example of my Nagios, just define two times the service with different contacts -it will make it work different for warning different administrators of different servers: define service{ use generic-service host_name www2 service_description HTTP check_command check_http is_volatile 0 check_period 24x7 max_check_attempts 2 normal_check_interval 5 retry_check_interval 5 contacts nagiosadmin,nagiosadmin2,nagiosadmin3,nagiosadmin4 notification_interval 0 notification_period 24x7 notification_options c,r,w,u,f notifications_enabled 1 } define service{ use generic-service host_name www2 service_description HTTP check_command check_http is_volatile 0 check_period 24x7 max_check_attempts 2 normal_check_interval 5 retry_check_interval 5 contacts fernando,steria notification_interval 0 notification_period 24x7 notification_options c,r,w,u,f notifications_enabled 1 } Kind regards, Jorge On Wed, Jul 28, 2010 at 9:51 AM, Mika Chu ledondo2...@gmail.com wrote: Dear, I am a beginning user of nagios, and trying to find a convenient way to define different service contacts. For example this, define service{ namecheck_ssh use generic-service service_description SSH host_name mail,file,backup check_command check_ssh } if the mail server ssh has problem, I want to notify user A. If file server ssh has prolem, I want to notify user B, and etc. Please advice how to do that? Thanks a lot! -- --- Mika Chu -- The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://ad.doubleclick.net/clk;226879339;13503038;l? http://clk.atdmt.com/CRS/go/247765532/direct/01/ ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null -- --- Mika Chu -- --- Mika Chu -- The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://ad.doubleclick.net/clk;226879339;13503038;l? http://clk.atdmt.com/CRS/go/247765532/direct/01/ ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
[Nagios-users] how to let nagios think host is online
Hi all, I have one host need to be monitoring, but it is not allow ping. So the nagios plug-in check_ping can not work. Host line in the web page is red. How can I let nagios think it is OK? I checked the manual, about host definition, check_command This directive is used to specify the *short name* of the command that should be used to check if the host is up or down. Typically, this command would try and ping the host to see if it is alive. The command must return a status of OK (0) or Nagios will assume the host is down. If you leave this argument blank, the host will *not* be actively checked. Thus, Nagios will likely always assume the host is up (it may show up as being in a PENDING state in the web interface). This is useful if you are monitoring printers or other devices that are frequently turned off. The maximum amount of time that the notification command can run is controlled by the host_check_timeout option. sorry, I don't understand what should I do. Please advice me. Thanks a lot! -- --- Mika Chu -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null