No values for external parameters since netxms agent 3.9.178
-
Hi all,
since NetXMS Agent Version 3.9.178 (last working version) we do not get values for the following external paramenter anymore
ExternalParameter = DefenderEngineLastUpdate:powershell -Command "& {Get-MpComputerStatus | Select -ExpandProperty AntivirusSignatureLastUpdated}"
If we run the powershell command directly on the node, it works without any problems.
Other powershell paramenter are however correctly transmitted and displayed - for example:ExternalParameter = Defender:powershell -Command "& {Get-MpComputerStatus | Select -ExpandProperty RealTimeProtectionEnabled}"
We have no idea anymore and suspect that there is a bug or changed syntax in netxms. Does anyone have the same problem?
best regards,
Alwin
-
Hi,
try to use ExternalParameterShellExec instead. Also, how long it take to execute this command? There could have been changes in handling execution timeouts. Agent log on debug level 6 could be helpful as well.
And what version you are using currently?
Best regards,
Victor -
Hi Victor,
the current Server an Agent version is: 4.1.404
The command needs 34ms to execute. In the agent configuration we have also added the line "ExternalParameterProviderTimeout = 60"
We try it with the following command (is this the correct syntax?)
ExternalParameterShellExec = DefenderEngineLastUpdate:powershell -Command "& {Get-MpComputerStatus | Select -ExpandProperty AntivirusSignatureLastUpdated}"
We added also the following parameters to the agent configuration file:
SubAgent = wineventsync.nsm
DebugTags=winsyncevent:6Now we have logs in the windows event log but no entrys for the executed external parameters.
best regards,
Alwin -
I've tried to run
powershell -Command "& {Get-MpComputerStatus | Select -ExpandProperty AntivirusSignatureLastUpdated}"
and the output starts from empty line:Thursday, July 28, 2022 1:01:30 PMNot sure if in previous versions agent was skipping empty lines, but currently it just takes the contents of the first line, which is emtpy.
Please try it e.g. this way:
ExternalParameter = DefenderEngineLastUpdate:powershell -Command "& Get-MpComputerStatus | Select -ExpandProperty AntivirusSignatureLastUpdated | Write-Host" -
-
Hi,
this is very strange. I just compared process execution and external parameter handling code in 3.9 and 4.1 and the only difference is that in 4.x agent replaces null characters with spaces in received command output. Theoretically if script returns null character in first line that could cause such difference in behavior.
Best regards,
Victor
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login