RSP_setThreshold

Name

RSP_setThreshold -- Indicate a threshold has been crossed.

Synopsis

int RSP_setThreshold(RSP_moduleBackend *mod, char *thresholdToSet, intforceAlert);

Description

This function is used to tell the RSPD that your module has found a given threshold has been crossed. The thresholdToSet string should contain the data returned by RSP_getThreshold. The forceAlert argument can be 0 or 1. If set to 1, this tells the RSPD that it should act as if the threshold has just crossed, even if it has in fact been crossed for some time. This may be necessary in cases where the threshold refers to multiple pieces of data. For example, imagine a general threshold which is crossed any time a site goes down. As multiple sites go down, the threshold stays crossed, but it may be necessary for more than one alert to be sent.

Returns

This function returns -1 if an error occurred, and 0 otherwise.

Error Conditions

If an error occurs, -1 will be returned and rsp_error will be set to the following error code: