Skip to main content

Hello,

i test on my centreon préprod, version 24.10.

 

i test a windows centreon agent on windows 2022

 

all test are ok in cmdline on host

on centreon web, all is  unknow, execute command failed
 

 

my conf = host to poller no encryption

 

on centreon server a host is connect on port 4317

 

 

eventlog on host

 

Regards

Jean-Francois

Hi,

Few questions while waiting for our meet : 

  • Is the hostname strictly the same in Centreon ? (SRVDCRADM002)
  • Is the SYSTEMLANGUAGE macro on the host correct, according to the Windows host language ?
  • Did you configure any encryption ?

 

Thanks


Hello

yes the name SRVDCRADM002 is strictly same on windows hostname and name of Host on centreon

yes i have test with SYSTEMLANGUAGE in FR end EN with same result

 

Windows os is in french

no encryption use for test :)

Regards

 


There is a known issue with reverse connection, did you try the workaround here ? 

in the registry key :

HKEY_LOCAL_MACHINE\SOFTWARE\Centreon\CentreonMonitoringAgent

Create a new DWORD value : reverse_connection

with value 0 for mode “agent send to the poller”, or 1 for “poller initiated connecion” ( = agent listen on the tcp port 4317)


Hello

 

i have add  key and restart a service centreon monitoring agent on windows server

 

i have immediatly the same error on log

Regards


Can you paste here the content of /etc/centreon-engine/otl_server.json , on Poller ?


Hello,

Can you configure centagent to log into a file as this:

Then, can you send me log contents at jcroques@centreon.com ?

Regards


@fmattes 

{
    "otel_server": {
        "host": "0.0.0.0",
        "port": 4317
    },
   "max_length_grpc_log":0,
   "centreon_agent":{
      "check_interval":60,
      "export_period":10
   }
}​

 

@jcr 

i have active a log file copy paste i don’t have option on the wath for send file :)

i have stop restart a service for add information in the log file

n2024-11-15 14:38:47.656] :2024-11-15 14:38:47.673] mcentreon-monitoring-agent] 6error] nbireactor.cc:187] 0x22507234a20 peer:10.4.123.200:4317 client::OnDone(CANCELLED) 
2024-11-15 14:38:53.610] centreon-monitoring-agent] .error] ebireactor.cc:99] 0x2036a1e0cb0 client peer:10.4.123.200:4317 fail read from stream
 

Regards


@jcr 

 

oops i have change log_level  error to trace

 

new trace:

