Page 1 of 1

Re: checks_enabled 0 over webinterface?

Posted: Wed Mar 31, 2010 3:05 am
by charms
I have tried this and it works. But still, when I add the new host inside a host group there is automatically a ping check added (and neither listed in the Nagios Core Configuration Manager or the services/<hostname>.cfg file). It's like a "ghost service" that turns up unwanted and can not be removed anywhere.

When i take the host out of the host group again the ping check disapears.

When I look at the check_interval and retry_interval I see that the ping service inherits the settings from the generic-service template. But this is all I could find out up to now. I still have no idea why this service is turning up.

Help would be appriciated because I have to present the solution to a customer at the 6th of April and make him buy a license and support contract.

hosts/www.redtoo.com.cfg

Code: Select all

###############################################################################
#
# Host configuration file
#
# Created by: Nagios QL Version 3.0.3
# Date:       2010-03-31 02:46:55
# Version:    Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios QL will overwite all manual settings during the next update
#
###############################################################################

define host {
        host_name                       www.redtoo.com
        use                             xiwizard_website_host
        address                         www.redtoo.com
        hostgroups                      web-servers
        max_check_attempts              5
        check_interval                  5
        retry_interval                  1
        contacts                        charms,nagiosadmin
        contact_groups                  admins
        notification_interval           60
        icon_image                      www_server.png
        statusmap_image                 www_server.png
        _xiwizard                       website
        register                        1
        }

###############################################################################
#
# Host configuration file
#
# END OF FILE
#
###############################################################################
services/www.redtoo.com.cfg

Code: Select all

###############################################################################
#
# Service configuration file
#
# Created by: Nagios QL Version 3.0.3
# Date:       2010-03-31 02:46:56
# Version:    Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios QL will overwite all manual settings during the next update
#
###############################################################################

define service {
        host_name                       www.redtoo.com
        service_description             DNS IP Match
        use                             xiwizard_website_dnsip_service
        check_command                   check_xi_service_dns!-a 193.108.137.93
        max_check_attempts              5
        check_interval                  5
        retry_interval                  1
        check_period                    xi_timeperiod_24x7
        notification_interval           60
        notification_period             xi_timeperiod_24x7
        contacts                        charms,nagiosadmin
        contact_groups                  admins
        _xiwizard                       website
        register                        1
        }

define service {
        host_name                       www.redtoo.com
        service_description             DNS Resolution
        use                             xiwizard_website_dns_service
        max_check_attempts              5
        check_interval                  5
        retry_interval                  1
        check_period                    xi_timeperiod_24x7
        notification_interval           60
        notification_period             xi_timeperiod_24x7
        contacts                        charms,nagiosadmin
        contact_groups                  admins
        _xiwizard                       website
        register                        1
        }

define service {
        host_name                       www.redtoo.com
        service_description             HTTP
        use                             xiwizard_website_http_service
        check_command                   check_xi_service_http!-u http://www.redtoo.com
        max_check_attempts              5
        check_interval                  5
        retry_interval                  1
        check_period                    xi_timeperiod_24x7
        notification_interval           60
        notification_period             xi_timeperiod_24x7
        contacts                        charms,nagiosadmin
        contact_groups                  admins
        _xiwizard                       website
        register                        1
        }

###############################################################################
#
# Service configuration file
#
# END OF FILE
#
###############################################################################
hostgroups.cfg

Code: Select all

###############################################################################
#
# Hostgroup configuration file
#
# Created by: Nagios QL Version 3.0.3
# Date:       2010-03-31 02:46:56
# Version:    Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios QL will overwite all manual settings during the next update
#
###############################################################################

define hostgroup {
        hostgroup_name                          linux-servers
        alias                                   Linux Servers
        members                                 localhost
        }

define hostgroup {
        hostgroup_name                          web-servers
        alias                                   Web Servers to Monitor
        }

###############################################################################
#
# Timeperiod configuration file
#
# END OF FILE
#
###############################################################################
All other config files are untouched and default as delivered with the vmware image.
ping_service_critical.jpg
no_ping_service_configured.jpg

Ghost check_ping appears after adding host inside hostgroup

Posted: Wed Mar 31, 2010 6:28 am
by charms
My question is: are there any templates or services that can be related with a hostgroup? Because regardless if i define an own template without any ping check and add it to the host, or modify the host settings to disable checks, the ping check is added as soon i add the host inside the web-servers host group.

