Markus Opolka
47bdea7fc5
Add spaces to debug output
2020-06-26 10:31:20 +02:00
Markus Opolka
866a12ea07
Add JSON parsing on HTTPError
...
- Only if response contains JSON
2020-06-19 14:26:59 +02:00
Markus Opolka
941afeed89
Move main entrypoint to own function for simpler testing
2020-06-19 13:12:51 +02:00
Markus Opolka
dd952fd571
Replace deprecated encodestring
...
- Fixes #56
2020-03-18 08:47:27 +01:00
Markus Opolka
83ee5062f5
[wip] Add pylint and fix pylint issues
2020-03-18 08:18:07 +01:00
Markus Opolka
c90b0323f5
Show returned JSON in OK Status when performance data is requested
2020-03-18 07:41:23 +01:00
Markus Opolka
2c98e840e8
Extend unittest coverage
2020-03-18 07:41:18 +01:00
Martin Liska
404890d918
Fix new Python3.8 warnings:
...
./check_http_json.py:186: SyntaxWarning: "is" with a literal. Did you mean "=="?
if elemData is (None, 'not_found'):
./check_http_json.py:189: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if subElemKey is not '':
2020-03-12 09:37:53 +01:00
Markus Opolka
71cbd98e79
Add value_separator option to specify how JSON values are being split
...
- Fixes issue 43
2020-03-08 11:28:27 +01:00
Markus Opolka
e4801227bf
Add boundary check for SubArrayElement function
...
- Fixes Issue 34
2020-03-05 10:05:32 +01:00
Markus Opolka
b7c0b0595e
Add unittest for argsparse
2020-03-03 12:12:52 +01:00
Markus Opolka
95912246a2
Add and format some doc_strings
2020-03-03 11:44:55 +01:00
Markus Opolka
174686a980
Move test to separat file
2020-03-03 09:48:10 +01:00
Martin Liska
2289fb2af3
Port to Python3 ( #48 ).
...
I used 2to3 script and then I clean up result of the conversion.
2020-01-28 12:13:30 +01:00
Markus Opolka
209aaef041
Fix inconsistent use of tabs/spaces
2020-01-28 10:42:22 +01:00
Markus Opolka
65c3bd2a25
Set default context variable to -k --insecure option
2020-01-28 10:41:29 +01:00
Markus Opolka
9c0c59d6c1
Fix unittests
2020-01-28 10:22:05 +01:00
Ricardo Bartels
47547951cf
fixed minor bugs and added compatibility for RHEL/CentOS 7.x
...
* change ssl.PROTOCOL_TLS to ssl.PROTOCOL_SSLv23
* fixed bug that response var not passed outside try/except block
* fixed arrer in nagios.append_metrics()
2019-05-09 16:39:41 +02:00
Ricardo Bartels
7858382bbe
Added default User-Agent header
...
* prevent errors for services which require this header (like Cloudflare WAF)
2019-05-09 15:53:59 +02:00
Ricardo Bartels
bcc36a6e95
added version information and improved help text
2019-05-09 15:44:33 +02:00
Ricardo Bartels
d98d0396b2
return more meaningful error message if parsing of data failed
2019-05-09 15:06:52 +02:00
Ricardo Bartels
8437c464e5
refine ssl insecure and client certificate options
...
* default TLS Protocols are now set to >= TLS1
* --cacert and --cert are no longer mandatory if option -s is used
* proper error messages if parsing of cert or key files fails
2019-05-09 14:55:25 +02:00
Ricardo Bartels
df2bbdbf51
Merge remote-tracking branch 'theicfire/master' into next-release
2019-05-09 13:38:37 +02:00
Ricardo Bartels
823fc275c9
fixed expansion on newly merged command line args
2019-05-09 13:18:34 +02:00
Ricardo Bartels
18b0898e72
Merge remote-tracking branch 'nrobert13/tg' into next-release
2019-05-09 12:39:58 +02:00
Ricardo Bartels
95318954bf
fixed indentation and and print statements
...
* clean up from previous merges
2019-05-09 11:58:50 +02:00
Ricardo Bartels
8e469e3d98
Merge branch 'luban8' into next-release
2019-05-09 11:30:26 +02:00
Ricardo Bartels
29f8d892ee
Merge branch 'ack-expand-array' into next-release
2019-05-09 11:17:51 +02:00
Martin Sura
81522fa9ab
fix intedation
2019-05-07 16:23:48 +02:00
Martin Sura
27eaaf0842
Add unknown option
2019-05-07 16:15:31 +02:00
Chase Lambert
9dd6323b85
Better failure message for exact keys
2018-04-02 09:34:00 -04:00
Robert Nemeti
67136a4a2b
add client ssl cert support
2018-02-15 17:04:04 +01:00
Robert Nemeti
d164a1250c
add key,value non equality check, the opposite of the -q and -Q
2018-01-10 10:23:34 +01:00
Robert Nemeti
89f42c15a0
use python2.7 because on centos 6 (icinga) the default python is 2.6 and doesn;t have the required ssl libraries
2017-08-10 15:41:35 +02:00
Robert Nemeti
1e707a4b6a
add repo and upstream info
2017-08-10 15:05:53 +02:00
Robert Nemeti
9656265439
print current value in the icinga message
2017-08-10 10:29:45 +02:00
Robert Nemeti
e463369671
added insecure argument for the ssl connections
2017-08-10 10:28:02 +02:00
Thomas Hamm
42d1e08037
fix unknown_message bug
2017-01-26 16:26:45 +00:00
Drew Kerrigan
4950225393
adding support for (*) to all flags
2016-07-19 12:43:16 -04:00
Drew Kerrigan
9be6a709a2
syntax cleanup
2016-07-19 11:02:28 -04:00
Drew Kerrigan
06fab10fe2
added (*) syntax
2016-07-18 17:22:41 -04:00
Drew Kerrigan
7bdc802c2d
consistent tabs
2016-07-18 14:15:56 -04:00
Beri
fbebf05f76
Support for custom HTTP Headers added using -A parameter.
2016-01-08 16:21:00 +01:00
drewkerrigan
fb4e58b635
Adding support for -E, -Q, -w, -c, fixing threshold checking on -m, added UnitTest task, removed -l, -g
2015-11-18 23:07:50 -05:00
drewkerrigan
32a8884881
added ability to supply an alias for a key re: #10
2015-11-15 23:50:12 -05:00
drewkerrigan
55b979f3e2
Merge branch 'master' of github.com:drewkerrigan/nagios-http-json
2015-10-05 10:36:46 -04:00
drewkerrigan
369d5115a3
extra debugging
2015-10-05 10:36:40 -04:00
Bill Moritz
a4be4d42c6
Return metrics no matter the result
2015-08-31 11:36:27 -04:00
Bill Moritz
3058176ba1
Add data argument
...
Add an option to HTTP POST data to the host.
2015-08-22 09:42:06 -04:00
Jernej Porenta
b9d03c899f
Allow multiple key value specification
...
Multiple key values can be specified by using colon delimiter.
2015-07-28 09:08:55 +02:00