Configuration nagios

Fermé
bevakacha Messages postés 6 Date d'inscription dimanche 19 avril 2009 Statut Membre Dernière intervention 18 octobre 2010 - 19 avril 2009 à 15:26
bevakacha Messages postés 6 Date d'inscription dimanche 19 avril 2009 Statut Membre Dernière intervention 18 octobre 2010 - 20 avril 2009 à 11:06
salut tout le monde
j'ai un problème de configuration des objets sur nagios
je n'ai pas trouvé les fichiers
/usr/local/nagios/etc/objects/hostclients.cfg
cfg_file=/usr/local/nagios/etc/objects/hostgroups.cfg
alors j'ai modifié le fichier localhost.cfg
###############################################################################
###############################################################################
#
# HOST DEFINITION
#
###############################################################################
###############################################################################

# Define a host for the local machine

define host{
        use                     linux-server            ; Name of host template to use
							; This host definition will inherit all variables that are defined
							; in (or inherited by) the linux-server host template definition.
        host_name               rach-desktop
        alias                   localhost
        address                 192.168.0.4
        }
define host{
        use                     ima           ; Name of host template to use
							; This host definition will inherit all variables that are defined
							; in (or inherited by) the linux-server host template definition.
        host_name               ima-desktop
        alias                   ubuntu
        address                 192.168.0.3
        }




###############################################################################
###############################################################################
#
# HOST GROUP DEFINITION
#
###############################################################################
###############################################################################

# Define an optional hostgroup for Linux machines

define hostgroup{
        hostgroup_name  linux-servers ; The name of the hostgroup
        alias           Linux Servers ; Long name of the group
        members         rach-desktop, ima-desktop     ; Comma separated list of hosts that belong to this group
        }



###############################################################################
###############################################################################


puis aller consulter la page http://localhost/nagios/ j'ai remarqué que message d'erreur


Whoops!

Error: Could not read host and service status information!

The most common cause of this error message (especially for new users), is the fact that Nagios is not actually running. If Nagios is indeed not running, this is a normal error message. It simply indicates that the CGIs could not obtain the current status of hosts and services that are being monitored. If you've just installed things, make sure you read the documentation on starting Nagios.

Some other things you should check in order to resolve this error include:

   1. Check the Nagios log file for messages relating to startup or status data errors.
   2. Always verify configuration options using the -v command-line option before starting or restarting Nagios! 

Make sure you read the documentation on installing, configuring and running Nagios thoroughly before continuing. If all else fails, try sending a message to one of the mailing lists. More information can be found at https://www.nagios.org/

merci d'avance

3 réponses

linux4all Messages postés 4 Date d'inscription dimanche 19 avril 2009 Statut Membre Dernière intervention 26 avril 2009
19 avril 2009 à 18:07
essayer ca

find / -name "host*.cfg"
0
bevakacha Messages postés 6 Date d'inscription dimanche 19 avril 2009 Statut Membre Dernière intervention 18 octobre 2010
19 avril 2009 à 23:00
fichier host.cfg n'existe pas que je dois faire
0
bevakacha Messages postés 6 Date d'inscription dimanche 19 avril 2009 Statut Membre Dernière intervention 18 octobre 2010
20 avril 2009 à 11:06
j'ai créé fichier hosts.cfg
# Generic host definition template
define host{
# The name of this host template - referenced i
name generic-host
n other host definitions, used for template recursion/resolution
# Host notifications are enabled
notifications_enabled 1
# Host event handler is enabled
event_handler_enabled 1
# Flap detection is enabled
flap_detection_enabled 1
# Process performance data
process_perf_data 1
# Retain status information across program restarts
retain_status_information 1
# Retain non-status information across program restarts
retain_nonstatus_information 1
# DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST,
# JUST A TEMPLATE!
register 0
}


# Host Definition

define host{
# Name of host template to use
use generic-host

host_name google.com
alias An Example Domain
address www.google.com
check_command check-host-alive
max_check_attempts 10
notification_interval 120
notification_period 24x7
notification_options d,u,r
}
puis créé fichier hostgroups.cfg
define hostgroup{
hostgroup_name linux-servers
alias linux-servers
contact_groups linux-servers
members google.com
}

puis aller sur interface nagios Show Host: www.google.com ne trouve pas cette machine
comment faire pour que cette configuration soit realisable
0