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
README.md 2.8 KiB
Newer Older
thl-cmk's avatar
thl-cmk committed
# CheckMK cURL agent plugin
thl-cmk's avatar
thl-cmk committed

thl-cmk's avatar
thl-cmk committed
With this agent plugin you can monitor URLs from the perspective of the monitored host. It is build around cURL from [https://curl.se/](https://curl.se/).
thl-cmk's avatar
thl-cmk committed

---
thl-cmk's avatar
thl-cmk committed
### Download
- [curl.mkp](https://thl-cmk.hopto.org/gitlab/checkmk/vendor-independent/curl/-/raw/master/curl.mkp) the main package
thl-cmk's avatar
thl-cmk committed
- [curl_windows.mkp](https://thl-cmk.hopto.org/gitlab/checkmk/vendor-independent/curl/-/raw/master/curl.mkp) the Windows executable and cert bundle
thl-cmk's avatar
thl-cmk committed

**_curl_windows.mkp_** contains the curl executable for Windows. Add this package to deploy these file with your agent.
thl-cmk's avatar
thl-cmk committed

---
#### Want to contribute?
Nice ;-) Have a look at the [contribution guidelines](CONTRIBUTING.md "Contributing")
---

thl-cmk's avatar
thl-cmk committed
### Sample Output and WATO

thl-cmk's avatar
thl-cmk committed
<details><summary>Sample output</summary>

<details><summary>Check summary</summary>

![check summary](/doc/sample.png?raw=true "sample output")

</details>

</details>

<details><summary>WATO options</summary>

<details><summary>WATO bakery cURL</summary>

![WATO bakery cURL](doc/wato-bakery.png "WATO bakery")

</details>

<details><summary>WATO bakery cURL executable for Windows </summary>

![WATO bakery cURL executable for Windows](doc/wato-bakery-win-exec.png "WATO bakery")

</details>

</details>
thl-cmk's avatar
thl-cmk committed

thl-cmk's avatar
thl-cmk committed
---
### Files used
To use this plugin with the RAW edition of CMK you need to copy the following files from the directory `~/local/share/check_mk/agents/plugins` of your CMK site to the client systems.

| OS| What | File | To |
|-----| ------ | ------ | ------ |
|Windows| script | `curl.cmd` | `C:\ProgramData\checkmk\agent\bin\curl.cmd` |
|| config | `curl.cfg` | `C:\ProgramData\checkmk\agent\config.curl.cfg` |
|| format | `curl.format` | `C:\ProgramData\checkmk\agent\plugins\curl.format` |
|| executable | `curl.exe.32` or `curl.exe.64`  | `C:\ProgramData\checkmk\agent\bin\curl.exe` |
|| cert bundle | `curl-ca-bundle.crt` | `C:\ProgramData\checkmk\agent\plugins\curl-ca-bundle.crt` |
|Linux| script |  `curl.sh` | `/usr/lib/check_mk_agent/plugins/curl.sh` |
|| config | `curl.cfg` | `/etc/check_mk/curl.cfg` |
|| format | `curl.format` | `/usr/lib/check_mk_agent/plugins/curl.format` |

Don't forget to make the Linux script executable (`chmod a+x curl.sh`).

*Note*: the executable and cert bundle for Windows is optional. If you don't want to use this, the plugin tryes to use the system provided crul (see: [curl shipped by Microsoft](https://curl.se/windows/microsoft.html)).

---
#### 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 three fields _service_name_, _url_, _curl_options_. Thes fields are sepereated by `|`. There are now comments allowed.
thl-cmk's avatar
thl-cmk committed

thl-cmk's avatar
thl-cmk committed
Sample _curl.cfg_ file
```
forum.checkmk.com|https://forum.checkmk.com/|--location
thl-cmk.hopto.org|https://thl-cmk.hopto.org|--location
```