Monitoring (multiple) nginx containers (on the same host)

This code is part of the check plugin that runs on the monitoring server and not the agent plugin that has to be copied to your nginx host.

You got the wrong file.

The agent plugin is available via WATO → Monitoring Agents.