Obtaining the host IP address from Check_MK

I am writing an extensive check with snmp. I need to combine snmp data with json data.
I know how to get the hostname from Check_MK (host_name ())

But how to get its IP defined in Check_MK (ipv4) ???

The check plugin itself should not actively query any hosts. This may lead to obscure behaviour.

You should write a special agent for the JSON data and try to combine that in the configuration.

tl;dr: What problem are you trying to solve?

Queries SNMP a lot of data, which OIDs are unpredictable because it depends on the current situation on the device.
I need the SNMP and JSON source available via SSH
filter out data for a specific IP. This IP is the one defined in Check_MK in the IPv4 section.

I am not an advanced programmer, so far I have been writing chekc heads via snmp and a few special agents, but I have never combined them into one.

I haven’t solved the problem.
I know that in special agent we can get this IP from parameters,
but I don’t know how to connect them to the SNMP query.

For now, I got around the problem … I pull a dozen or so IPs via SNMP, which are defined on the device and statically filters them. It works, but if in the future IP planning changes I will have to improve the code. This is not a nice solution.

I download json data via ssh using paramiko.