From 9c7465f8bb182b40f735fd919b1cd4123b6654d1 Mon Sep 17 00:00:00 2001 From: janrot Date: Fri, 17 Jun 2016 15:16:16 +0200 Subject: [PATCH] Added default User-Agent header --- check_http_json.py | 1 + 1 file changed, 1 insertion(+) diff --git a/check_http_json.py b/check_http_json.py index 8dd1327..76a3eb9 100755 --- a/check_http_json.py +++ b/check_http_json.py @@ -407,6 +407,7 @@ if __name__ == "__main__": # Attempt to reach the endpoint try: req = urllib2.Request(url) + req.add_header("User-Agent", "nagios-http-json") if args.auth: base64str = base64.encodestring(args.auth).replace('\n', '') req.add_header('Authorization', 'Basic %s' % base64str)