0

i am trying to run a custom monitor in the up-time monitoring system and when i have it open a .bat that i have created it gives me an error stating that the @echo off is not a command.

the .bat file contains

@echo off
start c:\OpenSSL-Win64\bin\openssl.exe

when i run the .bat in windows it opens up openssl and lets me pass in information

the error i am getting when running on uptime is

Status: OK Message:

D:\uptime software\scripts\custom>@echo off

D:\uptime software\scripts\custom>start c:\OpenSSL-Win64\bin\openssl.exe , error data returned: '@echo' is not recognized as an internal or external command, operable program or batch file. Output:

D:\uptime software\scripts\custom>@echo off

D:\uptime software\scripts\custom>start c:\OpenSSL-Win64\bin\openssl.exe Response time: 531 ms

I need the custom monitor to open the .bat and have it pass in commands to check the xml web sites through their corresponding ports.

for example i need this web site for XML to be checked "blank-xml.mycompany.com:4021"

i can run s_client -connect blank-xml.mycompany.com:4021 in openssl and see that the port is actually active and running. then i check the packages that have been loaded by running <BL30DOC><XPLN/></BL30DOC> and it returns information of the current packages that have been loaded.

how would i get the .bat to open with up-time and pass in arguments that are needed to run?

Update

I have changed the encoding to the .bat to be ANSI and now get this response from uptime

Status: OK Message: (No output) Output: Response time: 547 ms

the problem now seems to be that the argument i want to run is actually not doing anything.

the argument i am trying to run is s_client -connect blank-xml.mycompany.com:4021 and i still get the same response from up-time with the argument in place.

bgrif
  • 253
  • 1
  • 4
  • 14
  • 1
    It looks like you used a text editor that saved the batch file with some Unicode BOM (judging by the `` characters before the `@echo off` command). Don't do that - save it as plain text without a BOM. – nobody Dec 04 '14 at 14:43
  • how would i do that? – bgrif Dec 04 '14 at 14:44
  • i figured out that i needed to save the .bat with the encoding as ANSI – bgrif Dec 04 '14 at 14:50
  • 1
    Depends on the editor. If you're using Notepad++ I think the Encoding menu --> Convert to ANSI would do it. – rojo Dec 04 '14 at 14:51

0 Answers0