WSUS nsclient error

  • 1 June 2023
  • 1 reply
  • 76 views

Userlevel 1
Badge +11

Petite question sur wsus nsclient, je pense qu'il y a un bug.
Sans le 3eme argument, ca passe tout seul:

centreon-engine@MPAPPNMS01:~$ /usr/lib/centreon/plugins//centreon_nsclient_restapi.pl --plugin=apps::nsclient::restapi::plugin --mode=query --hostname=X.X.X.X --port='8443' --proto='https' --legacy-password='centreon' --timeout=10 --ssl-opt="SSL_verify_mode => SSL_VERIFY_NONE" --command=check_centreon_plugins --arg='apps::microsoft::wsus::local::plugin' --arg='updates-status'
OK: Updates With Client Errors: 0, With Server Errors: 77, Needing Files: 77, Needed By Computers: 7, Up-to-date: 2329 | 'updates_with_client_errors'=0;;;0; 'updates_with_server_errors'=77;;;0; 'updates_needing_files_count'=77;;;0; 'updates_needed_by_computers'=7;;;0; 'updates_up_to_date'=2329;;;0;

Mais avec le 3eme argument (comme defini dans nsclient.ini), ca passe pas:

NSClient++, Version: 0.5.2.41 2018-04-26, Platform: x64

Centreon plugin 20221115

centreon-engine@MPAPPNMS01:~$ /usr/lib/centreon/plugins//centreon_nsclient_restapi.pl --plugin=apps::nsclient::restapi::plugin --mode=query --hostname=X.X.X.X --port='8443' --proto='https' --legacy-password='centreon' --timeout=10 --ssl-opt="SSL_verify_mode => SSL_VERIFY_NONE" --command=check_centreon_plugins --arg='apps::microsoft::wsus::local::plugin' --arg='updates-status' --arg=' --wsus-server="" --wsus-port="" --filter-counters="" --warning-with-client-errors="" --critical-with-client-errors="" --warning-with-server-errors="" --critical-with-server-errors="" --warning-needing-files="" --critical-needing-files="" --warning-needed-by-computers="" --critical-needed-by-computers="" --warning-up-to-date="" --critical-up-to-date="" --verbose'
UNKNOWN: Command error: System.ArgumentException: Argument types do not match - at System.Linq.Expressions.Expression.Constant(Object value, Type type) - at System.Management.Automation.Language.DynamicMetaObjectExtensions.CastOrConvertMethodArgument(DynamicMetaObject target, Type parameterType, String parameterName, String methodName, List`1 temps, List`1 initTemps) - at System.Management.Automation.Language.PSInvokeMemberBinder.InvokeMethod(MethodBase mi, DynamicMetaObject target, DynamicMetaObject[] args, Boolean expandParameters, MethodInvocationType invocationInvocationType) - at System.Management.Automation.Language.PSInvokeMemberBinder.InvokeDotNetMethod(CallInfo callInfo, String name, PSMethodInvocationConstraints psMethodInvocationConstraints, MethodInvocationType methodInvocationType, DynamicMetaObject target, DynamicMetaObject[] args, BindingRestrictions restrictions, MethodInformation[] mi, Type errorExceptionType) - at System.Management.Automation.Language.PSInvokeMemberBinder.FallbackInvokeMember(DynamicMetaObject target, DynamicMetaObject[] args, DynamicMetaObject errorSuggestion) - at System.Dynamic.DynamicMetaObject.BindInvokeMember(InvokeMemberBinder binder, DynamicMetaObject[] args) - at System.Dynamic.DynamicMetaObjectBinder.Bind(Object[] args, ReadOnlyCollection`1 parameters, LabelTarget returnLabel) - at System.Runtime.CompilerServices.CallSiteBinder.BindCore[T](CallSite`1 site, Object[] args) - at System.Dynamic.UpdateDelegates.UpdateAndExecute4[T0,T1,T2,T3,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3) - at System.Management.Automation.Interpreter.DynamicInstruction`5.Run(InterpretedFrame frame) - at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)

 


1 reply

Userlevel 5
Badge +14

is this post bugged ?

I can’t answer anything, it says something gone wrong :/

 

screenshot of my reply I can’t post here for whatever reason

 

 

Reply