Question

On 22.10.6 Centreon (web) itself gets different check-result than centreon-engine on command-line


Badge +6

Hi there everyone,

 

i have a very strange occurence.

I have a check in centreon 22.10.6 which gives me a critical result. When i copy the displayed command from the details-Tab and paste it to the poller with the user centreon-engine i get another result from the check than the one displayed on the frontend.

 

How can that be?

Using the supplied CentOS7-ISOs since 21.4 and have subsequently updated since then.

 

Regards

Timo


17 replies

Badge +6

No one having any Idea?

Badge +6

Bump after 2 weeks and absolutely no support-answer 😡

Badge +6

And still no answer or support.

I am still having this Problem and it is a real pita by now.

Currently on 22.10.10 and preparing a move to debian for 23.x

 

Debug in the Log shows that the ENgine gets a return-Code2 and a “

(No output returned from plugin)” while on the cli it works just fine

Badge +6

@Fabrix Do you have any Idea who could be of help here?

Userlevel 5
Badge +11

Hi @TA-FFM, please give me a moment, I'll see what I can do

Userlevel 6
Badge +18

Hi @TA-FFM do you use a Centreon Plugin or a custom plugin?
Can you add a screenshot of the result in Centreon UI an in CLI ?

Badge +6

Hello Laurent,

 

i had the Problem before wih other scripts (don’t remember them actually now) and currentltly have it with https://exchange.nagios.org/directory/Plugins/Network-Protocols/Others/BGP-2D4/EGP/EIGRP/HSRP/IGRP/OSPF/Others/STP/TACACS+/check_tacacs_plus/details

 

Funny enough, i seem to not have the Problem on a debian 23,04-Test-Install i exported the Host/Service-Config to .- also it works fine in a Centreon 2.5.2-install (don’t beat me, it’s beeing replaced by the actual one)

Badge +6

 

Badge +6

Maybe this helps too - centengine-log V2 with setting to “trace” - all specifics have been replaced (passwords, Hostnames, etc)

 

