Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse
Brand Logo

NetXMS Forum

  1. Home
  2. Support
  3. No values for external parameters since netxms agent 3.9.178

No values for external parameters since netxms agent 3.9.178

Scheduled Pinned Locked Moved Support
6 Posts 3 Posters 28.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A
    A
    Alwin
    wrote on last edited by
    #1

    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


    external_parameter_no_values.PNG

    1 Reply Last reply
    0
    • V
      V
      Victor Kirhenshtein
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • A
        A
        Alwin
        wrote on last edited by
        #3

        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:6

        Now we have logs in the windows event log but no entrys for the executed external parameters.

        best regards,
        Alwin

        1 Reply Last reply
        0
        • F
          F
          Filipp Sudanov
          wrote on last edited by
          #4

          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 PM
          

          Not 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"

          1 Reply Last reply
          0
          • A
            A
            Alwin
            wrote on last edited by
            #5

            Hi Filipp,

            we have tried another command, which also generate an empty line in the first output line.

            Thanks for your workaround - it works great!

            It would be nice if the behaviour was the same as in the previous versions.

            best regards,
            Alwin

            1 Reply Last reply
            0
            • V
              V
              Victor Kirhenshtein
              wrote on last edited by
              #6

              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

              1 Reply Last reply
              0

              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
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              Powered by NodeBB Contributors
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups