Commit Graph

57 Commits

Author SHA1 Message Date
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
root
fe2e830bf7 add arguments for http timeout and tcp port 2015-05-07 22:19:23 +00:00
drewkerrigan
82f4eaa48a added ability to reference array elements when the root element is an array 2015-05-06 12:17:00 -04:00
Hunor Kovács
4fa2c3b39a Updating readme with arrays. 2015-05-05 14:58:24 +03:00
Hunor Kovács
aa90ecad65 Changed from square brackets to normal paranthesis for arrays. Nagios doesn't like square brackets.
(http://sourceforge.net/p/nagios/nrpe/ci/master/tree/SECURITY illegal metachars section)
Fixed case when no dot after array (e.g. checks(0) wasn't working)
Extract paranthesis characters in attribute.
2015-05-05 14:32:16 +03:00
Hunor Kovács
3b048f66c5 Arrays are supported as well. format: alpha.beta[2].gamma.theta[0]
Fix: Now keys that are in the middle of the expression that are not found in the data, can be checked upon, without the script throwing an error.
2015-05-04 20:45:46 +03:00
Drew Kerrigan
d1ba09f44c merging + adding -f for Json Field Separator 2015-04-24 11:38:27 -04:00
Drew Kerrigan
171826f046 added -s for Json Field Separator to deal with fieldnames containing '.' 2015-04-24 11:32:03 -04:00
Drew Kerrigan
23ffc5e8a2 Merge pull request #4 from roobert/master
add https option
2015-04-24 10:35:01 -04:00
Drew Kerrigan
e6d1a96e9c Merge pull request #2 from chroto/feature/basic-auth
Add Basic Auth support
2015-04-24 10:34:45 -04:00