centreon / centreon-archived

Centreon is a network, system and application monitoring tool. Centreon is the only AIOps Platform Providing Holistic Visibility to Complex IT Workflows from Cloud to Edge.
https://www.centreon.com
GNU General Public License v2.0
575 stars 240 forks source link

[20.10.4] Notification config sync from central server to remote server issues #9593

Open fpatzig-git opened 3 years ago

fpatzig-git commented 3 years ago

BUG REPORT INFORMATION

Versions Remote Server centreon-20.10.4-6.el7.centos.noarch centreon-auto-discovery-server-20.10.2-1.el7.centos.noarch centreon-base-config-centreon-engine-20.10.4-6.el7.centos.noarch centreon-broker-20.10.3-5.el7.centos.x86_64 centreon-broker-cbd-20.10.3-5.el7.centos.x86_64 centreon-broker-cbmod-20.10.3-5.el7.centos.x86_64 centreon-broker-core-20.10.3-5.el7.centos.x86_64 centreon-broker-storage-20.10.3-5.el7.centos.x86_64 centreon-clib-20.10.0-2.el7.centos.x86_64 centreon-common-20.10.4-6.el7.centos.noarch centreon-connector-20.10.0-2.el7.centos.x86_64 centreon-connector-perl-20.10.0-2.el7.centos.x86_64 centreon-connector-ssh-20.10.0-2.el7.centos.x86_64 centreon-database-20.10.4-6.el7.centos.noarch centreon-engine-20.10.2-2.el7.centos.x86_64 centreon-engine-daemon-20.10.2-2.el7.centos.x86_64 centreon-engine-extcommands-20.10.2-2.el7.centos.x86_64 centreon-gorgone-20.10.3-1.el7.centos.noarch centreon-gorgone-centreon-config-20.10.3-1.el7.centos.noarch centreon-license-manager-20.10.1-1.el7.centos.noarch centreon-license-manager-common-20.10.1-1.el7.centos.noarch centreon-nrpe3-daemon-3.2.1-8.el7.centos.x86_64 centreon-perl-libs-20.10.4-6.el7.centos.noarch centreon-poller-centreon-engine-20.10.4-6.el7.centos.noarch centreon-pp-manager-20.10.1-3.el7.centos.noarch centreon-release-20.10-2.el7.centos.noarch centreon-trap-20.10.4-6.el7.centos.noarch centreon-web-20.10.4-6.el7.centos.noarch centreon-widget-engine-status-20.10.0-5.el7.centos.noarch centreon-widget-global-health-20.10.0-5.el7.centos.noarch centreon-widget-graph-monitoring-20.10.0-5.el7.centos.noarch centreon-widget-grid-map-20.10.0-5.el7.centos.noarch centreon-widget-hostgroup-monitoring-20.10.0-5.el7.centos.noarch centreon-widget-host-monitoring-20.10.0-5.el7.centos.noarch centreon-widget-httploader-20.10.0-5.el7.centos.noarch centreon-widget-live-top10-cpu-usage-20.10.0-5.el7.centos.noarch centreon-widget-live-top10-memory-usage-20.10.0-5.el7.centos.noarch centreon-widget-servicegroup-monitoring-20.10.0-5.el7.centos.noarch centreon-widget-service-monitoring-20.10.0-5.el7.centos.noarch centreon-widget-tactical-overview-20.10.0-5.el7.centos.noarch

Central Server

centreon-20.10.4-6.el7.centos.noarch centreon-auto-discovery-server-20.10.2-1.el7.centos.noarch centreon-base-config-centreon-engine-20.10.4-6.el7.centos.noarch centreon-broker-20.10.3-5.el7.centos.x86_64 centreon-broker-cbd-20.10.3-5.el7.centos.x86_64 centreon-broker-cbmod-20.10.3-5.el7.centos.x86_64 centreon-broker-core-20.10.3-5.el7.centos.x86_64 centreon-broker-storage-20.10.3-5.el7.centos.x86_64 centreon-clib-20.10.0-2.el7.centos.x86_64 centreon-common-20.10.4-6.el7.centos.noarch centreon-connector-20.10.0-2.el7.centos.x86_64 centreon-connector-perl-20.10.0-2.el7.centos.x86_64 centreon-connector-ssh-20.10.0-2.el7.centos.x86_64 centreon-cwrapper-perl-0.1-1.el7.centos.x86_64 centreon-database-20.10.4-6.el7.centos.noarch centreon-engine-20.10.2-2.el7.centos.x86_64 centreon-engine-daemon-20.10.2-2.el7.centos.x86_64 centreon-engine-extcommands-20.10.2-2.el7.centos.x86_64 centreon-gorgone-20.10.3-1.el7.centos.noarch centreon-gorgone-centreon-config-20.10.3-1.el7.centos.noarch centreon-license-manager-20.10.1-1.el7.centos.noarch centreon-license-manager-common-20.10.1-1.el7.centos.noarch centreon-perl-libs-20.10.4-6.el7.centos.noarch centreon-poller-centreon-engine-20.10.4-6.el7.centos.noarch centreon-pp-manager-20.10.1-3.el7.centos.noarch centreon-release-20.10-2.el7.centos.noarch centreon-trap-20.10.4-6.el7.centos.noarch centreon-web-20.10.4-6.el7.centos.noarch centreon-widget-engine-status-20.10.0-5.el7.centos.noarch centreon-widget-global-health-20.10.0-5.el7.centos.noarch centreon-widget-graph-monitoring-20.10.0-5.el7.centos.noarch centreon-widget-grid-map-20.10.0-5.el7.centos.noarch centreon-widget-hostgroup-monitoring-20.10.0-5.el7.centos.noarch centreon-widget-host-monitoring-20.10.0-5.el7.centos.noarch centreon-widget-httploader-20.10.0-5.el7.centos.noarch centreon-widget-live-top10-cpu-usage-20.10.0-5.el7.centos.noarch centreon-widget-live-top10-memory-usage-20.10.0-5.el7.centos.noarch centreon-widget-servicegroup-monitoring-20.10.0-5.el7.centos.noarch centreon-widget-service-monitoring-20.10.0-5.el7.centos.noarch centreon-widget-tactical-overview-20.10.0-5.el7.centos.noarch

