Hello,
We are experiencing an issue with our Centreon Hyper-V monitoring due to a localization mismatch between the NSClient++ agent and the Hyper-V environment.
Context:
- Hyper-V Version: Microsoft Windows Server 2022 Standard
- NSClient++ Version: Centreon-NSClient-0.5.2.41-20240909-x64.exe
- Centreon Plugin Used:
-
/usr/bin/perl /opt/centreon-plugins/src/centreon_plugins.pl --plugin=apps::protocols::nrpe::plugin --custommode=nsclient --mode=query --hostname='10.0.xx.xx' --port='8443' --proto='https' --username='' --password='xxxxxx' --legacy-password='xxxxxx' --ssl-opt="SSL_verify_mode => SSL_VERIFY_NONE" --command=check_centreon_plugins --arg='apps::microsoft::hyperv::2012::local::plugin' --arg='node-integration-service' --arg=' --filter-vm="" --filter-note="" --filter-status="" --warning-global-status="%{integration_service_state} =~ /Update required/i" --critical-global-status="" --warning-service-status="" --critical-service-status="not %{primary_status} =~ /Ok/i" --verbose'
Issue Description:
When running the Hyper-V node-integration-service check, we receive critical alerts because the NSClient++ script is not correctly handling localization settings. The PowerShell script executed by Centreon forces the culture to en-US, but Hyper-V still returns service status descriptions in French. As a result, Centreon cannot correctly interpret the service states.
Example of returned errors:
CRITICAL: 7 problem(s) detected critical: integration service 'Interface de services d'invité' status: -/- critical: integration service 'Pulsation' status: -/- critical: integration service 'change de paires clé-valeur' status: -/- critical: integration service 'Arrêt' status: -/- critical: integration service 'Synchronisation date/heure' status: -/- critical: integration service 'VSS' status: -/-
These status messages should be in English (e.g., "Guest Service Interface", "Heartbeat", "Key-Value Pair Exchange", "Shutdown", "Time Synchronization", "VSS") but are instead returned in French.
Steps Taken So Far:
- Executed the command with
--ps-display
to retrieve the PowerShell script being run. - Confirmed that the script attempts to set
en-US
locale, but Hyper-V still outputs French service descriptions.
Expected Behavior:
- Hyper-V service statuses should be retrieved in English so that Centreon can correctly process them.
- The plugin should properly handle non-English Hyper-V environments, or provide an option to manually map localized status descriptions to their English equivalents.
Request:
- Could you confirm whether this is a known issue with
Centreon-NSClient-0.5.2.41-20240909-x64.exe
? - Is there a recommended way to force English responses from Hyper-V, or should the plugin be updated to support localized service descriptions?
Thank you for your assistance.