Https checks behind firewall

Hi,

I need to monitor some websites that are only accessible within the customer network.
In checkmk I have configured the check http web service.
But since the web address is in the customer’s network I get this error

I have the checkmk agent running on the webserver, so I monitor it. Is there a way to do the http check from the agent instead of the checkmk server?

I’ve tried this solution Check_http through agent - #4 by sdwerwed
but I’m not able to configure it right. And I don’t even know if the nagios check_https can be installed on a windows server and how to configure it.
Is there any documentation about that?

Is there any other way to accomplish it?

I’m running checkmk 2.3.0p21 on server and agent.
The agent is windows server 2019.

Any help is appreciated,

/ric

Hi @ricardof

The easy solution for that would be to write a simple local check on the agent :

Cheers,

1 Like

Hi @ricardoftribeiro
Thanks for the suggestion.

I was hoping that there would be something available already insted of writing your own check.
I’ll have to ask a colleague to do it since coding isn’t my area.

But thanks anyway,

/r

@ricardof if you like have a look at the cURL plugin. It’s intended for the non RAW editions but with a little handy work it runs also with the RAW edition. And yes, this works with Windows.

Hi,
Thanks, for the tip.
We ended up with a local script that uses curl.

Thank you all for valuable contributions.
/r

Hi,

@thl-cmk will this plugin be updated to Checkmk 2.4?

regards,
Bernd.

@bbrodda
I hadn’t really planned to do that until now. Why? Simply because the plugin’s ruleset is very extensive and uses a many functions that are no longer available in the new API. So it’s not just a matter of rewriting the ruleset and making a few minor adjustments to the rest, but also rewriting a lot of it :frowning: I’ll will see if I can/want to implement at least a reduced version. (would be nice for my self)

No promises,
Thomas

Hi Thomas,

thank you for the info.

We plan to upgrade to 2.4 and this was a showstopper.

We only monitor a few URLs, I will write a local check for this.

regards,
Bernd.

@bbrodda the cURL plugin is now ready for Checkmk 2.4.

Note: I have not migrated the post, e-mail and ftp options.

Hi @thl-cmk ,

with the mkp 0.4.3 the bake-agents crashes.
Error running automation call ‹tt>bake-agents</tt› (exit code 1), error: <pre>Error in bakery plug-in "curl" ("files" section): 'None'
(CEE 2.4.0p14)

Regards,
Oliver

@Oliverr

  • is there a crash report?
  • did you open/save the agent bakery rules after the update?

Cheer
Thomas

I have test it on my testsystem 2.4.0p14 and have the same issue.
I don’t use the mkp before.

Exceptions:

Exception (Crash ID: 0f1816da-cba7-11f0-85a7-562dcfceeb48): Error running automation call bake-agents (exit code 1), error: 

Error in bakery plug-in "curl" ("files" section): 'None'

Traceback (most recent call last):
  File "/omd/sites/home/lib/python3/cmk/base/cee/bakery/_package_builder.py", line 158, in _consume_bakelet_functions
    objects += function(**func_args)
  File "/omd/sites/home/lib/python3/cmk/base/api/bakery/function_types.py", line 92, in filtered_generator
    for element in function(*args, **kwargs):
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/omd/sites/home/local/lib/python3/cmk/base/cee/plugins/bakery/curl.py", line 429, in get_curl_files
    source=Path(curl_config.curl_executable_src[params.curl_executable.strip('_')]),
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'None'
More information can be found in ~/var/log/web.log

(in the ~/var/log/web.log are not mor informations!)

Progress info:

Agent baking and signing for all hosts started...
2025-11-27 16:38:02,168 [40] [cmk.web.automations 3309762] Error running "{'command': 'bake-agents', 'args': []}" (exit code 1)
2025-11-27 16:38:02,171 [40] [cmk.web.background-job 3309762] Exception in background function (Crash ID: 0f1816da-cba7-11f0-85a7-562dcfceeb48)
Traceback (most recent call last):
  File "/omd/sites/home/lib/python3/cmk/gui/background_job/_process.py", line 186, in _execute_function
    target.callable(job_interface, target.args)
  File "/omd/sites/home/lib/python3/cmk/gui/cee/agent_bakery/bake_agents.py", line 151, in bake_agents_job_entry_point
    if output := bake_agents(
                 ^^^^^^^^^^^^
  File "/omd/sites/home/lib/python3/cmk/gui/watolib/check_mk_automations.py", line 560, in bake_agents
    _automation_serialized(
  File "/omd/sites/home/lib/python3/cmk/gui/watolib/check_mk_automations.py", line 61, in _automation_serialized
    cmdline, serialized_result = check_mk_local_automation_serialized(
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/omd/sites/home/lib/python3/cmk/gui/watolib/automations.py", line 156, in check_mk_local_automation_serialized
    raise MKUserError(None, msg)
cmk.gui.exceptions.MKUserError: Error running automation call <tt>bake-agents</tt> (exit code 1), error: <pre>Error in bakery plug-in "curl" ("files" section): 'None'

Traceback (most recent call last):
  File "/omd/sites/home/lib/python3/cmk/base/cee/bakery/_package_builder.py", line 158, in _consume_bakelet_functions
    objects += function(**func_args)
  File "/omd/sites/home/lib/python3/cmk/base/api/bakery/function_types.py", line 92, in filtered_generator
    for element in function(*args, **kwargs):
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/omd/sites/home/local/lib/python3/cmk/base/cee/plugins/bakery/curl.py", line 429, in get_curl_files
    source=Path(curl_config.curl_executable_src[params.curl_executable.strip('_')]),
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'None'

</pre>
Exception (Crash ID: 0f1816da-cba7-11f0-85a7-562dcfceeb48): Error running automation call <tt>bake-agents</tt> (exit code 1), error: <pre>Error in bakery plug-in "curl" ("files" section): 'None'

Traceback (most recent call last):
  File "/omd/sites/home/lib/python3/cmk/base/cee/bakery/_package_builder.py", line 158, in _consume_bakelet_functions
    objects += function(**func_args)
  File "/omd/sites/home/lib/python3/cmk/base/api/bakery/function_types.py", line 92, in filtered_generator
    for element in function(*args, **kwargs):
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/omd/sites/home/local/lib/python3/cmk/base/cee/plugins/bakery/curl.py", line 429, in get_curl_files
    source=Path(curl_config.curl_executable_src[params.curl_executable.strip('_')]),
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'None'

</pre>

Please excuse me for misusing this thread to report a bug in the cURL package.

nothing to excuse. It’s the perfect place :wink:

@Oliverr should be fixed now, along with two similar issues…