Skip to main content

Hello,

I would like to monitor several Windows hosts with Centreon. I would like to do this monitoring via an NRPE agent. I followed the "https://docs.centreon.com/21.10/fr/integrations/plugin-packs/procedures/operatingsystems-windows-nsclient-05-nrpe.html" doc.

Unfortunately, I'm stuck. Indeed, I can't install the "check_centreon_nrpe" on my Centreon server. I can't install the "centreon-pack-operatingsystems-windows-nsclient-05-nrpe". I have a message that the packages could not be found

My Centreon was installed via the official ISO and no source modifications were made.

Could you help me?

Thanks in advance for your answers !

Hello Captain o7

Sorry about this, we need to update the monitoring procedure.

You can try to install centreon nrpe3 plugin by using the following command:

yum install centreon-nrpe3-plugin

Then you can check the communication using this command:

/usr/lib64/nagios/plugins/check_centreon_nrpe3 -H 192.168.1.99 -p 5666 -2 -P 8192 

Of course you need to change 192.168.1.99 with the IP of your windows server. It should return the version of your NSClient++:

I (0.5.2.41 2018-04-26) seem to be doing fine...

The option -P 8192 may be different if you don’t use the Centreon NSClient++.

Once everything works, you can define your host using the template Os-Windows-NSClient-05-NRPE-custom and change the macros

  • NRPECLIENT: check_centreon_nrpe3
  • NRPEEXTRAOPTIONS: -n -2 -8192

And chery on the cake, you can change it directly on the template to avoid doing this every time.

Do not hesitate !


Thanks for the solution. I changed the different elements in the template :)

 

Unfortunately, it still doesn't work. I have another error when I execute the command:

CHECK_NRPE STATE CRITICAL: Socket timeout after 10 seconds.


The NSclient++ is installed ?
No Windows Firewall or network firewall that may block the traffic between your centreon infrastructure and the server windows ?

Is a telnet on the port 5666 from Centreon is working ?


I tried to telnet port 5666 from my Centreon server to the Windows server to be monitored. It works fine.

 

The firewall of my Windows server is disabled and the NRPE is already working on a Linux server.

NSClient Centreon version is installed on the server.


You get any logs from Nsclient++ ?

In C:\Program Files\Centreon NSClient++ ?


2022-01-26 14:12:08: error:c:\source\0.5.2\modules\NRPEServer\NRPEServer.cpp:121: Certificate not found: C:\Program Files\Centreon NSClient++/security/certificate.pem (generating a default certificate)
2022-01-26 14:12:08: error:c:\source\0.5.2\modules\NRPEServer\NRPEServer.cpp:121: CA not found: C:\Program Files\Centreon NSClient++/security/ca.pem (generating a default CA)
2022-01-26 14:12:30: error:c:\source\0.5.2\modules\WEBServer\WEBServer.cpp:179: Failed to start server: failed to open listener
2022-01-26 14:39:21: error:c:\source\0.5.2\modules\WEBServer\WEBServer.cpp:179: Failed to start server: failed to open listener
2022-01-26 14:40:49: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-01-26 16:17:53: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-01-26 16:35:10: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-01-26 16:37:48: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: L’opération d’entrée/sortie a été abandonnée en raison de l’arrêt d’un thread ou à la demande d’une application
2022-01-26 16:46:06: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: L’opération d’entrée/sortie a été abandonnée en raison de l’arrêt d’un thread ou à la demande d’une application
2022-01-26 16:59:49: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-01-26 17:02:24: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-01-26 17:03:13: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-01-26 17:05:29: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-01-27 09:52:56: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: L’opération d’entrée/sortie a été abandonnée en raison de l’arrêt d’un thread ou à la demande d’une application
2022-01-27 09:52:56: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: L’opération d’entrée/sortie a été abandonnée en raison de l’arrêt d’un thread ou à la demande d’une application
2022-01-27 09:52:56: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: L’opération d’entrée/sortie a été abandonnée en raison de l’arrêt d’un thread ou à la demande d’une application
2022-01-27 09:52:56: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: L’opération d’entrée/sortie a été abandonnée en raison de l’arrêt d’un thread ou à la demande d’une application
2022-01-27 09:52:56: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: L’opération d’entrée/sortie a été abandonnée en raison de l’arrêt d’un thread ou à la demande d’une application
2022-01-27 09:52:56: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: L’opération d’entrée/sortie a été abandonnée en raison de l’arrêt d’un thread ou à la demande d’une application
2022-01-27 09:53:15: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-01-27 09:53:56: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-01-27 09:53:56: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-01-27 09:53:56: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-01-27 09:53:56: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-01-27 09:53:56: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-01-27 09:53:56: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-01-27 09:54:56: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-01-27 09:54:56: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: L’opération d’entrée/sortie a été abandonnée en raison de l’arrêt d’un thread ou à la demande d’une application
2022-01-27 09:54:56: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: L’opération d’entrée/sortie a été abandonnée en raison de l’arrêt d’un thread ou à la demande d’une application
2022-01-27 09:54:56: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-01-27 09:54:56: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: L’opération d’entrée/sortie a été abandonnée en raison de l’arrêt d’un thread ou à la demande d’une application
2022-01-27 09:54:56: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: L’opération d’entrée/sortie a été abandonnée en raison de l’arrêt d’un thread ou à la demande d’une application
2022-01-27 09:58:19: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: L’opération d’entrée/sortie a été abandonnée en raison de l’arrêt d’un thread ou à la demande d’une application
2022-01-27 09:59:56: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-01-27 09:59:56: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-01-27 10:00:15: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: L’opération d’entrée/sortie a été abandonnée en raison de l’arrêt d’un thread ou à la demande d’une application
2022-01-27 10:01:34: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: L’opération d’entrée/sortie a été abandonnée en raison de l’arrêt d’un thread ou à la demande d’une application
2022-01-27 10:04:56: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-01-27 10:04:56: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-01-27 10:09:56: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-01-27 10:09:56: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-01-27 10:09:56: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-01-27 10:09:56: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-01-27 10:09:56: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file

