Recheck - Requesting

Re-checks are set asynchronously, so the REST API will return as soon as the submission is entered. There maybe a small delay before the result is displayed in the user interface. On successful submission of re-checks, the response will be of the form:

    {
        summary = > {
            num_hosts = >....,
            num_services = >....,
        },
        list = > {
            hosts = >
            [{
                id = >..., hostname = >....
            }, ],
            services = >
            [{
                id = >..., hostname = >..., servicename = >...
            }, ],
        }
    }

This reflects the number of hosts and services that this re-check applied to.

In the event of a failure, the response will be:

    {
        message => ...,
        detail => ....,
    }

Where message will be one of:

Example Copied

You can use the below example call to force a recheck of all services against a given host:

    ./opsview_rest --pretty --username=USERNAME --password=PASSWORD POST "recheck?hostname=HOSTNAME&servicename=%"

If you only want to recheck the host and not any services on it, use:

    ./opsview_rest --pretty --username=USERNAME --password=PASSWORD POST "recheck?hostname=HOSTNAME&includehosts=1&type=host"
["Opsview On-premises"] ["API", "Technical Reference"]

Was this topic helpful?