We create a class called nis_functioning and gate all of our netgroup calls behind that. We also use persistent classes to only check the netgroups once an hour. Something like this
bundle common hostin_mynetgroup_common
{
vars:
"check_time" string => "60";
classes:
"checked_mynetgroup" or => {
"host_in_mynetgroup"
"host_not_in_mynetgroup"
};
nis_functioning.!checked_mynetgroup::
"host_in_mynetgroup"
expression => hostinnetgroup("mynetgroup"),
persistence => "$(check_time)";
"host_not_in_mynetgroup"
not => hostinnetgroup("mynetgroup"),
persistence => "$(check_time)";