Sorry, the logs are in French :(

But I think it's not a problem for you ;)


**mumble**

Could you change in your nsclient.ini the parameter:

WEBServer = 1

to 0 ?

And then restart the NSClient++ agent and try again ?


I changed the WebServer value to 0 and restarted the Windows server completely.

But it still doesn't work.


See in DM: it was the wrong daemon that was running on the windows server.


[...]

Once everything works, you can define your host using the template Os-Windows-NSClient-05-NRPE-custom and change the macros

  • NRPECLIENT: check_centreon_nrpe3
  • NRPEEXTRAOPTIONS: -n -2 -8192

And chery on the cake, you can change it directly on the template to avoid doing this every time.

Do not hesitate !

 

Ciao! It is possible to change the 21.10 Windows Plugin Pack so the defaults value are the one that you suggested?

Thanks!


Hello @Dalfo ,

We need to think about that to avoid break change with the old user that still use check_centreon_nrpe and check_centreon_nrpe3.
 

We can’t create a lot of false alerts if the user just update the pack and do not install the check_centreon_nrpe3 plugin.

 

I’m going to create a internal ticket.


Hello,

I would like to update this topic because the problem appears again on my Windows servers. I think that the resolution of the problem last time was a stroke of luck … Always the same mistake: “CHECK_NRPE STATE CRITICAL: Socket timeout after 10 seconds.”

Has anyone had this problem recently?

 

Here are the logs:

 

2022-03-14 10:19:21: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: short read
2022-03-14 10:21:34: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: L’opération d’entrée/sortie a été abandonnée en raison de l’arrêt d’un thread ou à la demande d’une application
2022-03-14 10:22:58: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-03-14 10:24:58: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-03-14 10:26:34: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-03-14 10:28:38: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-03-14 10:29:43: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-03-14 10:31:34: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: L’opération d’entrée/sortie a été abandonnée en raison de l’arrêt d’un thread ou à la demande d’une application
2022-03-14 10:34:50: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-03-14 10:36:04: error:c:\source\0.5.2\include\socket/server.hpp:258: Failed to handle incoming connection: remote_endpoint: Le descripteur de fichier fourni n’est pas valide
2022-03-14 10:36:34: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-03-14 10:36:39: error:c:\source\0.5.2\include\socket/server.hpp:258: Failed to handle incoming connection: remote_endpoint: Le descripteur de fichier fourni n’est pas valide
2022-03-14 10:37:57: error:c:\source\0.5.2\include\socket/server.hpp:258: Failed to handle incoming connection: remote_endpoint: Le descripteur de fichier fourni n’est pas valide
2022-03-14 10:39:13: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-03-14 10:39:58: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-03-14 10:40:17: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-03-14 10:41:05: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-03-14 10:41:30: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-03-14 10:44:32: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-03-14 10:46:34: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-03-14 10:49:21: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: L’opération d’entrée/sortie a été abandonnée en raison de l’arrêt d’un thread ou à la demande d’une application
2022-03-14 10:51:35: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-03-14 10:54:58: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-03-14 10:56:34: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: L’opération d’entrée/sortie a été abandonnée en raison de l’arrêt d’un thread ou à la demande d’une application

 


Reply