When trying to use the command-line Probe Utility to gather the status of a service this syntax was used:
pu -u administrator -p <password> /<domain>/<hub>/<robot>/net_connect test_service <host name> <port>
but it is not showing the correct status as always returns status = 0
For example when trying to check if SMTP server is up (port 25) on a server named my_smtp_server:
\Nimsoft\bin\pu.exe -u administrator -p <password> /my_domain/my_hub/my_robot/net_connect test_service my_smtp_server 25
hostname PDS_PCH 11 my_smtp_server
ip PDS_PCH 3 25
port PDS_I 2 0
status PDS_I 2 0
tused PDS_I 2 1
It returns a status = 0, even though the SMTP server is up and running, and listening on port 25.
In the example above,
\Nimsoft\bin\pu.exe -u administrator -p <password> /my_domain/my_hub/my_robot/net_connect test_service my_smtp_server ##.##.##.## 25
the command shows that the ip receives an incorrect value, particularly the port.
hostname PDS_PCH 11 my_smtp_server
ip PDS_PCH 3 25
port PDS_I 2 0
status PDS_I 2 0
tused PDS_I 2 1
When running the callback test_service directly from the Probe Utility (IM or Admin Console), the IP can be left empty and it will still show the correct status:
Therefore, in the command line Probe Utility , pu.exe, the 3 first arguments are required, and they need to be entered in the same order.
pu -u administrator -p <password> /<domain>/<hub>/<robot>/net_connect test_service <host name> <IP> <port>
The 3 arguments, <host name>, <IP>, and <port> must be supplied to run the callback test_service:
pu -u administrator -p <password> /<domain>/<hub>/<robot>/net_connect test_service <host name> <IP> <port>
Then, the command above should be:
\Nimsoft\bin\pu.exe -u administrator -p <my_password> /my_domain/my_hub/my_robot/net_connect test_service my_smtp_server ##.##.##.## 25
hostname PDS_PCH 11 my_smtp_server
ip PDS_PCH 3 ##.##.##.##
port PDS_I 2 25
status PDS_I 2 1
tused PDS_I 2 1
and this time the status is correct.