From 00204e1070e0e7360e585d3dc72671ba4291ff60 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 5 Nov 2020 13:36:53 +0100 Subject: [PATCH] Check_MK check for SAML metadata existence and age --- doc/check-metadata.php | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 doc/check-metadata.php diff --git a/doc/check-metadata.php b/doc/check-metadata.php new file mode 100755 index 0000000000..8acf4a3d2a --- /dev/null +++ b/doc/check-metadata.php @@ -0,0 +1,29 @@ +#!/usr/bin/php + 86400+60) +{ + $status = 1; +} +else +{ + $status = 0; +} +if (!isset($verbose)) +{ + $mtime = new DateTime('@'.filemtime($metadata)); + $mtime->setTimeZone(new DateTimeZone('Europe/Berlin')); + $verbose = "Metadata last refreshed ".$mtime->format('Y-m-d H:i:s'); +} +echo "$status $cmd - $verbose\n";