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

V

vlad.fratila

@vlad.fratila
Unfollow Follow
About
Posts
3
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Agent Actions parameters not working
    V vlad.fratila
    Support

    I am trying to call an action from an agent with a parameter. I defined the action in the agent's config file like this:

    ActionShellExec = Echo: /tmp/script.sh $1
    

    The script only echo's it's first parameter to a file.

    I am trying to call the action from an Action Object Tool.
    If I define "Agent's Action" as: Echo, it works and I get in agent's log file with debug level 9 the following:

    [02-Sep-2014 09:48:19.708] [DEBUG] [session:1] Message dump:
      ** 00430000000000380000000200000002
      ** 00000057010000000000000800450063
      ** 0068006F6E205B3200000058007FF229
      ** 0000000000000000
      ** code=0x0043 (CMD_ACTION) flags=0x0000 id=2 size=56 numFields=2
      ** [    87] STRING "Echo"
      ** [    88] INT32  0
    
    [02-Sep-2014 09:48:19.708] [DEBUG] [session:1] Received message CMD_ACTION
    [02-Sep-2014 09:48:19.708] [DEBUG] Executing action Echo of type 3
    [02-Sep-2014 09:48:19.708] [DEBUG] SH_EXEC: Expanding command "/tmp/script.sh"
    [02-Sep-2014 09:48:19.708] [DEBUG] SH_EXEC: Executing "/tmp/script.sh"
    [02-Sep-2014 09:48:19.714] [DEBUG] [session:1] Sending message CMD_REQUEST_COMPLETED (size 32)
    [02-Sep-2014 09:48:19.715] [DEBUG] [session:1] Session with 10.20.1.7 closed
    

    But if I define "Agent's Action" as: Echo parameter1, it fails with a communication failure.
    The log looks like this:

    [02-Sep-2014 09:51:59.670] [DEBUG] [session:1] Message dump:
      ** 00430000000000500000000200000002
      ** 00000057010000000000001E00450063
      ** 0068006F00200070006100720061006D
      ** 0065007400650072003100004C000000
      ** 00000058007F00000000000041006700
      ** code=0x0043 (CMD_ACTION) flags=0x0000 id=2 size=80 numFields=2
      ** [    87] STRING "Echo parameter1"
      ** [    88] INT32  0
    
    [02-Sep-2014 09:51:59.670] [DEBUG] [session:1] Received message CMD_ACTION
    [02-Sep-2014 09:51:59.670] [DEBUG] [session:1] Sending message CMD_REQUEST_COMPLETED (size 32)
    [02-Sep-2014 09:51:59.671] [DEBUG] [session:1] Session with 10.20.1.7 closed
    

    This happens in version 1.2.14 and 1.2.16 also.

    Thank you,
    Vlad


  • Output of agent action
    V vlad.fratila
    Support

    Hi,

    This is the config of my agent:

    MasterServers = 10.20.1.7,10.10.1.7,10.20.1.107
    Action = test_action: /bin/echo "hello"
    

    I already checked that option and i expected to see "hello" in the pop-up confirmation window that appears, but all it says is:
    "Action test_action executed successfully on node <name of node>"


  • Output of agent action
    V vlad.fratila
    Support

    I defined an action in an agent's config file. Something like:

    Action = test_action: /bin/echo "hello"
    

    Is there a way to define an Object Tool that will call this action, and also have the output of the action displayed in the NetXMS management interface?

  • 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