Execute an application

chapuischapuis
Hi,



I have a problem when I try to execute an application.

I put my bat file in C:Program FilesServersCheck_Monitoringexternal



Then, in the execute an application textbox of the alert page of my rule, I put the complete path, so C:Program FilesServersCheck_Monitoringexternaltesweb00_http_status.bat



Note that I add at the beginning of my bat file the following line: cd C:Program FilesServersCheck_Monitoringexternal



And nothing appears... It seems that my bat file is not launched.



Any idea?



Thanks



Cédric Christinaz

Comments

  • AdministratorAdministrator
    When the external app is executed, you should have a file created in the alerts subfolder called "execute.conf"



    What is the content of that file?
  • chapuischapuis
    The content of the file execute.conf is:



    [execute.conf]

    App=C:Program FilesServersCheck_Monitoringexternaltesweb00_http_status.bat



    Of course when I launch manually my bat file, it works fine.



    Thanks










  • AdministratorAdministrator
    What does your batch file do? You have to remember that it is launched by a service and not under the account you are using right now.
  • chapuischapuis
    ok, so my batch file stops and starts a service on a remote server by using the microsoft program sc.exe.

    Yes, it is true that when I launch my batch file, it is with the domain administrator account.

    And it is not the case when serverscheck launches my batch file, isn't it?

    I use a batch file because the service I have to restart is not stable and I have to wait a delay before starting the service. I have also more than one services to restart.

    Do you have a solution ? Is it possible to run the serverscheck services with a domain admin account ?



    Thanks
  • AdministratorAdministrator
    Yes the serverscheck monitoring service can run under a domain admin account.



    Probably this is the reason why it does not work.
  • chapuischapuis
    Problem solved !

    Now the serverscheck monitoring service runs under a domain admin account.



    Thank you very much for your help!
  • AdministratorAdministrator
    No problem. Glad it is solved.
This discussion has been closed.