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. VB Scripts or BAT files

VB Scripts or BAT files

Scheduled Pinned Locked Moved Support
5 Posts 3 Posters 21.2k 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.
  • M
    M
    maxknight
    wrote on last edited by
    #1

    Hi,

    Is there any way by which we can call VB Scripts or BAT files on remote server after a poll or when a threshould condition is met?

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

      Hello!

      Yes, you can, but you will need NetXMS agent running on a remote server. Configuration will consist from several steps:

      1. On remote server, define an action in agent's configuration file (nxagentd.conf):
      Action = MyAction:my_command.exe
      

      or

      ActionShellExec = MyAction:my_script.cmd
      

      where MyAction is the name of your defined action - it will be used later in configuration.

      1. In a threshold configuration, select event you wish to be sent when threshold is violated.

      2. Define action on server - go to Control Panel -> Actions and create new action of type "Execute action on remote agent". In the remote host field, enter IP address of remote server or use %a macro - it will be expanded to the address of a host which generates the event. In an action field, enter name of the action defined on agent - MyAction in our example.

      3. Add a rule to event processing policy - in events column add event you have selected on step 2, and in action column add action defined in step 3. Save the policy.

      That's all. Now when threshold will be violated, your configured action will be executed on remote host.

      Best regards,
      Victor

      1 Reply Last reply
      0
      • M
        M
        maxknight
        wrote on last edited by
        #3

        Victor,

        Thanks for the updates. Love this product  🙂

        1 Reply Last reply
        0
        • A
          A
          Anth0ny
          wrote on last edited by
          #4

          Victor, can you explain a second option too, "Execute command on management server"? How it works and what's a different from "Execute action on remote agent"?

          Please.
           🙂

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

            Execute action on management server means that given command will be executed on a machine where NetXMS server runs. In this case, parent process for a command will be netxmsd itself.

            Execute action on remote agent means that given command will be executed on a (remote) machine where NetXMS agent runs. In this case, parent process for a command will be nxagentd.

            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