mirror of
https://github.com/drewkerrigan/nagios-http-json.git
synced 2025-05-10 09:53:44 +02:00
Fix the use of multiple similar CLI flags
This commit is contained in:
parent
ccf05d469a
commit
ca1d990a0f
@ -8,7 +8,7 @@ This is a generic plugin for Nagios which checks json values from a given HTTP e
|
|||||||
|
|
||||||
Requirements:
|
Requirements:
|
||||||
|
|
||||||
* Python 3.6+
|
* Python 3.8+
|
||||||
|
|
||||||
### Nagios
|
### Nagios
|
||||||
|
|
||||||
|
@ -551,19 +551,21 @@ def parseArgs(args):
|
|||||||
parser.add_argument('-e', '--key_exists', dest='key_list', nargs='*',
|
parser.add_argument('-e', '--key_exists', dest='key_list', nargs='*',
|
||||||
help='''Checks existence of these keys to determine
|
help='''Checks existence of these keys to determine
|
||||||
status. Return warning if key is not present.''')
|
status. Return warning if key is not present.''')
|
||||||
parser.add_argument('-E', '--key_exists_critical',
|
parser.add_argument('-E', '--key_exists_critical', dest='key_list_critical',
|
||||||
dest='key_list_critical',
|
|
||||||
nargs='*',
|
nargs='*',
|
||||||
help='''Same as -e but return critical if key is
|
help='''Same as -e but return critical if key is
|
||||||
not present.''')
|
not present.''')
|
||||||
parser.add_argument('-q', '--key_equals', dest='key_value_list', nargs='*',
|
parser.add_argument('-q', '--key_equals', dest='key_value_list',
|
||||||
|
action='extend',
|
||||||
|
nargs='*',
|
||||||
help='''Checks equality of these keys and values
|
help='''Checks equality of these keys and values
|
||||||
(key[>alias],value key2,value2) to determine status.
|
(key[>alias],value key2,value2) to determine status.
|
||||||
Multiple key values can be delimited with colon
|
Multiple key values can be delimited with colon
|
||||||
(key,value1:value2). Return warning if equality
|
(key,value1:value2). Return warning if equality
|
||||||
check fails''')
|
check fails''')
|
||||||
parser.add_argument('-Q', '--key_equals_critical',
|
parser.add_argument('-Q', '--key_equals_critical', dest='key_value_list_critical',
|
||||||
dest='key_value_list_critical', nargs='*',
|
action='extend',
|
||||||
|
nargs='*',
|
||||||
help='''Same as -q but return critical if
|
help='''Same as -q but return critical if
|
||||||
equality check fails.''')
|
equality check fails.''')
|
||||||
parser.add_argument('--key_time', dest='key_time_list', nargs='*',
|
parser.add_argument('--key_time', dest='key_time_list', nargs='*',
|
||||||
|
Loading…
Reference in New Issue
Block a user