<2024-11-15 14:38:47.656] 7centreon-monitoring-agent] aerror] ebireactor.cc:99] 0x22507234a20 client peer:10.4.123.200:4317 fail read from stream
m2024-11-15 14:38:47.673] 7centreon-monitoring-agent] aerror] ebireactor.cc:187] 0x22507234a20 peer:10.4.123.200:4317 client::OnDone(CANCELLED) 
2024-11-15 14:38:53.610] 5centreon-monitoring-agent] -error] [bireactor.cc:99] 0x2036a1e0cb0 client peer:10.4.123.200:4317 fail read from stream
a2024-11-15 14:47:52.479] 5centreon-monitoring-agent] -info] main_win.cc:169] centreon-monitoring-agent start
r2024-11-15 14:47:52.479] 5centreon-monitoring-agent] -debug] [grpc_client.cc:51] client this=0x1c4c5070d90 activate compression deflate
t2024-11-15 14:47:52.479] 5centreon-monitoring-agent] -info] grpc_client.cc:78] unencrypted connection to 10.4.123.200:4317
12024-11-15 14:47:52.481] 5centreon-monitoring-agent] -info] scheduler.cc:160] schedule 0 checks to execute in 1s
12024-11-15 14:47:52.481] 5centreon-monitoring-agent] -debug] [bireactor.cc:51] create client this=0x1c4c50a5380 peer:10.4.123.200:4317
12024-11-15 14:47:52.490] 5centreon-monitoring-agent] -trace] [bireactor.cc:140] 0x1c4c50a5380 client init { host: "SRVDCRADM002" centreon_version { major: 24 minor: 10 } } sent
n2024-11-15 14:47:52.957] 5centreon-monitoring-agent] -trace] [bireactor.cc:89] 0x1c4c50a5380 client peer 10.4.123.200:4317 receive: config { check_interval: 60 max_concurrent_checks: 100 export_period: 10 check_timeout: 30 use_exemplar: true services { command_name: "OS-Windows-Centreon-Monitoring-Agent-Host-Alive" command_line: "cmd.exe /C echo Centreon Agent" } services { service_description: "Sessions" command_name: "OS-Windows-Centreon-Monitoring-Agent-Sessions" command_line: "\"C:/Program Files/Centreon/Plugins/centreon_plugins.exe\" --plugin os::windows::local::plugin --mode sessions --language=\"fr\" --timeout=\"30\" --warning-sessions-created=\"\" --critical-sessions-created=\"\" --warning-sessions-disconnected=\"\" --critical-sessions-disconnected=\"\" --warning-sessions-reconnected=\"\" --critical-sessions-reconnected=\"\" --warning-sessions-active=\"\" --critical-sessions-active=\"\" --warning-sessions-disconnected-current=\"\" --critical-sessions-disconnected-current=\"\" --use-new-perfdata" } services { service_description: "Pending-Reboot" command_name: "OS-Windows-Centreon-Monitoring-Agent-Pending-Reboot" command_line: "\"C:/Program Files/Centreon/Plugins/centreon_plugins.exe\" --plugin os::windows::local::plugin --mode pending-reboot --warning-status=\"%{RebootPending} =~ /true/i\" --critical-status=\"\" --timeout=\"30\"" } services { service_description: "Ntp" command_name: "OS-Windows-Centreon-Monitoring-Agent-Ntp" command_line: "\"C:/Program Files/Centreon/Plugins/centreon_plugins.exe\" --plugin os::windows::local::plugin --mode time --warning=\"-5:5\" --critical=\"-10:10\" --ntp-hostname=\"\" --ntp-port=\"\" --timeout=\"10\"" } services { service_description: "Updates" command_name: "OS-Windows-Centreon-Monitoring-Agent-Updates" command_line: "\"C:/Program Files/Centreon/Plugins/centreon_plugins.exe\" --plugin os::windows::local::plugin --mode updates --timeout=\"30\"  --warning-pending-updates=\"1\" --critical-pending-updates=\"\" --filter-mandatory" } }
}2024-11-15 14:47:52.957] :centreon-monitoring-agent] ginfo] ]scheduler.cc:160] schedule 5 checks to execute in 60s
62024-11-15 14:47:52.957] :centreon-monitoring-agent] gtrace] scheduler.cc:172] check expected to start at 2024-11-15 13:47:52.9577985 for service  command cmd.exe /C echo Centreon Agent
g2024-11-15 14:47:52.957] 7centreon-monitoring-agent] ntrace] ]scheduler.cc:172] check expected to start at 2024-11-15 13:48:04.9577985 for service Sessions command "C:/Program Files/Centreon/Plugins/centreon_plugins.exe" --plugin os::windows::local::plugin --mode sessions --language="fr" --timeout="30" --warning-sessions-created="" --critical-sessions-created="" --warning-sessions-disconnected="" --critical-sessions-disconnected="" --warning-sessions-reconnected="" --critical-sessions-reconnected="" --warning-sessions-active="" --critical-sessions-active="" --warning-sessions-disconnected-current="" --critical-sessions-disconnected-current="" --use-new-perfdata
d2024-11-15 14:47:52.957] 7centreon-monitoring-agent] ntrace] ]scheduler.cc:172] check expected to start at 2024-11-15 13:48:16.9577985 for service Pending-Reboot command "C:/Program Files/Centreon/Plugins/centreon_plugins.exe" --plugin os::windows::local::plugin --mode pending-reboot --warning-status="%{RebootPending} =~ /true/i" --critical-status="" --timeout="30"
"2024-11-15 14:47:52.958] 7centreon-monitoring-agent] ntrace] ]scheduler.cc:172] check expected to start at 2024-11-15 13:48:28.9577985 for service Ntp command "C:/Program Files/Centreon/Plugins/centreon_plugins.exe" --plugin os::windows::local::plugin --mode time --warning="-5:5" --critical="-10:10" --ntp-hostname="" --ntp-port="" --timeout="10"
"2024-11-15 14:47:52.958] 7centreon-monitoring-agent] ntrace] ]scheduler.cc:172] check expected to start at 2024-11-15 13:48:40.9577985 for service Updates command "C:/Program Files/Centreon/Plugins/centreon_plugins.exe" --plugin os::windows::local::plugin --mode updates --timeout="30"  --warning-pending-updates="1" --critical-pending-updates="" --filter-mandatory
a2024-11-15 14:47:52.983] 4centreon-monitoring-agent] itrace] tscheduler.cc:210] start check for service  command cmd.exe /C echo Centreon Agent
2024-11-15 14:47:52.983] :centreon-monitoring-agent] rtrace] ncheck.cc:83] start check for service 
r2024-11-15 14:47:52.983] 4centreon-monitoring-agent] odebug] eprocess.cc:181] start process: cmd.exe
c2024-11-15 14:47:52.994] 4centreon-monitoring-agent] otrace] eprocess.cc:192] process started: cmd.exe pid: 12092
:2024-11-15 14:47:53.024] 4centreon-monitoring-agent] otrace] eprocess.cc:378]  process: cmd.exe read from stdout: Centreon Agent

