Xymon Mailing List Archive search

drop multiple hosts with wildcard

list John Thurston
Tue, 22 Jan 2019 09:06:36 -0900
Message-Id: <user-f6e4de5a7310@xymon.invalid>

On 1/22/2019 8:57 AM, Kris Springer wrote:
Is there a way to drop all host data for multiple hosts using a wildcard?  I know how to drop a single host and erase it's data, but I have a long list of IP Cameras that I changed in my hosts file and instead of dropping each individual hostname I'd like to drop all hosts that start with 'Cam'.  I attempted this but it didn't remove anything.

./xymon 127.0.0.1 "drop Cam*"
No. You can't use wild cards here. It's dangerous to even think about it.

In our installation, I've written a couple of wrapper scripts which accept multiple host-names as parameters and loop through them. As a one-off, you can do

for i in foo bar baz; do ./xymon 127.0.0.1 "drop $i"; done

--
    Do things because you should, not just because you can.

John Thurston    XXX-XXX-XXXX
user-ce4d79d99bab@xymon.invalid
Department of Administration
State of Alaska