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. watch service and start automatically

watch service and start automatically

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

    Hello,
    i want to watch a service called FileWaveWinClient.
    The Alarm works fine, but the Server action does not work.

    In agent´s config file I added this line:
    ActionShellExec = StartFileWaveService:"C:\Windows\system32\net.exe" start FileWaveWinClient

    I tried also:
    ActionShellExec = StartFileWaveService:net start FileWaveWinClient

    In Actions Configuration I added
    Name: Start_FileWaveWinClient_Service
    Type: Execute command on remote node via agent
    Remote host <empty>
    Agents´s action: StartFileWaveService
    (See attachment "Action Configuration.png")

    I create a Event Processing Policy
    Events: ... Process not running
    Alarm - this configuration works fine. The Alarm is working
    Server Actions: Start_FileWaveWinClient_Service - does not work
    (See attachment "Event Processing Policy.png")

    The Alarm works fine, but the Server action does not work.

    Thank you
    Rainer


    Action Configuration.png

    Event Processing Policy.png

    1 Reply Last reply
    0
    • F
      F
      Filipp Sudanov
      wrote on last edited by
      #2

      In action properties you need to specify hostname/ip address of the machine where your netxms agent is running. This is made so for greater flexibility, as event may be coming from one node, but you might need to execute the action on another system, for example.

      You can use %a macro in "Remote host" field - in this case IP address of node where the event is coming from will be used.

      1 Reply Last reply
      0
      • R
        R
        rainerh
        wrote on last edited by
        #3

        Thank you very much  🙂 😄
        No it works fine

        I have the problem to add this line to agent config file

        ActionShellExec = StartFileWaveService:"C:\Windows\system32\net.exe" start FileWaveWinClient

        To all of my clients.
        Only to add, not to send each client the same config file

        Please help and thank you so much
        Rainer

        1 Reply Last reply
        0
        • F
          F
          Filipp Sudanov
          wrote on last edited by
          #4

          Have a look at "Agent policies" in templates. One of the option is "Agent configuration" policy, where you can specify agent config lines. When template is added to a node, these config lines will be sent to agent and will start working after agent restart.

          1 Reply Last reply
          0
          • R
            R
            rainerh
            wrote on last edited by
            #5

            I have made a Template with automatic bind to all clients with running service I need (FileWaveWinClient)
            In this Template I choose Agent Policies and created a new "Agent Configuration" policy called StartFileWaveClientService
            I only inserted this (1) line:
            ActionShellExec = StartFileWaveService:"C:\Windows\system32\net.exe" start FileWaveWinClient
            (see AgentPolicy.png)
            For test I removed 2 clients and poll "Automatic bind"
            The 2 (test) clients added automatically to this Template

            Until now every thing works perfect - thank you

            But the agent config file at the new clients is not modified and the line I need is not in agent´s config file
            I waited a long time

            Thank you
            Rainer


            AgentPolicy.png

            1 Reply Last reply
            0
            • F
              F
              Filipp Sudanov
              wrote on last edited by
              #6

              Yes, I did not mention this - config policies are not actually modifying the main agent config file. Each policy confiig is kept in a separate file in config_ap under agent's DataDirectory (by default C:\Windows\System32\ config\systemprofile\ AppData\Local\nxagentd on windows). When agent starts it reads these files. In recent agent versions it dumps actual configuration into it's log file, so your line should be visible there.

              1 Reply Last reply
              0
              • R
                R
                rainerh
                wrote on last edited by
                #7

                I was looking for a bug that isn't a bug at all. The system is already working fine. I just thought that this line is added after agent restart. You can check the success quite simply by reading out the "Supported actions" on the client, and the desired one is there

                Many many Thanks for this perfect support
                Rainer  😄 😄 😄 😄 😄

                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