Ad Widget

Collapse

Run remote command for logged in user

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ITguru
    Junior Member
    • Jan 2017
    • 10

    #1

    Run remote command for logged in user

    Hi
    I have a question regarding remote command actions:

    I have a virtual windows 10 box. On this system there is a programm running (not as a service) as a logged in user "supplies".
    I can monitor if the process of the application stopped.
    Now I tried to configure a remote action to kill the process and restart it.
    But this seems not to work for the currently logged in user "supplies".

    How can I start the process with the user "supplies" that is logged in?

    Thanks in advance!
  • batchenr
    Senior Member
    • Sep 2016
    • 440

    #2
    Originally posted by ITguru
    Hi
    I have a question regarding remote command actions:

    I have a virtual windows 10 box. On this system there is a programm running (not as a service) as a logged in user "supplies".
    I can monitor if the process of the application stopped.
    Now I tried to configure a remote action to kill the process and restart it.
    But this seems not to work for the currently logged in user "supplies".

    How can I start the process with the user "supplies" that is logged in?

    Thanks in advance!
    why wont add a zabbix user to the process ?

    Comment

    • ITguru
      Junior Member
      • Jan 2017
      • 10

      #3
      Hi Thanks for your reply

      maybe I have to be a bit more specific.
      Meanwhile I managed to get the process start via the action but its hidden (hidden process only visible in task manager). Maybe that is not a zabbix issue but how do I manage to start the process visible (with window / gui)? When I run the action on the remote machine via cmd it works.

      What I did:
      - zabbix-agents runs as supplies user
      - zabbix server action starts cpau on remote machine to start the process
      Code:
      C:\Scripts\cpau.exe -u domain\supplies -p pass -ex C:\Scripts\GMS_restart_DruckAppServer.cmd
      But the process only starts hidden.

      Comment

      • batchenr
        Senior Member
        • Sep 2016
        • 440

        #4
        Originally posted by ITguru
        Hi Thanks for your reply

        maybe I have to be a bit more specific.
        Meanwhile I managed to get the process start via the action but its hidden (hidden process only visible in task manager). Maybe that is not a zabbix issue but how do I manage to start the process visible (with window / gui)? When I run the action on the remote machine via cmd it works.

        What I did:
        - zabbix-agents runs as supplies user
        - zabbix server action starts cpau on remote machine to start the process
        Code:
        C:\Scripts\cpau.exe -u domain\supplies -p pass -ex C:\Scripts\GMS_restart_DruckAppServer.cmd
        But the process only starts hidden.
        you can run remote commands on win server via zabbix_get
        for exsample

        Code:
        zabbix_get -s $REMOTESERVERIP -p 10050 -I $ZABBIXSERVERIP-k system.run["ipconfig"]
        can download rpm from here :


        (disable selinux on zabbix so it wont make any issues.)

        Comment

        • ITguru
          Junior Member
          • Jan 2017
          • 10

          #5
          I am sure if this answere solves my question.

          My problem is: When Zabbix triggers an action on my remote server the programm which gets started by the trigger will start, but the GUI of the programm is not visible on the remote server.

          What do I have to change that the action starts the programm on the remote user with a visible GUI?

          Thanks!

          Comment

          • SteRin
            Junior Member
            • Apr 2020
            • 3

            #6
            Hi ITguru
            did you solve your problem? I'm having the same issue.

            Thanks
            Stefano

            Comment

            Working...