anchor.diff:            one.wait_for_unit("journalbeat.service")
             one.execute("echo 'Supercalifragilisticexpialidocious' | systemd-cat")
             one.wait_until_succeeds(
  -              total_hits("Supercalifragilisticexpialidocious") + " | grep -v 0"
  +              expect_hits("Supercalifragilisticexpialidocious")
             )
       '' + ''
         with subtest("Elasticsearch-curator works"):
  
positive.code:       };
  
      passthru.elkPackages = elk;
      testScript = ''
        import json
  
  
        def total_hits(message):
            dictionary = {"query": {"match": {"message": message}}}
            return (
                "curl --silent --show-error '${esUrl}/_search' "
                + "-H 'Content-Type: application/json' "
                + "-d '{}' ".format(json.dumps(dictionary))
                + "| jq .hits.total"
            )
  
  
        def has_metricbeat():
            dictionary = {"query": {"match": {"event.dataset": {"query": "system.cpu"}}}}
            return (
                "curl --silent --show-error '${esUrl}/_search' "
                + "-H 'Content-Type: application/json' "
                + "-d '{}' ".format(json.dumps(dictionary))
                + "| jq '.hits.total > 0'"
            )
  
  
  
negative.code:       # TODO: extend this test with multiple elasticsearch nodes
        #       and see if the status turns "green".
        one.wait_until_succeeds(
            "curl --silent --show-error --fail-with-body '${esUrl}/_cluster/health'"
            + " | jq -es 'if . == [] then null else .[] | .status != \"red\" end'"
        )
  
        with subtest("Perform some simple logstash tests"):
  