From f4c9198b59a957f7613ac8989e43ab50cee097f8 Mon Sep 17 00:00:00 2001 From: Per Cederqvist <ceder@lysator.liu.se> Date: Tue, 16 Jan 2007 21:10:47 +0000 Subject: [PATCH] Warn if a machine isn't categorised as Maskiner_i_drift. --- check_datorhandbok | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/check_datorhandbok b/check_datorhandbok index a1007dd..adde844 100755 --- a/check_datorhandbok +++ b/check_datorhandbok @@ -54,8 +54,13 @@ def check_host(hostname): if not csub.findNext(attrs={"href": nagios_url(hostname)}): warning(hostname, "Nagios link missing") - if redirected_from is None and not csub.findNext(attrs={"id": "LysINV"}): - warning(hostname, "LysINV link missing") + if redirected_from is None: + if not csub.findNext(attrs={"id": "LysINV"}): + warning(hostname, "LysINV link missing") + + if not csub.findNext("a", attrs={ + "href": "/index.php/Kategori:Maskiner_i_drift"}): + warning(hostname, "Not categorised as Maskiner_i_drift") ok(hostname, "all ok") -- GitLab