Collection of CheckMK checks (see https://checkmk.com/). All checks and plugins are provided as is. Absolutely no warranty. Send any comments to thl-cmk[at]outlook[dot]com

Skip to content
Snippets Groups Projects
Commit cb7afea5 authored by thl-cmk's avatar thl-cmk :flag_na:
Browse files

Update README.md

parent 37ea1ac4
No related branches found
No related tags found
No related merge requests found
...@@ -95,31 +95,33 @@ Don't forget to make the Linux script executable (`chmod a+x curl.sh`). ...@@ -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> <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 | | File | Created by bakery option |
| ---- | ---- | | ---- | ---- |
| curl_item_#.search_response | Strings to expect in response | | curl_item_#.options | cURL options configured by the bakery |
| curl_item_#.search_header | Strings to expect in header |
| curl_item_#.ca_cert | Configure certificate verification -> Certificate to verify against | | curl_item_#.ca_cert | Configure certificate verification -> Certificate to verify against |
| curl_item_#.header | Set request header / Set API key header | | curl_item_#.header | Set request header / Set API key header |
| curl_item_#.post_binary | Send HTTP POST data | | 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> </details>
--- ---
#### Configuration file #### Configuration file
If you are not using the CheckMK agent bakery, than you need to create the config file for the plugin your self. 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> <details><summary>Sample curl.cfg file</summary>
``` ```
forum.checkmk.com|"https://forum.checkmk.com/"|-o /dev/null --location --insecure|curl_item_1 forum.checkmk.com|curl_item_1|no_regex|
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 thl-cmk.hopto.org|curl_item_2|case_multiline|
checkmk.com|curl_item_3|nocase_nomultiline|
``` ```
</details> </details>
...@@ -134,6 +136,7 @@ thl-cmk.hopto.org|"https://thl-cmk.hopto.org"|-o /dev/null --user-agent "your us ...@@ -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 | | --cert-status | Configure certificate verification -> Use OCSP to check certificate status |
| --compressed | Request compressed response | | --compressed | Request compressed response |
| --connect-timeout | Maximum time to connect | | --connect-timeout | Maximum time to connect |
| --data-binary | Send HTTP POST data |
| --digest | Configure user authentication -> Authentication method -> Digest authentication | | --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`) | | --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 | | --head | Get header only |
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment