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. Action - execute on management server - help

Action - execute on management server - help

Scheduled Pinned Locked Moved Support
4 Posts 2 Posters 12.8k 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
    mewmi
    wrote on last edited by
    #1

    I am trying to run an external program (.bat or .exe file) whenever a threshold is reached.

    I added an Actions Configuration called MyAction of type 'Execute command on management server'
    Question 1: What should be entered under 'Command'

    I set one of my thresholds, and I configured my event processing policy's Action to MyAction

    Going over the example provided in https://www.netxms.org/forum/index.php/topic,204.0.html
    I edited the netxmsd.conf in C:\NetXMS\etc\ to include

    Action = MyAction:test.bat
    

    Question 2: Where (in which folder/path) should test.bat be located to be succesfully called.

    So far, the .bat file is still not running whenever the threshold is reached.

    Any help is appreciated.

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

      Hello!

      To run command on management server itself, you don't need to change server's configuration file. You just need to specify your executable under "Command". If you wish to run .bat or .cmd file, you may need to use form of

      cmd.exe /C <your_cmd>

      Executable can be located anywhere, but if it is not in system PATH, you should add full path to it when defining action.

      Best regards,
      Victor

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

        Thanks for the reply. I managed to get it working.

        However, i am confused as to the example provided then. In what case would i need to edit the conf files to include those Actions?

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

          You have to edit conf files if you wish to execute commands remotely via NetXMS agent. In that case you should add appropriate Action entries in agent configuration files.

          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