#######################################################
#
# Set a class if a process does exist but
# we wanted not to (irange(0,0)), more complex matches
#
#######################################################

body common control
{
      inputs => { "../../default.cf.sub" };
      bundlesequence  => { default("$(this.promise_filename)") };
      version => "1.0";
}

#######################################################

bundle agent init
{
  vars:
      "dummy" string => "dummy";
}

#######################################################

bundle agent test
{
  processes:
      ".*"
      process_count => test_range,
      process_select => test_select_high_users;
}

body process_count test_range
{
      in_range_define => { "none_found" };
      out_of_range_define => { "some_found" };
      match_range => irange(0,0);
}

body process_select test_select_high_users
{
      ttime_range => irange(0, accumulated(9,0,0,0,0,0));        # Anything
      process_result => "ttime";                                # Everything
}


#######################################################

bundle agent check
{
  classes:
      "ok" expression => "!none_found.some_found";

  reports:
    ok::
      "$(this.promise_filename) Pass";
    !ok::
      "$(this.promise_filename) FAIL";
}

### PROJECT_ID: core
### CATEGORY_ID: 30
