Tôi đang thử nghiệm CENTREON để được sử dụng làm công cụ chính để theo dõi nhật ký trong công ty mà tôi làm việc.
Tôi gặp sự cố khi làm việc với TRUNG TÂM SNMP và máy in.
Khi tôi kiểm tra công cụ centreon, lỗi này xuất hiện trong dòng lệnh máy chủ centreon của tôi:
Lỗi trong khi xử lý tệp cấu hình: Phân tích cấu hình toàn cầu không thành công: Không thể mở tệp '/etc/centreon-engine/engine.cfg
Một hoặc nhiều vấn đề xảy ra trong khi xử lý các tập tin cấu hình.
'Centengine.cfg' của tôi:
################################################## #################
# #
# 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###
Cấu hình máy in của tôi trong 'print.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###
Lưu ý: 'x' là mã hóa dữ liệu nhạy cảm.
Tôi đang sử dụng SNMP để lấy thông tin máy chủ khác và nó hoạt động.
Và khi tôi thử lệnh 'snmpwalk' trong máy chủ của mình, máy in sẽ trả về dữ liệu.
Vì vậy, vấn đề trong cấu hình của tôi là gì?