Ad Widget

Collapse

How to execute a remote command manually

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • frater
    Senior Member
    • Oct 2010
    • 340

    #1

    How to execute a remote command manually

    I am at the moment confronted with a Windows Small Business server that has its remote portal in invalid state. This was detected by the external command "httpspeed", which I made for exactly this purpose.


    {Template_Standalone:httpspeed[ https://{HOST.CONN1}/Remote/ ].last(0)}<-1

    This same portal is my way to access this server and because of this I can't do much more than manually restart the server.
    I also checked the windows logs in Zabbix and it showed it got in problems after an update generating many I/O errors.
    The server (SBS 2003) needs to be replaced IMHO, but the client needs to get convinced.....

    I now want to use Zabbix to remotely restart this server, preferably by a manual action. I saw this post http://www.zabbix.com/forum/showthread.php?t=18927 but I have no idea how to implement it.

    I was completely overwhelmed after opening the "action" dialogue.

    Can someone hold me by the hand?

    PS I'm a contributor to this project (created several scripts)
    Attached Files
    Last edited by frater; 06-08-2011, 11:10.
    Zabbix agents on Linux, FreeBSD, Windows, AVM-Fritz!box, DD-WRT and QNAP
  • untergeek
    Senior Member
    Zabbix Certified Specialist
    • Jun 2009
    • 512

    #2
    Zabbix can't really do anything to a box that is down, unless you have a remote script which can cause a power-cycle to be issued to a smart power-control box.

    Comment

    • frater
      Senior Member
      • Oct 2010
      • 340

      #3
      Hi Untergeek, thanks for the reply.

      The server is not down, it just isn't remotely accessible.
      I'm still getting data from the machine and that means a lot of messages in "Windows Logs" which zabbix is sending.

      I can't access the machine remotely because these services are in a bad state.

      I would really want to reboot the machine initiated by the zabbix agent. That agent is currently my only means of communication with the machine.
      Zabbix agents on Linux, FreeBSD, Windows, AVM-Fritz!box, DD-WRT and QNAP

      Comment

      • Tractorboy
        Member
        • Oct 2010
        • 98

        #4
        would shutdown.exe work

        shutdown -m {servername} /r /f /c "Reason" /t (delay secs).

        This has to be run with an account that has correct server side rights.

        This would be the manual restart approach.

        you can also recycle services using the sc command, this amy can you back to having remote access rights. (This can then be automated within zabbix to auto recovery the affected service)
        Last edited by Tractorboy; 10-08-2011, 12:32. Reason: Title change

        Comment

        • frater
          Senior Member
          • Oct 2010
          • 340

          #5
          Hi Tractorboy,

          Yes, "shutdown" should work (that server is already running fine again, but I would still like to have that feature for the future).

          My problem is the GUI.
          Could you post some screenshots?


          BTW: Anyone noticed that new tool for making screenshots in Win7 (accessories)?
          Zabbix agents on Linux, FreeBSD, Windows, AVM-Fritz!box, DD-WRT and QNAP

          Comment

          Working...