netmgt_set_threshold manual page
Table of Contents

NAME

netmgt_set_threshold - set the event report threshold for an attribute

SYNOPSIS

bool_t
netmgt_set_threshold(thresh)
Netmgt_thresh *thresh;

DESCRIPTION

netmgt_set_threshold sets the threshold associated with an attribute value. thresh is a pointer to a structure containing threshold information.

INPUT ARGUMENTS

threshold
pointer to a structure with the following fields:

name attribute name.

type attribute (and threshold) type code, as defined in netmgt_arglist.h.

relop
relational operator to be used with the threshold to determine if an event has occurred. If the infix expression

<attribute value>
<relational operator> <threshold value> is TRUE, the agent will send an event report to the rendezvous. The following relational operators are defined: NETMGT_EQ - attribute equal to threshold. NETMGT_NE - attribute not equal to threshold. NETMGT_LT - attribute less than threshold. NETMGT_LE - attribute less than or equal to threshold. NETMGT_GT - attribute greater than threshold. NETMGT_GE - attribute greater than or equal to threshold. NETMGT_CHANGED - attribute has changed (no threshold used). NETMGT_INCRBY - attribute increased by threshold. NETMGT_DECRBY - attribute decreased by threshold. NETMGT_INCRBYMORE - attribute increased by more than threshold. NETMGT_INCRBYLESS - attribute increased by less than threshold. NETMGT_DECRBYMORE - attribute decreased by more than threshold.

NETMGT_DECRBYLESS - attribute decreased by less than threshold.

thresh_len
threshold and attribute value length, in bytes. For strings use strlen(thresh_val).

thresh_val
pointer to the threshold value buffer. The value's internal representation is described by type.

prev_val
pointer to the previous attribute value buffer. This field is used only by the Agent Services library; you do not need to set it.

priority
priority level the agent should use when sending an event report. priority can be one of three

values:
NETMGT_LOW_PRIORITY, NETMGT_MEDIUM_PRIORITY, or NETMGT_HIGH_PRIORITY.

RETURN VALUE

TRUE if successful, otherwise FALSE.

DIAGNOSTICS

If FALSE is returned, global variable netmgt_error indicates the error. The caller can get the reason for the error with netmgt_fetch_error(3n).

FILES

netmgt_arglist.h

SEE ALSO

netmgt_fetch_error(3n)


Table of Contents