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. Trigger Action on remote host

Trigger Action on remote host

Scheduled Pinned Locked Moved Support
5 Posts 3 Posters 38.9k 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.
  • U
    U
    [email protected]
    wrote on last edited by
    #1

    My remote action is not doing anything, even though I am getting email alerts:

    The batch file I'm trying to trigger is in c:\NetXMS\batches\kill_qv.bat and contains the command "Taskkill /IM qv.exe /F".  It is just to kill processes when it exceed a certain threshold.

    Config file looks like this:
    #
    # NetXMS agent configuration file
    # Created by agent installer at Wed Nov 24 14:21:18 2021
    #

    MasterServers = 192.168.85.88
    ConfigIncludeDir = C:\NetXMS\etc\nxagentd.conf.d
    LogFile = {syslog}
    FileStore = C:\NetXMS\var
    SubAgent = filemgr.nsm
    SubAgent = ping.nsm
    SubAgent = logwatch.nsm
    SubAgent = mqtt.nsm
    SubAgent = netsvc.nsm
    SubAgent = portcheck.nsm
    SubAgent = ssh.nsm
    SubAgent = wineventsync.nsm
    SubAgent = winperf.nsm
    Action = kill_qv_saftatlqv:cmd.exe /C "c:\NetXMS\batches\kill_qv.bat"

    I also tried: Action = kill_qv:cmd.exe /C "c:\NetXMS\batches\kill_qv.bat" but nothing works.

    My action looks like this (see atttached):
    Name: kill_qv_saftatlqv
    Agent's action: kill_qv

    Processing policy (see attached).

    I hope you can assist to get my remove actions triggered.

    Thanks
    Marius


    action.png

    Proacessing_policy.png

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

      Hi,

      try using

      ActionShellExec = kill_qv:c:\NetXMS\batches\kill_qv.bat

      in agent configuration file.

      Best regards,
      Victor

      1 Reply Last reply
      0
      • U
        U
        [email protected]
        wrote on last edited by
        #3

        Hi

        Thanks for the reply.

        I updated the agent file, but still only see the emails, but no action:

        #
        # NetXMS agent configuration file
        # Created by agent installer at Wed Nov 24 14:21:18 2021
        #

        MasterServers = 192.168.85.88
        ConfigIncludeDir = C:\NetXMS\etc\nxagentd.conf.d
        LogFile = {syslog}
        FileStore = C:\NetXMS\var
        SubAgent = filemgr.nsm
        SubAgent = ping.nsm
        SubAgent = logwatch.nsm
        SubAgent = mqtt.nsm
        SubAgent = netsvc.nsm
        SubAgent = portcheck.nsm
        SubAgent = ssh.nsm
        SubAgent = wineventsync.nsm
        SubAgent = winperf.nsm
        ActionShellExec = kill_qv:c:\NetXMS\batches\kill_qv.bat

        The batch file works when I run it manually, but doesn't kick off on alerts.

        It is not just this one action that is not working.  Since I've setup this Windows server I'm not able to get the actions working. 


        Event.png

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

          Hi!

          There's an issue - when we call .cmd file that produces some output, the execution fails.  (https://track.radensolutions.com/issue/NX-2242)

          Currently you can try this in agent configuration file:
          ActionShellExec = kill_qv:c:\NetXMS\batches\kill_qv.bat >nul

          1 Reply Last reply
          0
          • U
            U
            [email protected]
            wrote on last edited by
            #5

            Great!  This worked.

            Thank you.

            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