n2024-11-15 14:47:53.025] 1centreon-monitoring-agent] tdebug] gprocess.cc:370] fail read from stdout of process cmd.exe: Le canal de communication a été fermé
2024-11-15 14:47:53.025] 1centreon-monitoring-agent] odebug] gprocess.cc:423] fail read from stderr of process cmd.exe: Le canal de communication a été fermé
a2024-11-15 14:47:53.026] 1centreon-monitoring-agent] ndebug] rprocess.cc:226] end of process cmd.exe, exit_status=0
2024-11-15 14:47:53.026] 1centreon-monitoring-agent] ntrace] rcheck.cc:137] end check for service  cmd: OS-Windows-Centreon-Monitoring-Agent-Host-Alive
g2024-11-15 14:47:53.026] -centreon-monitoring-agent] otrace] oscheduler.cc:233] end check for service  command cmd.exe /C echo Centreon Agent
o2024-11-15 14:47:53.482] 4centreon-monitoring-agent] etrace] tbireactor.cc:140] 0x1c4c50a5380 client otel_request { resource_metrics { resource { attributes { key: "host.name" value { string_value: "SRVDCRADM002" } } attributes { key: "service.name" value { string_value: "" } } } scope_metrics { metrics { name: "status" description: "Centreon Agent\r" gauge { data_points { time_unix_nano: 1731678473026284200 as_int: 0 } } } } } } sent
}2024-11-15 14:47:53.546] 4centreon-monitoring-agent] einfo] imain_win.cc:281] SvcCtrlHandler 4
S2024-11-15 14:48:04.958] 4centreon-monitoring-agent] etrace] tscheduler.cc:210] start check for service Sessions command "C:/Program Files/Centreon/Plugins/centreon_plugins.exe" --plugin os::windows::local::plugin --mode sessions --language="fr" --timeout="30" --warning-sessions-created="" --critical-sessions-created="" --warning-sessions-disconnected="" --critical-sessions-disconnected="" --warning-sessions-reconnected="" --critical-sessions-reconnected="" --warning-sessions-active="" --critical-sessions-active="" --warning-sessions-disconnected-current="" --critical-sessions-disconnected-current="" --use-new-perfdata
u2024-11-15 14:48:04.958] 4centreon-monitoring-agent] etrace] tcheck.cc:83] start check for service Sessions
s2024-11-15 14:48:04.958] 4centreon-monitoring-agent] edebug] tprocess.cc:181] start process: C:/Program Files/Centreon/Plugins/centreon_plugins.exe
r2024-11-15 14:48:04.961] 4centreon-monitoring-agent] etrace] tprocess.cc:192] process started: C:/Program Files/Centreon/Plugins/centreon_plugins.exe pid: 9236
n2024-11-15 14:48:05.528] 4centreon-monitoring-agent] etrace] tprocess.cc:378]  process: C:/Program Files/Centreon/Plugins/centreon_plugins.exe read from stdout: OK: Sessions created: 0, disconnected: 0, reconnected : 0, current active : 1, current disconnected : 4 
d2024-11-15 14:48:05.528] 0centreon-monitoring-agent] ttrace] nprocess.cc:378]  process: C:/Program Files/Centreon/Plugins/centreon_plugins.exe read from stdout: | 'sessions.created.total.count'=0;;;0; 'sessions.disconnected.total.count'=0;;;0; 'sessions.reconnected.total.count'=0;;;0; 'sessions.active.current.count'=1;;;0; 'sessions.disconnected.current.count'=4;;;0;
r2024-11-15 14:48:05.528] 2centreon-monitoring-agent] ntrace] oprocess.cc:378]  process: C:/Program Files/Centreon/Plugins/centreon_plugins.exe read from stdout: 

