Guides
Guides

How to perform health checks in HERE Anonymizer Preprocessor

As HERE Anonymizer Preprocessor application is using Apache Flink, a basic health check is performed by checking if Apache Flink has a healthy JobManager. Use the Flink REST API to perform health checks.

To learn more about the Flink API, see Flink documentation

Basic health check

If you have the quick start example running, send a GET request to http://localhost:8081/jobs/overview.

To perform a health check on a running cluster, replace localhost with the external IP address mapped to your jobmanager-ui.

A response of a healthy deployment contains the RUNNING keyword.

Response example:

{
    "jobs": [
        {
            "jid": "d70aac68f9b58f277bdc24948f48a811",
            "name": "HERE Anonymizer preprocessor",
            "state": "RUNNING",
            "start-time": 1675071141724,
            "end-time": -1,
            "duration": 9723,
            "last-modification": 1675071143604,
            "tasks": {
                "total": 1,
                "created": 0,
                "scheduled": 0,
                "deploying": 0,
                "running": 1,
                "finished": 0,
                "canceling": 0,
                "canceled": 0,
                "failed": 0,
                "reconciling": 0,
                "initializing": 0
            }
        }
    ]
}

Advanced health check

See the Flink REST API for information on getting advanced metrics.

If you're running the quick start example, follow this link to see the memory and CPU usage of TaskManagers: http://localhost:8081/taskmanagers/metrics?get=Status.JVM.CPU.Load,Status.JVM.Memory.Heap.Used,Status.JVM.Memory.Heap.Max

Response example:

[
    {
        "id": "Status.JVM.CPU.Load",
        "min": 0.0010543425734744981,
        "max": 0.0010543425734744981,
        "avg": 0.0010543425734744981,
        "sum": 0.0010543425734744981
    },
    {
        "id": "Status.JVM.Memory.Heap.Used",
        "min": 1.25612544E8,
        "max": 1.25612544E8,
        "avg": 1.25612544E8,
        "sum": 1.25612544E8
    },
    {
        "id": "Status.JVM.Memory.Heap.Max",
        "min": 5.36870912E8,
        "max": 5.36870912E8,
        "avg": 5.36870912E8,
        "sum": 5.36870912E8
    }
]