2023-09-28T08:27:38.925+02:00] [events] [debug] [9189] ** Event Check Loop
[2023-09-28T08:27:38.925+02:00] [events] [debug] [9189] Next High Priority Event Time: Thu Sep 28 08:27:40 2023
[2023-09-28T08:27:38.925+02:00] [events] [debug] [9189] Next Low Priority Event Time:  Thu Sep 28 08:27:38 2023
[2023-09-28T08:27:38.925+02:00] [events] [debug] [9189] Current/Max Service Checks: 0/0
[2023-09-28T08:27:38.925+02:00] [events] [debug] [9189] Running event...
[2023-09-28T08:27:38.925+02:00] [functions] [trace] [9189] handle_timed_event()
[2023-09-28T08:27:38.925+02:00] [events] [trace] [9189] ** Timed Event ** Type: 0, Run Time: Thu Sep 28 08:27:38 2023
[2023-09-28T08:27:38.925+02:00] [events] [trace] [9189] ** Service Check Event ==> Host: 'our-tacacs-host', Service: 'service_tacacs_plus', Options: 0, Latency: 0.925 sec
[2023-09-28T08:27:38.925+02:00] [functions] [trace] [9189] run_scheduled_service_check()
[2023-09-28T08:27:38.925+02:00] [checks] [trace] [9189] Attempting to run scheduled check of service 'service_tacacs_plus' on host 'our-tacacs-host': check options=0, latency=0.925
[2023-09-28T08:27:38.925+02:00] [functions] [trace] [9189] service::run_async_check, check_options=0, latency=0.925, scheduled_check=true, reschedule_check=true
[2023-09-28T08:27:38.925+02:00] [checks] [trace] [9189] ** Running async check of service 'service_tacacs_plus on host 'our-tacacs-host'...
[2023-09-28T08:27:38.925+02:00] [functions] [trace] [9189] check_service_check_viability()
[2023-09-28T08:27:38.925+02:00] [functions] [trace] [9189] check_time_against_period()
[2023-09-28T08:27:38.925+02:00] [functions] [trace] [9189] get_next_valid_time_per_timeperiod()
[2023-09-28T08:27:38.925+02:00] [functions] [trace] [9189] get_next_valid_time_per_timeperiod 24x7 valid_time=1695882458
[2023-09-28T08:27:38.925+02:00] [functions] [trace] [9189] check_time_against_period 24x7 ret=true
[2023-09-28T08:27:38.925+02:00] [functions] [trace] [9189] service::authorized_by_dependencies()
[2023-09-28T08:27:38.925+02:00] [checks] [trace] [9189] Checking service 'service_tacacs_plus' on host 'our-tacacs-host'...
[2023-09-28T08:27:38.925+02:00] [functions] [trace] [9189] get_raw_command_line_r()
[2023-09-28T08:27:38.925+02:00] [commands] [debug] [9189] Raw Command Input: $USER1$/check_tacacs_plus_file.pl -H $HOSTADDRESS$ -k $ARG1$
[2023-09-28T08:27:38.925+02:00] [functions] [trace] [9189] process_macros_r()
[2023-09-28T08:27:38.925+02:00] [macros] [trace] [9189] **** BEGIN MACRO PROCESSING **** Processing: 'tacacs-key'
[2023-09-28T08:27:38.925+02:00] [macros] [trace] [9189]   Done.  Final output: 'tacacs-key' **** END MACRO PROCESSING ****
[2023-09-28T08:27:38.925+02:00] [functions] [trace] [9189] process_macros_r()
[2023-09-28T08:27:38.925+02:00] [macros] [trace] [9189] **** BEGIN MACRO PROCESSING **** Processing: 'nagios'
[2023-09-28T08:27:38.926+02:00] [macros] [trace] [9189]   Done.  Final output: 'nagios' **** END MACRO PROCESSING ****
[2023-09-28T08:27:38.926+02:00] [functions] [trace] [9189] process_macros_r()
[2023-09-28T08:27:38.926+02:00] [macros] [trace] [9189] **** BEGIN MACRO PROCESSING **** Processing: 'tacacs-pw'
[2023-09-28T08:27:38.926+02:00] [macros] [trace] [9189]   Done.  Final output: 'tacacs-pw' **** END MACRO PROCESSING ****
[2023-09-28T08:27:38.926+02:00] [commands] [debug] [9189] Expanded Command Output: $USER1$/check_tacacs_plus_file.pl -H $HOSTADDRESS$ -k $ARG1$
[2023-09-28T08:27:38.926+02:00] [checks] [trace] [9189] Current running service checks: 1
[2023-09-28T08:27:38.926+02:00] [functions] [trace] [9189] process_macros_r()
[2023-09-28T08:27:38.926+02:00] [macros] [trace] [9189] **** BEGIN MACRO PROCESSING **** Processing: '$USER1$/check_tacacs_plus_file.pl -H $HOSTADDRESS$ -k $ARG1$'
[2023-09-28T08:27:38.926+02:00] [macros] [trace] [9189]   Processed 'USER1', To '/usr/local/nagios/libexec', Clean Options: 0, Free: 0
[2023-09-28T08:27:38.926+02:00] [macros] [trace] [9189]   Processed 'USER1', Clean Options: 0, Free: 0
[2023-09-28T08:27:38.926+02:00] [macros] [trace] [9189]   Cleaning options: global=0, local=0, effective=0
[2023-09-28T08:27:38.926+02:00] [macros] [trace] [9189]   Uncleaned macro.  Running output (25): '/usr/local/nagios/libexec'
[2023-09-28T08:27:38.926+02:00] [macros] [trace] [9189]   Just finished macro.  Running output (25): '/usr/local/nagios/libexec'
[2023-09-28T08:27:38.926+02:00] [macros] [trace] [9189]   macros[2] (HOSTADDRESS) match.
[2023-09-28T08:27:38.926+02:00] [macros] [trace] [9189]   Processed 'HOSTADDRESS', To 'tacacs-Host-IP', Clean Options: 0, Free: 1
[2023-09-28T08:27:38.926+02:00] [macros] [trace] [9189]   Processed 'HOSTADDRESS', Clean Options: 0, Free: 1
[2023-09-28T08:27:38.926+02:00] [macros] [trace] [9189]   Cleaning options: global=0, local=0, effective=0
[2023-09-28T08:27:38.926+02:00] [macros] [trace] [9189]   Uncleaned macro.  Running output (66): '/usr/local/nagios/libexec/check_tacacs_plus_file.pl -H tacacs-Host-IP'
[2023-09-28T08:27:38.926+02:00] [macros] [trace] [9189]   Just finished macro.  Running output (66): '/usr/local/nagios/libexec/check_tacacs_plus_file.pl -H tacacs-Host-IP'
[2023-09-28T08:27:38.926+02:00] [macros] [trace] [9189]   Processed 'ARG1', To 'tacacs-key', Clean Options: 0, Free: 0
[2023-09-28T08:27:38.926+02:00] [macros] [trace] [9189]   Processed 'ARG1', Clean Options: 0, Free: 0
[2023-09-28T08:27:38.926+02:00] [macros] [trace] [9189]   Cleaning options: global=0, local=0, effective=0
[2023-09-28T08:27:38.926+02:00] [macros] [trace] [9189]   Uncleaned macro.  Running output (78): '/usr/local/nagios/libexec/check_tacacs_plus_file.pl -H tacacs-Host-IP -k tacacs-key'
[2023-09-28T08:27:38.926+02:00] [macros] [trace] [9189]   Just finished macro.  Running output (78): '/usr/local/nagios/libexec/check_tacacs_plus_file.pl -H tacacs-Host-IP -k tacacs-key'
[2023-09-28T08:27:38.926+02:00] [macros] [trace] [9189]   Done.  Final output: '/usr/local/nagios/libexec/check_tacacs_plus_file.pl -H tacacs-Host-IP -k tacacs-key' **** END MACRO PROCESSING ****
[2023-09-28T08:27:38.926+02:00] [commands] [trace] [9189] raw::run: cmd='/usr/local/nagios/libexec/check_tacacs_plus_file.pl -H tacacs-Host-IP -k tacacs-key', timeout=60
[2023-09-28T08:27:38.926+02:00] [commands] [trace] [9189] raw::run: id=4 , process=0x2ca74a0
[2023-09-28T08:27:38.927+02:00] [commands] [trace] [9189] raw::run: start process success: id=4
[2023-09-28T08:27:38.927+02:00] [checks] [debug] [9189] run id=4 /usr/local/nagios/libexec/check_tacacs_plus_file.pl -H tacacs-Host-IP -k tacacs-key for service 80380 host our-tacacs-host
[2023-09-28T08:27:38.927+02:00] [events] [debug] [9189] ** Event Check Loop
[2023-09-28T08:27:38.927+02:00] [events] [debug] [9189] Next High Priority Event Time: Thu Sep 28 08:27:40 2023
[2023-09-28T08:27:38.927+02:00] [events] [debug] [9189] Next Low Priority Event Time:  Thu Sep 28 08:32:20 2023
[2023-09-28T08:27:38.927+02:00] [events] [debug] [9189] Current/Max Service Checks: 1/0
[2023-09-28T08:27:38.927+02:00] [events] [debug] [9189] No events to execute at the moment. Idling for a bit...
[2023-09-28T08:27:39.061+02:00] [commands] [trace] [9189] raw::finished: process=0x2ca74a0
[2023-09-28T08:27:39.061+02:00] [commands] [trace] [9189] raw::finished: id=4
[2023-09-28T08:27:39.061+02:00] [commands] [trace] [9189] raw::finished: id=4, start_time=Thu Sep 28 08:27:38 2023: , end_time=Thu Sep 28 08:27:39 2023: , exit_code=2, exit_status=0, output=''
[2023-09-28T08:27:39.061+02:00] [functions] [trace] [9189] checker::finished: res=0x7fa88725a320
[2023-09-28T08:27:39.927+02:00] [events] [debug] [9189] ** Event Check Loop
[2023-09-28T08:27:39.927+02:00] [events] [debug] [9189] Next High Priority Event Time: Thu Sep 28 08:27:40 2023
[2023-09-28T08:27:39.927+02:00] [events] [debug] [9189] Next Low Priority Event Time:  Thu Sep 28 08:32:20 2023
[2023-09-28T08:27:39.927+02:00] [events] [debug] [9189] Current/Max Service Checks: 1/0
[2023-09-28T08:27:39.927+02:00] [events] [debug] [9189] No events to execute at the moment. Idling for a bit...
[2023-09-28T08:27:40.927+02:00] [events] [debug] [9189] ** Event Check Loop
[2023-09-28T08:27:40.927+02:00] [events] [debug] [9189] Next High Priority Event Time: Thu Sep 28 08:27:40 2023
[2023-09-28T08:27:40.927+02:00] [events] [debug] [9189] Next Low Priority Event Time:  Thu Sep 28 08:32:20 2023
[2023-09-28T08:27:40.927+02:00] [events] [debug] [9189] Current/Max Service Checks: 1/0
[2023-09-28T08:27:40.927+02:00] [functions] [trace] [9189] handle_timed_event()
[2023-09-28T08:27:40.928+02:00] [events] [trace] [9189] ** Timed Event ** Type: 5, Run Time: Thu Sep 28 08:27:40 2023
[2023-09-28T08:27:40.928+02:00] [events] [trace] [9189] ** Check Result Reaper
[2023-09-28T08:27:40.928+02:00] [functions] [trace] [9189] checker::reap()
[2023-09-28T08:27:40.928+02:00] [checks] [trace] [9189] Starting to reap check results.
[2023-09-28T08:27:40.928+02:00] [checks] [trace] [9189] Found a check result (#1) to handle...
[2023-09-28T08:27:40.928+02:00] [checks] [debug] [9189] Handling check result for service 5833/80380...
[2023-09-28T08:27:40.928+02:00] [functions] [trace] [9189] handle_async_service_check_result()
[2023-09-28T08:27:40.928+02:00] [checks] [trace] [9189] ** Handling check result for service 'service_tacacs_plus' on host 'our-tacacs-host'...
[2023-09-28T08:27:40.928+02:00] [checks] [debug] [9189] HOST: our-tacacs-host, SERVICE: service_tacacs_plus, CHECK TYPE: Active, OPTIONS: 0, RESCHEDULE: Yes, EXITED OK: Yes, EXEC TIME: 0.13551800000000003, return CODE: 2, OUTPUT: 
[2023-09-28T08:27:40.928+02:00] [checks] [debug] [9189] Parsing check output Short Output: (No output returned from plugin) Long Output: nullptr Perf Data: nullptr
[2023-09-28T08:27:40.928+02:00] [checks] [debug] [9189] ST: HARD  CA: 7 MA: 7 CS: 2 LS: 2 LHS: 2
[2023-09-28T08:27:40.928+02:00] [checks] [debug] [9189] Service is in a non-OK state!
[2023-09-28T08:27:40.928+02:00] [checks] [debug] [9189] Host is currently UP, so we'll recheck its state to make sure...
[2023-09-28T08:27:40.928+02:00] [checks] [debug] [9189] * Using last known host state: 0
[2023-09-28T08:27:40.928+02:00] [checks] [debug] [9189] Current/Max Attempt(s): 7/7
[2023-09-28T08:27:40.928+02:00] [checks] [debug] [9189] Service has reached max number of rechecks, so we'll handle the error...
[2023-09-28T08:27:40.928+02:00] [functions] [trace] [9189] check_for_flapping()
[2023-09-28T08:27:40.928+02:00] [checks] [debug] [9189] Checking service 'service_tacacs_plus' on host 'our-tacacs-host' for flapping...
[2023-09-28T08:27:40.928+02:00] [checks] [debug] [9189] LFT=20.00, HFT=30.00, CPC=0.00, PSC=0.00%
[2023-09-28T08:27:40.928+02:00] [functions] [trace] [9189] host::check_for_flapping()
[2023-09-28T08:27:40.928+02:00] [checks] [debug] [9189] Checking host 'our-tacacs-host' for flapping...
[2023-09-28T08:27:40.928+02:00] [checks] [debug] [9189] LFT=20.00, HFT=30, CPC=0, PSC=0%
[2023-09-28T08:27:40.928+02:00] [functions] [trace] [9189] notifier::notify(0)
[2023-09-28T08:27:40.928+02:00] [functions] [trace] [9189] notifier::is_notification_viable_normal()
[2023-09-28T08:27:40.928+02:00] [notifications] [debug] [9189] Notifications are disabled, so notifications will not be sent out.
[2023-09-28T08:27:40.928+02:00] [checks] [debug] [9189] Rescheduling next check of service at Thu Sep 28 08:32:38 2023
[2023-09-28T08:27:40.928+02:00] [functions] [trace] [9189] get_next_valid_time()
[2023-09-28T08:27:40.928+02:00] [functions] [trace] [9189] get_next_valid_time_per_timeperiod()
[2023-09-28T08:27:40.928+02:00] [functions] [trace] [9189] get_next_valid_time_per_timeperiod 24x7 valid_time=1695882758
[2023-09-28T08:27:40.928+02:00] [functions] [trace] [9189] schedule_service_check()
[2023-09-28T08:27:40.928+02:00] [checks] [trace] [9189] Scheduling a non-forced, active check of service 'service_tacacs_plus' on host 'our-tacacs-host' @ Thu Sep 28 08:32:38 2023
[2023-09-28T08:27:40.928+02:00] [functions] [trace] [9189] resort_event_list()
[2023-09-28T08:27:40.928+02:00] [checks] [debug] [9189] Scheduling new service check event.
[2023-09-28T08:27:40.928+02:00] [functions] [trace] [9189] reschedule_event()
[2023-09-28T08:27:40.928+02:00] [functions] [trace] [9189] add_event()
[2023-09-28T08:27:40.928+02:00] [checks] [trace] [9189] Finished reaping 1 check results

Userlevel 6
Badge +18

Hi @TA-FFM can you check if the plugin return a “return code” by executing this command just après plugin execution:

echo $?

 

Badge +6

 

Badge +6

Hi Laurent, 

 

like this?

 

Regards

Badge +6

 

 

Sry, bad cropping before

Userlevel 6
Badge +18

Ok so output look like correct and return code too.

but the issue is I don’t know if Centreon Engine process can have access to /usr/local/nagios/libexec directory

Badge +6

Good Morning laurent,

 

well it is registered as $USER1$ since the old centreon and i have around ~200 skripts lying in there and only a few are having these problems. Hundreds of calls of scripts there work. Naturally centreon-engine has access-rights to that dir.

 

Regards

Timo

Badge +6

Hey @Laurent ,

 

any news here?

Userlevel 6
Badge +18

Hi @TA-FFM do you enable Centreon Perl connector in the command definition? If yes, can you disable it?

Reply