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. How to use nxaction from command line

How to use nxaction from command line

Scheduled Pinned Locked Moved Support
7 Posts 2 Posters 22.4k 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.
  • T
    T
    tivanni
    wrote on last edited by
    #1

    Hi,

    i need to run a netxms action from a script, so i want to use nxaction from command line. I have Netxms installed on Debian.
    My action is saved as "test_action", when executed it send a mail.
    if i run from command line "nxaction netxms test_action" (where netxms is the name of the node of the Netxms Server) , I got "Error 500: Internal Error".
    How can i run this action from command line?
    Thank you 🙂

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

      Hi!

      nxaction is a tool intended for connecting to agent and executing action on agent (defined in nxagentd.conf using Action parameter). For executing server action simpliest way is to use nxevent for sending custom event and executing action you need in event processing policy as usual.

      Best regards,
      Victor

      1 Reply Last reply
      0
      • T
        T
        tivanni
        wrote on last edited by
        #3

        Thank You!

        nxevent is avaible from command line?

        I have installed version 1.2.7, and I cannot find in /usr/local/bin the nxevent utility. The following is the content of the directory:
        netxmsd      nxagentd    nxapush      nxencpasswd  nxscript    nxsnmpwalk
        nxaction    nxap        nxdbmgr      nxget        nxsnmpget    nxupload
        nxadm        nxappget    nxdevcfg    nxmibc      nxsnmpset

        If i search on filesystem, I found i found only the source code of nxevent.

        Thank you again.

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

          Hi!

          If you install NetXMS from sources, you should add --with-client option to configure.

          Best regards,
          Victor

          1 Reply Last reply
          0
          • T
            T
            tivanni
            wrote on last edited by
            #5

            Yes, I've installed netxms from source.

            When I've installed netxms, i didn't use the --with-client option...Have I to re-execute the installation process with the --with-client option?
            Are riskes in this operation?

            Thank you

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

              Hi!

              Yes, you have to run configure and make again. There should be no risks, it will just build few additional binaries.

              Best regards,
              Victor

              1 Reply Last reply
              0
              • T
                T
                tivanni
                wrote on last edited by
                #7

                Thank you!
                It works fine!
                nxevent is a very useful utility!!!!

                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