Tech Monger

Programming, Web Development and Computer Science.

Skip to main content| Skip to information by topic

Monitor Informatica Services using INFACMD Ping

Monitoring services uptime is essential for all applications and informatica is not an exception to it. Informatica has many individual components such as Domain, Services, Node etc which requires monitoring. Informatica provides infacmd command line API which has command ping to check the response of individual components. We will leverage this capability and perform monitoring checks with help of example. Before proceeding with ping command we recommend you to get basic overview of infacmd utility.


Infacmd Ping Command

Infacmd supports ping command which requires below input flags to request status of the informatica services.

Flag Use
-DomainName or -dn Name of the Informatica Domain.
-ServiceName or -sn Name of the Informatica Service.
-GatewayAddress or -dg Domain gateway and port separated by colon. (example.com:5000)
-NodeName or -nn Name of the node. (Optional)
-ResilienceTimeout or -re Number of seconds for which ping command should wait for response from respective service before reporting failure. (Optional)

Infacmd Ping Example

By default infacmd.sh will be present inside $INFA_HOME/server/bin.

Check Informatica Domain Status

Below command would check the availability of the domain with name MY_INF_DOAMIN running on the host example.com, on the port 5000.

$ cd $INFA_HOME/server/bin
$ infacmd.sh ping -dg example.com:5000 -dn MY_INF_DOAMIN


[INFACMD_10052] Domain [MY_INF_DOAMIN]
Host:Port [example.com:5000] was successfully pinged.
Command ran successfully.

Check Informatica Service Status

Below command would check the availability of the repository service MY_REP_SVC . You can check status of any informatica service using below method.

$ cd $INFA_HOME/server/bin
$ infacmd.sh ping -dg example.com:5000 -dn MY_INF_DOAMIN -sn MY_REP_SVC


[INFACMD_10052] Service [MY_REP_SVC ] Domain [MY_INF_DOAMIN]
Host:Port [example.com:5002] was successfully pinged.
Command ran successfully.

Check Informatica Node Status

Below command would check the availability of the informatica services running on the node with host example.com on the port 5000. It is not necessary that node to be checked has to be gateway node. It can be any arbitrary node in informatica domain or grid.

$ cd $INFA_HOME/server/bin
$ infacmd.sh ping -dg example.com:5000

[INFACMD_10052] Domain [MY_INF_DOAMIN]
Host:Port [example.com:5002] was successfully pinged.
Command ran successfully.

Making Use of Infacmd Ping inside Script

If you want to use ping command to send alert If domain, service or node is down then you should check for exit code of the ping command like below.

  • 0 : Service is up and responding.
  • 1 : Service is down or not responding.

Example - When service is up

$ cd $INFA_HOME/server/bin
$ infacmd.sh ping -dg example.com:5000 -dn MY_INF_DOAMIN -sn MY_INT_SVC


[INFACMD_10052] Service [MY_INT_SVC] Domain [MY_INF_DOAMIN]
Host:Port [example.com:5003] was successfully pinged.
Command ran successfully.

$ echo $?
0

Example - When service is down

$ cd $INFA_HOME/server/bin
$ infacmd.sh ping -dg example.com:5000 -dn MY_INF_DOAMIN -sn MY_INT_SVC


[ICMD_10033] Command [ping] failed with error [[INFACMD_10053] [[DOM_10033]
Cannot find the service [MY_INT_SVC] in the domain [MY_INF_DOAMIN].
Specify a service that exists in the domain.Service [MY_INT_SVC]
Domain [MY_INF_DOAMIN] did not ping back.
It might be due to one of the following reasons:
=> Domain might not be running.
=> Domain name, host name or port number might be incorrect.
=> If the domain is in TLS mode with non default
SSL certificate then environment variables INFA_TRUSTSTORE and
INFA_TRUSTSTORE_PASSWORD might be set to incorrect values or
Truststore might not have correct domain certificate.].


$ echo $?
1

In monitoring script you should use any mail sending utility like mailx or mutt to send downtime alerts.


About Optional Flags

  • We have not made use of optional flag -NodeName as it was not required.
  • We also have not made use of optional flag --ResilienceTimeout. When this flag is not used ping command will use timeout value configured inside environment variable INFA_CLIENT_RESILIENCE_TIMEOUT.
  • If INFA_CLIENT_RESILIENCE_TIMEOUT is not configured then it will use default value of 180 Seconds.
  • Flag --ResilienceTimeout can be useful especially if you want to monitor performance of the node, domain or service. If response time exceeds value set for ResilienceTimeout then command would report failure.
  • In all of the above example we have used flag -dg to provide hostname and port of the informatica server. However If informatica domain details are added inside $INFA_DOMAINS_FILE then -dg flag also become optional.

Conclusion

In this tutorial we learned how to use infacmd ping command to check uptime of informatica services. We also learned how downtime and performance of complete informatica domain can be monitored by embedding infacmd ping command inside monitoring scripts.

Tagged Under : INFACMD Informatica Linux