2024-11-15 14:48:05.564] >centreon-monitoring-agent] cdebug] -process.cc:370] fail read from stdout of process C:/Program Files/Centreon/Plugins/centreon_plugins.exe: Le canal de communication a été fermé
u2024-11-15 14:48:05.564] rcentreon-monitoring-agent] ]debug] eprocess.cc:423] fail read from stderr of process C:/Program Files/Centreon/Plugins/centreon_plugins.exe: Le canal de communication a été fermé
o2024-11-15 14:48:05.566] centreon-monitoring-agent] 5debug] nprocess.cc:226] end of process C:/Program Files/Centreon/Plugins/centreon_plugins.exe, exit_status=0
_2024-11-15 14:48:05.566] 0centreon-monitoring-agent] 5debug] storage: parsing service  perfdata string ''sessions.created.total.count'=0;;;0; 'sessions.disconnected.total.count'=0;;;0; 'sessions.reconnected.total.count'=0;;;0; 'sessions.active.current.count'=1;;;0; 'sessions.disconnected.current.count'=4;;;0;'
e2024-11-15 14:48:05.566] ;centreon-monitoring-agent] .debug] storage: got new perfdata (name=sessions.created.total.count, value=0, unit=, warning=nan, critical=nan, min=0, max=nan)
r2024-11-15 14:48:05.566] ncentreon-monitoring-agent] .debug] storage: got new perfdata (name=sessions.disconnected.total.count, value=0, unit=, warning=nan, critical=nan, min=0, max=nan)
r2024-11-15 14:48:05.566] ncentreon-monitoring-agent] .debug] storage: got new perfdata (name=sessions.reconnected.total.count, value=0, unit=, warning=nan, critical=nan, min=0, max=nan)
r2024-11-15 14:48:05.566] ncentreon-monitoring-agent] .debug] storage: got new perfdata (name=sessions.active.current.count, value=1, unit=, warning=nan, critical=nan, min=0, max=nan)
r2024-11-15 14:48:05.566] ncentreon-monitoring-agent] .debug] storage: got new perfdata (name=sessions.disconnected.current.count, value=4, unit=, warning=nan, critical=nan, min=0, max=nan)
r2024-11-15 14:48:05.566] ncentreon-monitoring-agent] .trace] echeck.cc:137] end check for service Sessions cmd: OS-Windows-Centreon-Monitoring-Agent-Sessions
o2024-11-15 14:48:05.566] ncentreon-monitoring-agent] .trace] escheduler.cc:233] end check for service Sessions command "C:/Program Files/Centreon/Plugins/centreon_plugins.exe" --plugin os::windows::local::plugin --mode sessions --language="fr" --timeout="30" --warning-sessions-created="" --critical-sessions-created="" --warning-sessions-disconnected="" --critical-sessions-disconnected="" --warning-sessions-reconnected="" --critical-sessions-reconnected="" --warning-sessions-active="" --critical-sessions-active="" --warning-sessions-disconnected-current="" --critical-sessions-disconnected-current="" --use-new-perfdata
 


Everything seems fine. The only issue is a service name with a \r at the end.

@jfegea Have you some time for a meet session?


@jcr  yes i’m free now send me invit


https://meet.google.com/bfc-idxu-ykm?authuser=0

 


As discussed with our Lead dev, the issue was linked to a bad default configuration on our templates. This is fixed in the last connectors release, you can update your monitoring connectors and it should be ok.

 


Hello

 

after meet with ​@jcr 

modif on all service 

now a status is send to a central

 

 


Reply