#!/bin/bash
# Copyright (C) 2019 tribe29 GmbH - License: GNU General Public License v2
# This file is part of Checkmk (https://checkmk.com). It is subject to the terms and
# conditions defined in the file COPYING, which is part of this source code package.

cd $OMD_ROOT
for h in $(cd tmp/check_mk/piggyback ; echo *)
do 
    lq "GET hosts\nColumns: address name\nFilter: address = $h\nFilter: name = $h\nOr: 2" | grep -q . || echo "$h"
done