So why is a ping service assigned to my host as soon i add it in to the web-servers hostgroup?

Re: Ghost check_ping appears after adding host inside hostgroup

Posted: Wed Mar 31, 2010 9:04 am
by charms
It's defenatly a service that is added and not dependent on the host check. Any ideas? I really would appriciate it. I'm stuck. The service is not listed in any configuration. The only place where I can find something is directly in the nagios database in the nagios_externalcommands table:

Code: Select all

mysql> select * from nagios_externalcommands;
+--------------------+-------------+---------------------+--------------+---------------------------+--------------------------------+
| externalcommand_id | instance_id | entry_time          | command_type | command_name              | command_args                   |
+--------------------+-------------+---------------------+--------------+---------------------------+--------------------------------+
|                  2 |           1 | 2010-03-30 07:19:29 |           23 | DISABLE_SVC_NOTIFICATIONS | www.redtoo.com;Ping            |
|                  3 |           1 | 2010-03-30 08:20:59 |           22 | ENABLE_SVC_NOTIFICATIONS  | localhost;SSH                  |
|                  4 |           1 | 2010-03-30 08:21:42 |           22 | ENABLE_SVC_NOTIFICATIONS  | localhost;HTTP                 |
|                  5 |           1 | 2010-03-30 08:47:49 |           24 | ENABLE_HOST_NOTIFICATIONS | www.redtoo.com                 |
|                  6 |           1 | 2010-03-30 08:55:01 |            7 | SCHEDULE_SVC_CHECK        | www.redtoo.com;Ping;1269957294 |
+--------------------+-------------+---------------------+--------------+---------------------------+--------------------------------+
And in the nagios_objects table:

Code: Select all

|        98 |           1 |             1 | www.redtoo.com                         |                 |         1 |
|        99 |           1 |             2 | www.redtoo.com                         | HTTP            |         1 |
|       100 |           1 |             2 | www.redtoo.com                         | Ping            |         1 |
|       101 |           1 |             2 | www.redtoo.com                         | DNS Resolution  |         1 |
|       102 |           1 |             2 | www.redtoo.com                         | DNS IP Match    |         1 |
|       103 |           1 |            10 | charms                                 | NULL            |         1 |
|       104 |           1 |            11 | Web Server Engineers                   | NULL            |         1 |
|       105 |           1 |             1 | www.redtoo.ch                          |                 |         0 |
|       106 |           1 |             2 | www.redtoo.ch                          | HTTP            |         0 |
|       107 |           1 |             2 | www.redtoo.ch                          | DNS Resolution  |         0 |
|       108 |           1 |             2 | www.redtoo.ch                          | DNS IP Match    |         0 |
|       109 |           1 |             2 | www.redtoo.ch                          | PING            |         0 |


Re: Ghost check_ping appears after adding host inside hostgroup

Posted: Wed Mar 31, 2010 9:49 am
by charms
I can add a simple host entry with all check parameters turned off. After saving the entry without adding any services and adding it to a host group the ping check is added automatically. Is this a bug? Or am I to stupid? At least I can not present hosts with down states to my customer.

Re: Ghost check_ping after adding host to hostgroup [unsolved]

Posted: Wed Mar 31, 2010 10:21 am
by mmestnik
In Nagios Core a Service can "belong" to a Host Group and then is transparently applied to any host in that group. The 'fix' is to have another Host Group that does not have this service... If that makes sense?

Re: Ghost check_ping after adding host to hostgroup [unsolved]

Posted: Wed Mar 31, 2010 2:24 pm
by charms
Hello,

After setting up a totally now vmware server and starting adding everything manually without the wizards I have discovered that when adding a service and assigning it to a host group all other hosts in the same host group inherit this service too. I was blended because a required (*) is set in the services menu. So I sought I have to add a service to a host group. But this is wrong. After removing all the host groups from the services everything was working fine. Maybe you can report this to your usability department.

I'm just not used clicking myself through wizards and stuff. It's very different and also very confusing with the templates. But the customers have no knowledge about linux so they require these things.

Re: Ghost check_ping after adding host to hostgroup [solved]

Posted: Thu Apr 01, 2010 10:20 am
by mmestnik
Correct,
I see this in the Core Config Manager. "Host groups*" When what is really meant is (Hosts|Host groups)*, This is not so much a bug in Core Config Manager as it is with web forums and marking configured fields.

Ideally there would be a Radio Option to select weather this service will belong to a Host Group or a Host.