How to check if server is up or not using HTTP call

Hi All,

I want to know how can I check whether target system (Server) is up or not ? Please consider below scenario.

I am calling target application service using wm built in service pub.client.http. But before calling target application service, I need to check if target server is up or not. If up then only I need to call target service.

Please let me know how can I do that in webmethod. I am working on 9.12.

Use Resource Monitoring Service, look Service Development Guide and Pub-Sub Guide for implementation details.

Check if the resource is up or not via get or ping.

Hi Mahesh,

You mean to check if resource is up or not I need to use pub.client.http service by setting the method as get ?

Is there any builtin service where I can use hostname and port to check if resource is up or not ?

You can use client http service and use get method to query the resource is up and running.

Check with the target system if have any exposed any API or URL to query them to check if they are online. This service should be handled as a resource monitoring service and you can configure it via the trigger in pub-sub model.

1 Like


As Mahesh suggested, the best way to ping a web application is to see if they have an API that you can hit, for example, the IS has a service called wm.server:ping. However, if you’re already going to invoke an endpoint on that application anyway, then why not just call it? If it works, great. If it doesn’t work, then you handle the exception. I don’t see any need to do a ping first.


1 Like

I agree with Percio. Could you please share the business use case with us.

In some use cases, the availability of the target system will decide to process a transaction synchronously or asynchronously.

For example, in a web service wrapper ( web service to web service) design pattern, the transaction may be queued if the target server is not available.

Hi Percio and Sasanka,

Strongly Agree with you. Even business scenario also impleted in same way. Somehow I wrongly mentioned the business scenari sequence. Thanks.

Hi Experts,

To check if target server is up or not usually target application provides some resource URL.

I am interacting with sql Datbase. They don’t have any resource url. They execute some script to monitor thier databse.

How can I check if DB server is up or down through webMethod. By calling conenction string ? Can connection string be called in java service?
Any idea ? I am working on 9.12 IS. jdbc adapter version is 9.10 and fix is JDBC_9.10_Fix5