Skip to content

Commit 547bd79

Browse files
committed
fix on curl line, add --fail to fail on every HTTP response that is non OK
1 parent d795e1b commit 547bd79

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

CHANGELOG

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
0.5.1
2+
* fix on curl line, add --fail to fail on every HTTP response that is non OK
13
0.1
24
* first version

curlnagios/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.5
1+
0.5.1

curlnagios/plugin_check.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def collect_data(self):
3434
"""
3535
### some code here
3636
### or calling external modules
37-
cmdline = "curl {} -s -o /dev/null {} -w \\ {}".format(self.url, self.extra_args, self.std_args)
37+
cmdline = "curl {} --fail -s -o /dev/null {} -w \\ {}".format(self.url, self.extra_args, self.std_args)
3838

3939
retrcode, retroutput = subprocess.getstatusoutput(cmdline)
4040
jsonoutput = json.loads(retroutput)

0 commit comments

Comments
 (0)