Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Need a endpoint summary table here that anchors to the other sections.

The OODT PCS Health Monitor service.

JSON output format

All calls to the Health Monitor REST service provide the following JSON output:

No Format

{
    "report": {
        "crawlerStatus": {
            "Crawler1": {
                "crawlerName": "Crawler1", 
                "crawlerPort": "9020", 
                "status": "UP", 
                "url": "localhost"
            }
        }, 
        "daemonStatus": {
            "stubs": [
                {
                    "daemon": "batch stub", 
                    "status": "UP", 
                    "url": "http://localhost:2001"
                }
            ], 
            "fm": {
                "daemon": "File Manager", 
                "status": "UP", 
                "url": "http://localhost:9000"
            }, 
            "rm": {
                "daemon": "Resource Manager", 
                "status": "UP", 
                "url": "http://localhost:9002"
            }, 
            "wm": {
                "daemon": "Workflow Manager", 
                "status": "UP", 
                "url": "http://localhost:9001"
            }
        }, 
        "generated": "2011-02-15T06:57:07.591-0800", 
        "ingestHealth": [
            {
                "avgCrawlTime": 132.78640211640212, 
                "crawler": "Crawler1", 
                "numCrawls": 189
            }
        ], 
        "jobHealth": [
            {
                "numJobs": 0, 
                "state": "QUEUED"
            }, 
            {
                "numJobs": 0, 
                "state": "RSUBMIT"
            }, 
            {
                "numJobs": 0, 
                "state": "BUILDING CONFIG FILE"
            }, 
            {
                "numJobs": 0, 
                "state": "PGE EXEC"
            }, 
            {
                "numJobs": 0, 
                "state": "CRAWLING"
            }, 
            {
                "numJobs": 0, 
                "state": "STAGING INPUT"
            }, 
            {
                "numJobs": 7, 
                "state": "FINISHED"
            }, 
            {
                "numJobs": 0, 
                "state": "STARTED"
            }, 
            {
                "numJobs": 0, 
                "state": "PAUSED"
            }
        ], 
        "latestFiles": {
            "files": [
                {
                    "filepath": "/Users/mattmann/files/foo.bar/foo.bar", 
                    "receivedTime": "2011-01-22T15:19:21.126-08:00"
                }, 
                {
                    "filepath": "/Users/mattmann/files/foo.bar/foo.bar", 
                    "receivedTime": "2011-01-22T15:08:10.198-08:00"
                }, 
                {
                    "filepath": "/Users/mattmann/files/foo.bar/foo.bar", 
                    "receivedTime": "2011-01-22T15:06:03.659-08:00"
                }, 
                {
                    "filepath": "/Users/mattmann/files/blah.txt/blah.txt", 
                    "receivedTime": "2011-01-21T21:56:03.922-08:00"
                }
            ], 
            "topN": 20
        }
    }
}


The below REST-ful service descriptions show how to slice out different parts of the report. All reports at least have the generatedTime attribute, and then some combination of daemonStatus, and/or crawlerStatus, and (if the file manager is running) latestFiles, and if the workflow manager is running jobHealth, and if the crawlers are running ingestHealth.

Full Report

To see the full Health Monitor report, access:

No Format

http://host/pcs-services/services/health/report

Just the Daemons

To see the Health Monitor report, focused on just the PCS daemons (including batch stubs), access:

No Format

http://host/pcs-services/services/health/report/daemon

Note that daemons can be further "sliced out" by adding additional REST parameters, e.g.:

To see just the file manager status:

No Format

http://host/pcs-services/services/health/report/daemon/fm

To see just the workflow manager status

No Format

http://host/pcs-services/services/health/report/daemon/wm

To see just the resource manager status

No Format

http://host/pcs-services/services/health/report/daemon/rm

To see just the batch stub status

No Format

http://host/pcs-services/services/health/report/daemon/stubs

Just the Crawlers

To see the Health Monitor report, focused on just the PCS ingest crawlers, access:

No Format

http://host/pcs-services/services/health/report/crawlers

Crawlers can also be sliced out, similar to daemons, e.g.:

Slice a crawler out by name

To see a crawler with the name Crawler1, slice it out by:

No Format

http://host/pcs-services/services/health/report/crawlers/Crawler1

Just Job Processing Status

To see the Health Monitor report, focused on just the PCS workflow (job) processing status, broken down by state, access:

No Format

http://host/pcs-services/services/health/report/jobs

Job status may also be sliced out, similar to daemons and crawlers, by using the state parameter, e.g.:

Slice a job processing status by state

The following will display the number of jobs that are in the QUEUED state:

No Format

http://host/pcs-services/services/health/report/jobs/QUEUED

Just Ingest Processing Health

To see the Health Monitor report, focused on just the PCS ingest crawler health (with information like number of crawls and average crawl time), broken down by Crawler, access:

No Format

http://host/pcs-services/services/health/report/ingest

Ingest crawler health status can be sliced, similar to daemon status, crawler status, and the other types of information, e.g.:

Slice ingest crawler health status by name

To see the ingest health status of the Crawler with the name Crawler1, access:

No Format

http://host/pcs-services/services/health/report/ingest/Crawler1

Slice a job processing status by state

...

Endpoint:

No Format
http://host/pcs-services/services/health/report/jobs/{state}

...