Menu

#21 Consistency.pl - Adding extra checks

open
None
5
2012-09-15
2005-07-17
No
  • Complete rewrite of this module
  • Extra tests for all modules

Discussion

  • Yves Van den Hove

    Logged In: YES
    user_id=423476

    Relationships Verified During The Pre-Flight Check:
    During the "pre-flight check", Nagios verifies that you have
    defined the data relationships necessary for monitoring.
    Objects are all related and need to be setup properly in
    order for things to run.
    This is a list of the basic things that Nagios attempts to
    check before it will start monitoring...

    1. Verify that all contacts are a member of at least one
      contact group.
    2. Verify that all contacts specified in each contact group
      are valid.
    3. Verify that all hosts are a member of at least one host
      group.
    4. Verify that all hosts specified in each host group are
      valid.
    5. Verify that all hosts have at least one service
      associated with them.
    6. Verify that all commands used in service and host checks
      are valid.
    7. Verify that all commands used in service and host event
      handlers are valid.
    8. Verify that all commands used in contact service and host
      notifications are valid.
    9. Verify that all notification time periods specified for
      services, hosts, and contact are valid.
    10. Verify that all service check time periods specified for
      services are valid.
     
  • Yves Van den Hove

    Logged In: YES
    user_id=423476
    Originator: YES

    hosts without services:
    select host_name from nagios_hosts where register=1 and host_name not in (select host_name from nagios_services where register=1);

    hosts without hostextinfo:
    select host_name from nagios_hosts where register=1 and host_name not in (select host_name from nagios_hostextinfo where register=1);

    Unused check_commands:
    select command_name from nagios_commands where
    command_name not in (select distinct check_command from nagios_hosts) and
    command_name not in (select distinct check_command from nagios_services);

    Unused misccommands
    select command_name from nagios_misccommands where
    command_name not in (select distinct host_notification_commands from nagios_contacts) and
    command_name not in (select distinct service_notification_commands from nagios_contacts) and
    command_name not in (select distinct service_notification_commands from nagios_contacts) and
    command_name not in (select distinct event_handler from nagios_hosts);

    Unused remote_config templates
    select remote_host_name from nagios_remoteconfigs
    where register=0 and remote_host_name not in (select distinct remote_config_template from nagios_remoteconfigs where register=1);

    Unused timeperiods
    select timeperiod_name from nagios_timeperiods where
    timeperiod_name not in (select distinct host_notification_period from nagios_contacts) and
    timeperiod_name not in (select distinct service_notification_period from nagios_contacts) and
    timeperiod_name not in (select distinct escalation_period from nagios_hostescalations) and
    timeperiod_name not in (select distinct check_period from nagios_hosts) and
    timeperiod_name not in (select distinct notification_period from nagios_hosts) and
    timeperiod_name not in (select distinct escalation_period from nagios_serviceescalations) and
    timeperiod_name not in (select distinct check_period from nagios_services) and
    timeperiod_name not in (select distinct notification_period from nagios_services);

     

Log in to post a comment.

MongoDB Logo MongoDB