Commit Graph

160 Commits

Author SHA1 Message Date
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 1ac160e8c2 Add boilerplate for CLI tests 2020-03-18 07:41:23 +01:00
Markus Opolka 6fc41612c4 Add unittest for debugprint 2020-03-18 07:41:23 +01:00
Markus Opolka f567c1ca0c Add unittest for metric key alias 2020-03-18 07:41:23 +01:00
Markus Opolka 2c98e840e8 Extend unittest coverage 2020-03-18 07:41:18 +01:00
Markus Opolka 1a9e1e9048 Add unittest for NagiosHelper 2020-03-15 09:45:18 +01:00
Markus Opolka 4f1d29dc7e
Merge pull request #55 from marxin/fix-python38-warnings
Fix new Python3.8 warnings:
2020-03-12 14:17:34 +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 e7cf7ca8fb
Merge pull request #54 from drewkerrigan/fix-issue-43
Add value_separator option to specify how JSON values are being split
2020-03-09 20:39:00 +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 5c416cd0c0
Merge pull request #53 from drewkerrigan/fix-issue-34
Add boundary check for SubArrayElement function
2020-03-05 19:51:55 +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 375da5d605 Add test case for key_value_list_unknown 2020-03-03 11:59:36 +01:00
Markus Opolka 95912246a2 Add and format some doc_strings 2020-03-03 11:44:55 +01:00
Markus Opolka ba9d9b1c39 Use Python3 in GitHub Action 2020-03-03 10:04:03 +01:00
Markus Opolka 3f81e32b29 Add CI Badge to README 2020-03-03 10:02:51 +01:00
Markus Opolka f97759f1bd Add Coverage report 2020-03-03 10:02:51 +01:00
Markus Opolka e95daad8ff Add GitHub Action for Unit Test 2020-03-03 10:02:49 +01:00
Markus Opolka 174686a980 Move test to separat file 2020-03-03 09:48:10 +01:00
Markus Opolka 24889384b0 Add gitignore file 2020-02-16 09:55:58 +01:00
Markus Opolka 21f48681c9
Merge pull request #50 from marxin/port-to-python3
Port to Python3.
2020-02-16 09:37:00 +01:00
Markus Opolka 2196dba761
Merge pull request #51 from marxin/document-asterisk
Document syntax of array selector: (*).field_name.
2020-02-03 16:06:54 +01:00
marxin c2435a8cbf Document syntax of array selector: (*).field_name. 2020-02-01 21:47:08 +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 2541223cde
Merge pull request #49 from drewkerrigan/fix-ssl
Fix --insecure option
2020-01-28 10:52:11 +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
Markus Opolka e2fce71d5a
Merge pull request #46 from bb-Ricardo/master
pull improvements from different branches together
2020-01-28 10:15:49 +01:00
Ricardo Bartels 26a1b3dbe8 added icinga2 command definitions 2019-05-10 11:21:34 +02: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 1173420803 updated README with current cli options 2019-05-09 15:48:29 +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
luban8 cbdb884dc7
Update README.md 2019-05-07 16:27:56 +02:00
luban8 3a108aef5e
Update README.md 2019-05-07 16:25:00 +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