Skip to main content
Solved

centreon agent on windows Host not working

  • November 14, 2024
  • 13 replies
  • 513 views

Forum|alt.badge.img+5

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

Best answer by jfegea

Hello

 

after meet with ​@jcr 

modif on all service 

now a status is send to a central

 

 

13 replies

fmattes
Centreonian
Forum|alt.badge.img+11
  • Centreonian
  • November 14, 2024

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


Forum|alt.badge.img+5
  • Author
  • Steward *
  • November 14, 2024

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

 


fmattes
Centreonian
Forum|alt.badge.img+11
  • Centreonian
  • November 15, 2024

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)


Forum|alt.badge.img+5
  • Author
  • Steward *
  • November 15, 2024

Hello

 

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

 

i have immediatly the same error on log

Regards


fmattes
Centreonian
Forum|alt.badge.img+11
  • Centreonian
  • November 15, 2024

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


Forum|alt.badge.img+3
  • Centreonian
  • November 15, 2024

Hello,

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

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

Regards


Forum|alt.badge.img+5
  • Author
  • Steward *
  • November 15, 2024

@fmattes 

[root@SRVRSCSUP301 ~]# cat /etc/centreon-engine/otl_server.json
{
    "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

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

Regards


Forum|alt.badge.img+5
  • Author
  • Steward *
  • November 15, 2024

@jcr 

 

oops i have change log_level  error to trace

 

new trace:

[2024-11-15 14:38:47.656] [centreon-monitoring-agent] [error] [bireactor.cc:99] 0x22507234a20 client peer:10.4.123.200:4317 fail read from stream
[2024-11-15 14:38:47.673] [centreon-monitoring-agent] [error] [bireactor.cc:187] 0x22507234a20 peer:10.4.123.200:4317 client::OnDone(CANCELLED) 
[2024-11-15 14:38:53.610] [centreon-monitoring-agent] [error] [bireactor.cc:99] 0x2036a1e0cb0 client peer:10.4.123.200:4317 fail read from stream
[2024-11-15 14:47:52.479] [centreon-monitoring-agent] [info] [main_win.cc:169] centreon-monitoring-agent start
[2024-11-15 14:47:52.479] [centreon-monitoring-agent] [debug] [grpc_client.cc:51] client this=0x1c4c5070d90 activate compression deflate
[2024-11-15 14:47:52.479] [centreon-monitoring-agent] [info] [grpc_client.cc:78] unencrypted connection to 10.4.123.200:4317
[2024-11-15 14:47:52.481] [centreon-monitoring-agent] [info] [scheduler.cc:160] schedule 0 checks to execute in 1s
[2024-11-15 14:47:52.481] [centreon-monitoring-agent] [debug] [bireactor.cc:51] create client this=0x1c4c50a5380 peer:10.4.123.200:4317
[2024-11-15 14:47:52.490] [centreon-monitoring-agent] [trace] [bireactor.cc:140] 0x1c4c50a5380 client init { host: "SRVDCRADM002" centreon_version { major: 24 minor: 10 } } sent
[2024-11-15 14:47:52.957] [centreon-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] [info] [scheduler.cc:160] schedule 5 checks to execute in 60s
[2024-11-15 14:47:52.957] [centreon-monitoring-agent] [trace] [scheduler.cc:172] check expected to start at 2024-11-15 13:47:52.9577985 for service  command cmd.exe /C echo Centreon Agent
[2024-11-15 14:47:52.957] [centreon-monitoring-agent] [trace] [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
[2024-11-15 14:47:52.957] [centreon-monitoring-agent] [trace] [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] [centreon-monitoring-agent] [trace] [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] [centreon-monitoring-agent] [trace] [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
[2024-11-15 14:47:52.983] [centreon-monitoring-agent] [trace] [scheduler.cc:210] start check for service  command cmd.exe /C echo Centreon Agent
[2024-11-15 14:47:52.983] [centreon-monitoring-agent] [trace] [check.cc:83] start check for service 
[2024-11-15 14:47:52.983] [centreon-monitoring-agent] [debug] [process.cc:181] start process: cmd.exe
[2024-11-15 14:47:52.994] [centreon-monitoring-agent] [trace] [process.cc:192] process started: cmd.exe pid: 12092
[2024-11-15 14:47:53.024] [centreon-monitoring-agent] [trace] [process.cc:378]  process: cmd.exe read from stdout: Centreon Agent

[2024-11-15 14:47:53.025] [centreon-monitoring-agent] [debug] [process.cc:370] fail read from stdout of process cmd.exe: Le canal de communication a été fermé
[2024-11-15 14:47:53.025] [centreon-monitoring-agent] [debug] [process.cc:423] fail read from stderr of process cmd.exe: Le canal de communication a été fermé
[2024-11-15 14:47:53.026] [centreon-monitoring-agent] [debug] [process.cc:226] end of process cmd.exe, exit_status=0
[2024-11-15 14:47:53.026] [centreon-monitoring-agent] [trace] [check.cc:137] end check for service  cmd: OS-Windows-Centreon-Monitoring-Agent-Host-Alive
[2024-11-15 14:47:53.026] [centreon-monitoring-agent] [trace] [scheduler.cc:233] end check for service  command cmd.exe /C echo Centreon Agent
[2024-11-15 14:47:53.482] [centreon-monitoring-agent] [trace] [bireactor.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] [centreon-monitoring-agent] [info] [main_win.cc:281] SvcCtrlHandler 4
[2024-11-15 14:48:04.958] [centreon-monitoring-agent] [trace] [scheduler.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
[2024-11-15 14:48:04.958] [centreon-monitoring-agent] [trace] [check.cc:83] start check for service Sessions
[2024-11-15 14:48:04.958] [centreon-monitoring-agent] [debug] [process.cc:181] start process: C:/Program Files/Centreon/Plugins/centreon_plugins.exe
[2024-11-15 14:48:04.961] [centreon-monitoring-agent] [trace] [process.cc:192] process started: C:/Program Files/Centreon/Plugins/centreon_plugins.exe pid: 9236
[2024-11-15 14:48:05.528] [centreon-monitoring-agent] [trace] [process.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 
[2024-11-15 14:48:05.528] [centreon-monitoring-agent] [trace] [process.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;
[2024-11-15 14:48:05.528] [centreon-monitoring-agent] [trace] [process.cc:378]  process: C:/Program Files/Centreon/Plugins/centreon_plugins.exe read from stdout: 

[2024-11-15 14:48:05.564] [centreon-monitoring-agent] [debug] [process.cc:370] fail read from stdout of process C:/Program Files/Centreon/Plugins/centreon_plugins.exe: Le canal de communication a été fermé
[2024-11-15 14:48:05.564] [centreon-monitoring-agent] [debug] [process.cc:423] fail read from stderr of process C:/Program Files/Centreon/Plugins/centreon_plugins.exe: Le canal de communication a été fermé
[2024-11-15 14:48:05.566] [centreon-monitoring-agent] [debug] [process.cc:226] end of process C:/Program Files/Centreon/Plugins/centreon_plugins.exe, exit_status=0
[2024-11-15 14:48:05.566] [centreon-monitoring-agent] [debug] 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;'
[2024-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)
[2024-11-15 14:48:05.566] [centreon-monitoring-agent] [debug] storage: got new perfdata (name=sessions.disconnected.total.count, value=0, unit=, warning=nan, critical=nan, min=0, max=nan)
[2024-11-15 14:48:05.566] [centreon-monitoring-agent] [debug] storage: got new perfdata (name=sessions.reconnected.total.count, value=0, unit=, warning=nan, critical=nan, min=0, max=nan)
[2024-11-15 14:48:05.566] [centreon-monitoring-agent] [debug] storage: got new perfdata (name=sessions.active.current.count, value=1, unit=, warning=nan, critical=nan, min=0, max=nan)
[2024-11-15 14:48:05.566] [centreon-monitoring-agent] [debug] storage: got new perfdata (name=sessions.disconnected.current.count, value=4, unit=, warning=nan, critical=nan, min=0, max=nan)
[2024-11-15 14:48:05.566] [centreon-monitoring-agent] [trace] [check.cc:137] end check for service Sessions cmd: OS-Windows-Centreon-Monitoring-Agent-Sessions
[2024-11-15 14:48:05.566] [centreon-monitoring-agent] [trace] [scheduler.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
 


Forum|alt.badge.img+3
  • Centreonian
  • November 15, 2024

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?


Forum|alt.badge.img+5
  • Author
  • Steward *
  • November 15, 2024

@jcr  yes i’m free now send me invit


Forum|alt.badge.img+3
  • Centreonian
  • November 15, 2024

fmattes
Centreonian
Forum|alt.badge.img+11
  • Centreonian
  • November 15, 2024

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.

 


Forum|alt.badge.img+5
  • Author
  • Steward *
  • Answer
  • November 15, 2024

Hello

 

after meet with ​@jcr 

modif on all service 

now a status is send to a central