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. Agent's action will be ignored [SOLVED]

Agent's action will be ignored [SOLVED]

Scheduled Pinned Locked Moved Support
8 Posts 2 Posters 47.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.
  • M
    M
    MartinR
    wrote on last edited by
    #1

    Hi there, after hours of googling I hope to get help here.
    I just want to execute a command on the agent's computer, but it still ignores it.

    • I successfully configured an alarm with somehow action (send an E-mail).
    • I additionally configured an Agent's action named 'shutthisdown' and configured it to the same alarm, which sends the email.
    • examined the log file, but I can not find an entry about any command to execute.
      Only wevtapi.dll was not found.

    Here is the Agent config file:

    --8<--
    #
    # NetXMS agent configuration file
    # Created by agent installer at Tue Jun 25 10:47:56 2013
    #

    DebugLevel = 9
    Controlservers = netxms.lorenz-messtechnik.local
    MasterServers = netxms.lorenz-messtechnik.local
    ConfigIncludeDir = C:\NetXMS\etc\nxagentd.conf.d
    #LogFile = {syslog}
    LogFile = C:\NetXMS\debuglog.txt
    FileStore = C:\NetXMS\var
    SubAgent = ecs.nsm
    SubAgent = ping.nsm
    SubAgent = logwatch.nsm
    SubAgent = portcheck.nsm
    SubAgent = winperf.nsm
    # Action= shutthisdown:cmd.exe /c "shutdown /s /t 180 /f"
    Action= shutthisdown:cmd.exe /c "dir c:\ > c:\1.txt"
    SubAgent = wmi.nsm
    SubAgent = ups.nsm

    # UPS subagent configuration section
    *UPS
    Device = 0:"COM2:":APC
    -->8--

    Many thanks for your help

    Martin

    1 Reply Last reply
    0
    • M
      M
      MartinR
      wrote on last edited by
      #2

      Oh, sorry.
      I should tell you some versions:
      Server and Agent are running in W2k3R2
      I use the actual netxms version 1.2.7
      The notification of the ups works fine on that agent.

      Thank you for help.

      Martin

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

        Can you please show the screenshots of action configuration on server and appropriate event policy rule? Also, can you try to execute action manually with nxaction command line tool?

        Best regards,
        Victor

        1 Reply Last reply
        0
        • M
          M
          MartinR
          wrote on last edited by
          #4

          Hi Victor,
          action definition and processing rules are attached.
          I defined two actions in this processing rule. The mail as second action will be sent as expected.
          The shutdown initiated with the shutdown button of the Object Details View of the client works as expected, too.
          nxaction command line tool executes the action correctly (as expected).
          Thank you for your help.
          Best Regards
          Martin


          action.jpg

          eventrule.jpg

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

            Hi!

            You have an error in action configuration - you have to specify remote host where to execute an action. Usually you can use macro %a here to execute it on event source.

            Best regards,
            Victor

            1 Reply Last reply
            0
            • M
              M
              MartinR
              wrote on last edited by
              #6

              Hi,
              I now tried different versions of the Agent's action line.

              %a shutthisdown
              <name_of_machine> shutthisdown
              <IP-Address> shutthisdown
              nxaction <name_of_machine> shutthisdown

              I assumed that "Agent's action" means of course the agent that initiates the action.

              Can you please give me an example for a line that executes a command on the agent that causes the action (maybe with %a or %n)? The penny has not dropped yet.
              Thank you for your help.
              Best Regards
              Martin

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

                Hi!

                You should put %a in "Remote Host" field and shutthisdown in "Agent action" field.

                Best regards,
                Victor

                1 Reply Last reply
                0
                • M
                  M
                  MartinR
                  wrote on last edited by
                  #8

                  Hi,
                  now the penny dropped.
                  The agent reacts now as expected.

                  Thank you very much for your help

                  Best Regards
                  Martin

                  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