diff --git a/changelog.md b/changelog.md index 7383258..e835a8b 100644 --- a/changelog.md +++ b/changelog.md @@ -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 diff --git a/nodeping_api/create_check.py b/nodeping_api/create_check.py index fb9f0c2..8e85cef 100644 --- a/nodeping_api/create_check.py +++ b/nodeping_api/create_check.py @@ -701,6 +701,7 @@ def httpparse_check( customerid="", label="", fields="", + sendheaders={}, interval=DEFAULTS['interval'], enabled=DEFAULTS['enabled'], public=DEFAULTS['public'], @@ -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 @@ -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 diff --git a/setup.py b/setup.py index 1ba6cf6..bac56f9 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ URL = "https://github.com/NodePing/python-nodeping-api" EMAIL = "support@nodeping.com" AUTHOR = "NodePing" -VERSION = "1.2.2" +VERSION = "1.2.3" LICENSE = "MIT" setuptools.setup(