Skip to content

Commit

Permalink
Add sendheaders for httpparse and version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
NodePing committed Feb 19, 2021
1 parent 539d21d commit b898ccb
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 13 deletions.
8 changes: 8 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
## [Unreleased]
(Placeholder for unreleased content)

## [1.2.3]

### Added

- Added the `sendheaders` field to the HTTP Parse check
- Improved the `create_check.httpparse_check` docstring


## [1.2.2]

### Added
Expand Down
30 changes: 18 additions & 12 deletions nodeping_api/create_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,7 @@ def httpparse_check(
customerid="",
label="",
fields="",
sendheaders={},
interval=DEFAULTS['interval'],
enabled=DEFAULTS['enabled'],
public=DEFAULTS['public'],
Expand All @@ -719,20 +720,23 @@ def httpparse_check(
Each object should have a name, min, and max
Example dictionary:
fields = {
fields = {
"fields": {
"processmem": {
"name": "processmem",
"min": 1000,
"max": 5000
},
"cpuload": {
"name": "cpuload",
"min": 1,
"max": 5
}
}
"processmem": {
"name": "processmem",
"min": 1000,
"max": 5000
},
"cpuload": {
"name": "cpuload",
"min": 1,
"max": 5
}
}
}
Example sendheaders:
sendheaders = {"Content-Type": "application/json"}
:type token: string
:param token: NodePing account API token
Expand All @@ -745,6 +749,8 @@ def httpparse_check(
:type fields: dict
:param fields: Keyed list of fields, with an arbitrary string as the key.
Should contain 3 elements: name, min, and max
:type sendheaders: dict
:param sendheaders: HTTP Headers to send in request
:type interval: int
:param interval: Interval in minutes to monitor target
:type enabled: bool
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
URL = "https://github.com/NodePing/python-nodeping-api"
EMAIL = "[email protected]"
AUTHOR = "NodePing"
VERSION = "1.2.2"
VERSION = "1.2.3"
LICENSE = "MIT"

setuptools.setup(
Expand Down

0 comments on commit b898ccb

Please sign in to comment.