Fehler beim Testen der centreon-Engine nach dem Erstellen einer neuen Hostdefinition für einen Drucker

439
Jose Marques

Ich teste CENTREON als Hauptwerkzeug zur Überwachung von Protokollen in der Firma, für die ich arbeite.

Ich habe Probleme mit CENTERON SNMP und einem Drucker zu arbeiten.

Wenn ich die centreon-Engine teste, wird dieser Fehler in der Befehlszeile des centreon-Servers angezeigt:

Fehler beim Verarbeiten einer Konfigurationsdatei: Das Parsing der globalen Konfiguration ist fehlgeschlagen: Die Datei '/etc/centreon-engine/engine.cfg kann nicht geöffnet werden

Bei der Verarbeitung der Konfigurationsdateien sind mindestens ein Problem aufgetreten.

Meine 'centengine.cfg':

################################################## ################# # # # GENERATED BY CENTREON # # # # Developped by : # # - Julien Mathis # # - Romain Le Merlus # # # # www.centreon.com # # For information : contact@centreon.com # ################################################## ################# # # # Last modification 2018-03-16 15:30 # # By unknown # # # ################################################## #################  cfg_file=/etc/centreon-engine/hostTemplates.cfg  cfg_file=/etc/centreon-engine/hosts.cfg  cfg_file=/etc/centreon-engine/serviceTemplates.cfg  cfg_file=/etc/centreon-engine/services.cfg  cfg_file=/etc/centreon-engine/commands.cfg  cfg_file=/etc/centreon-engine/contactgroups.cfg  cfg_file=/etc/centreon-engine/contacts.cfg  cfg_file=/etc/centreon-engine/hostgroups.cfg  cfg_file=/etc/centreon-engine/servicegroups.cfg  cfg_file=/etc/centreon-engine/timeperiods.cfg  cfg_file=/etc/centreon-engine/escalations.cfg  cfg_file=/etc/centreon-engine/dependencies.cfg  cfg_file=/etc/centreon-engine/connectors.cfg  cfg_file=/etc/centreon-engine/meta_commands.cfg  cfg_file=/etc/centreon-engine/meta_timeperiod.cfg  cfg_file=/etc/centreon-engine/meta_host.cfg  cfg_file=/etc/centreon-engine/meta_services.cfg  cfg_file=/etc/centreon-engine/objects/printer.cfg  broker_module=/usr/lib64/centreon-engine/externalcmd.so  broker_module=/usr/lib64/nagios/cbmod.so /etc/centreon-broker/central-module.xml  interval_length=60  resource_file=/etc/centreon-engine/resource.cfg  log_file=/var/log/centreon-engine/centengine.log  status_file=/var/log/centreon-engine/status.dat  use_check_result_path=0  command_check_interval=1s  command_file=/var/lib/centreon-engine/rw/centengine.cmd  state_retention_file=/var/log/centreon-engine/retention.dat  retention_update_interval=60  sleep_time=0.2  service_inter_check_delay_method=s  service_interleave_factor=s  max_concurrent_checks=400  max_service_check_spread=5  check_result_reaper_frequency=5  low_service_flap_threshold=25.0  high_service_flap_threshold=50.0  low_host_flap_threshold=25.0  high_host_flap_threshold=50.0  service_check_timeout=60  host_check_timeout=12  event_handler_timeout=30  notification_timeout=30  ocsp_timeout=5  ochp_timeout=5  perfdata_timeout=5  date_format=euro  illegal_object_name_chars=~!$%^&*"|'<>?,()= illegal_macro_output_chars=`~$^&"|'<>  admin_email=admin@localhost  admin_pager=admin  event_broker_options=-1  cached_host_check_horizon=60  debug_file=/var/log/centreon-engine/centengine.debug  debug_level=0  debug_verbosity=2  log_pid=1  enable_notifications=1  execute_service_checks=1  accept_passive_service_checks=1  enable_event_handlers=1  check_external_commands=1  use_retained_program_state=1  use_retained_scheduling_info=1  use_syslog=0  log_notifications=1  log_service_retries=1  log_host_retries=1  log_event_handlers=1  log_initial_states=1  log_external_commands=1  use_aggressive_host_checking=1  soft_state_dependencies=0  obsess_over_services=0  process_performance_data=0  check_for_orphaned_services=0  check_for_orphaned_hosts=0  check_service_freshness=1  enable_flap_detection=0   ###end### 

Meine Druckerkonfigurationen in der 'printer.cfg':

## ## Copyright 1999-2009 Ethan Galstad ## Copyright 2011-2013 Merethis ## ## This file is part of Centreon Engine. ## ## Centreon Engine is free software: you can redistribute it and/or ## modify it under the terms of the GNU General Public License version 2 ## as published by the Free Software Foundation. ## ## Centreon Engine is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with Centreon Engine. If not, see ## <http://www.gnu.org/licenses/>. ##  # file: printer.cfg # brief: Sample config file for monitoring a network printer. # # notes: This config file assumes that you are using the sample configuration # files that get installed with the Centreon Engine quickstart guide.   # info: host definitions. # brief: Define a host for the printer we'll be monitoring # Change the host_name, alias, and address to fit your situation  define host{  use generic-printer ; Inherit default values from a template.  host_namH HP_laserJet_400 ; The name we're giving to this printer.  alias HP LaserJet 400 MFP M425dw ; A longer name associated with the printer.  address xxx.xxx.xxx.xxx ; IP address of the printer.  hostgroupl allhosts ; Host groups this printer is associated with.  }  # info: Host group definitions. # brief: A hostgroup for network printers.  define hostgroup{  hostgroup_name acs-net-printers ; The name of the hostgroup.  alias acs net Printers ; Long name of the group.  }  # info: Service definitions. # brief: Create a service for monitoring the status of the printer Change the # host_name to match the name of the host you defined above If the # printer has an SNMP community string other than "public", change the # check_command directive to reflect that.  define service{  use generic_service ; Inherit values from a template.  host_name HP_laserJet_400 ; The name of the host the service is associated with.  service_description Printer Status ; The service description.  check_command check_hpjd!-C xxx ; The command used to monitor the service.  normal_check_interval 10 ; Check the service every 10 minutes under normal conditions.  retry_check_interval 1 ; Re-check the service every minute until its final/hard state is determined.  }  # Create a service for "pinging" the printer occassionally. # Useful for monitoring RTA, packet loss, etc.  define service{  use generic_service  host_name HP_laserJet_400  service_description PING  check_command check_ping!3000.0,80%!5000.0,100%  normal_check_interval 10  retry_check_interval 1  }  ###end### 

Hinweis: Die 'x' sind die sensiblen Daten, die kodiert werden.

Ich verwende den SNMP, um andere Serverinformationen abzurufen, und es funktioniert.

Und wenn ich den Befehl "snmpwalk" in meinem Server versuche, gibt der Drucker die Daten zurück.

Was ist das Problem in meinen Konfigurationen?

0

1 Antwort auf die Frage

2
Journeyman Geek

Sie haben Folgendes angegeben: centengine.cfgDie fehlende Datei scheint zu sein engine.cfg- Wenn Sie eine Kopie der Datei centengine.cfg engine.cfg umbenennen (damit die gesuchte Datei existiert), sollte dieser Fehler sortiert werden. Möglicherweise müssen Sie weitere Änderungen vornehmen, wenn das Konfigurationsdateiformat geändert wird

In den Kommentaren erwähnte OP, dass der Name der Datei aus dem Handbuch stammt. Wenn dies der Fall ist, lohnt es sich, nach einem aktualisierten Handbuch zu suchen.