From cb7afea5305ff364e0e83537f07cd87abb9a1cd0 Mon Sep 17 00:00:00 2001
From: thl-cmk <thl-cmk@outlook.com>
Date: Fri, 18 Mar 2022 20:17:31 +0000
Subject: [PATCH] Update README.md

---
 README.md | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/README.md b/README.md
index 66653d1..42d86f1 100644
--- a/README.md
+++ b/README.md
@@ -95,31 +95,33 @@ Don't forget to make the Linux script executable (`chmod a+x curl.sh`).
 
 <details><summary>Additional files created by the bakery</summary>
 
-The bakrey will dynamicly create some additional files in the _curl_ sub directory under the check_mk agent config directory (`/etc/check_mk/curl` or `C:\ProgramData\checkmk\agent\config\curl`). **curl_item_#** equals to the fourth option of each line in the configuration file. 
+The bakrey will dynamicly create some additional files in the _curl_ sub directory under the check_mk agent config directory (Linux: `/etc/check_mk/curl`, Windows: `C:\ProgramData\checkmk\agent\config\curl`). **curl_item_#** equals to the second option of each line in the `curl.cfg` configuration file. 
 
 | File | Created by bakery option |
 | ---- | ---- |
-| curl_item_#.search_response | Strings to expect in response |
-| curl_item_#.search_header | Strings to expect in header |
+| curl_item_#.options | cURL options configured by the bakery |
 | curl_item_#.ca_cert | Configure certificate verification -> Certificate to verify against |
 | curl_item_#.header | Set request header / Set API key header  |
 | curl_item_#.post_binary | Send HTTP POST data  |
+| curl_item_#.search_header | Strings to expect in header |
+| curl_item_#.search_response | Strings to expect in response |
 
+In addition to the options in `curl_item_#.options` from the bakery rules the plugin uses the hard coded options `-q -w %{json} -s -verbose --stderr $TEMP_DIR\curl_session`. If no expected strings are configured, the option `-o NUL` will be added on Windows and `-o /dev/null` on Linux.
 
 </details>
 
-
 ---
 #### Configuration file
 
 If you are not using the CheckMK agent bakery, than you need to create the config file for the plugin your self.
-On each line you have the four fields _service_name_, _url_, _curl_options_, _curl_item__#. Thes fields are sepereated by `|`. There are no comments or empty lines allowed. In addition to the _curl_options_ from _curl.cfg_ the plugin uses the hard coded options `-q -w %{json} -s -verbose --stderr $TEMP_DIR\curl_session`. If no expected strings are configured, the option `-o NUL` will be added on Windows and `-o /dev/null` on Linux.
+On each line you have the three fields _service_name_, _curl_item__# and _regex_options_. Thes fields are sepereated by `|`. There are no comments or empty lines allowed. 
 
 <details><summary>Sample curl.cfg file</summary>
 
 ```
-forum.checkmk.com|"https://forum.checkmk.com/"|-o /dev/null --location --insecure|curl_item_1
-thl-cmk.hopto.org|"https://thl-cmk.hopto.org"|-o /dev/null --user-agent "your user agent" --referer "https:/your.referer.com " --header "X-Header-1: your first header"|curl_item_2
+forum.checkmk.com|curl_item_1|no_regex|
+thl-cmk.hopto.org|curl_item_2|case_multiline|
+checkmk.com|curl_item_3|nocase_nomultiline|
 ```
 
 </details>
@@ -134,6 +136,7 @@ thl-cmk.hopto.org|"https://thl-cmk.hopto.org"|-o /dev/null --user-agent "your us
 | --cert-status | Configure certificate verification -> Use OCSP to check certificate status |  
 | --compressed | Request compressed response |  
 | --connect-timeout | Maximum time to connect |  
+| --data-binary | Send HTTP POST data |
 | --digest | Configure user authentication -> Authentication method -> Digest authentication |  
 | --dump-header | Strings to expect in header (Configured as `--dump-header /var/tmp/curl_header` or `c:/windows/temp/curl_header`) |
 | --head | Get header only |  
-- 
GitLab