Operating System

CentOS ISO

Browser used

Description

The structure is a central and remote server system. Here notifications are to be sent from the remote server. The notification is stored in the host / service object on the central. When exporting to the remote, Configuration> Commands> Notifications are then displayed in the WebGui. These are included in commands.cfg. Furthermore, notifications_enabled is activated in hosts.cfg and the ciontact is also there. Unfortunately not in the Gui. The contact is contained in contacts.cfg. No notifications are generated either.

commands.cfg define command { command_name host-notify-by-email command_line /bin/sh -c '/usr/bin/printf "%b" " centreon Carno Notification \n\nType:$NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\nDate/Time: $DATE$ $TIME$" | /bin/mail -s "Host $HOSTSTATE$ alert for $HOSTNAME$!" $CONTACTEMAIL$' }

define command { command_name service-notify-by-email command_line /bin/sh -c '/usr/bin/printf "%b" " centreon Carno Notification \n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $DATE$ $TIME$ Additional Info : $SERVICEOUTPUT$" | /bin/mail -s " $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ " $CONTACTEMAIL$' }

hosts.cfg

define host { host_name Centreon-Server-CARNO alias Centreon address xxxxxxxxx contacts user_user_1 check_period 24x7 notification_period 24x7 notification_interval 5 notification_options d,u,r first_notification_delay 0 recovery_notification_delay 0 register 1 timezone :Europe/Berlin notifications_enabled 1 _HOST_ID 215 }

contacts.cfg define contact { contact_name user_user_1 alias xx email xx@xxxx host_notification_period 24x7 service_notification_period 24x7 host_notification_options d,u,r service_notification_options w,u,c,r register 1 host_notifications_enabled 1 service_notifications_enabled 1 host_notification_commands host-notify-by-email service_notification_commands service-notify-by-email }

In logfiles not errors

Regards Frank

fpatzig-git commented 3 years ago

This is in my logfile

[1616054747] [3155] ** Handling async check result for host 'Centreon-Server-CARNO'... [1616054747] [3155] process_host_check_result_3x() [1616054747] [3155] HOST: Centreon-Server-CARNO, ATTEMPT=1/10, CHECK TYPE=ACTIVE, STATE TYPE=HARD, OLD STATE=0, NEW STATE=1 [1616054747] [3155] Host was UP. [1616054747] [3155] Host is now DOWN/UNREACHABLE. [1616054747] [3155] determine_host_reachability() [1616054747] [3155] Propagating checks to immediate parent hosts that are UP... [1616054747] [3155] Propagating checks to immediate non-UNREACHABLE child hosts... [1616054747] [3155] Pre-handle_host_state() Host: Centreon-Server-CARNO, Attempt=1/10, Type=SOFT, Final State=1 [1616054747] [3155] handle_host_state() [1616054747] [3155] obsessive_compulsive_host_check_processor() [1616054747] [3155] check_pending_flex_host_downtime() [1616054747] [3155] notifier::notify() [1616054747] [3155] notifier::is_notification_viable_normal() [1616054747] [3155] check_time_against_period() [1616054747] [3155] get_next_valid_time_per_timeperiod() [1616054747] [3155] This notifier is in soft state, so we won't send notifications. [1616054747] [3155] handle_host_event() [1616054747] [3155] Making callbacks (type 30)... [1616054747] [3155] run_global_host_event_handler() [1616054747] [3155] Making callbacks (type 24)... [1616054747] [3155] check_for_external_commands() [1616054747] [3155] Post-handle_host_state() Host: Centreon-Server-CARNO, Attempt=1/10, Type=SOFT, Final State=1 [1616054747] [3155] host::check_for_flapping() [1616054747] [3155] Checking host 'Centreon-Server-CARNO' for flapping...