Basic Zabbix concept - one item (check) = one value. Zabbix server doesn't provide parser functionality to parse multiple values, so it has to be always only one value.
If you want to return more value, than you have to use some workarounds, see
zabbix UserParameter return 2 or more values
Zabbix sender example:
allow command execution in the zabbix-agent and create item (active or passive) to run your script:
system.run["myscript.sh > output_for_zabbix_sender.txt; zabbix_sender -s <host_name> -z <zabbix_server> -i output_for_zabbix_sender",nowait]
It will execute command in nowait mode. myscript.sh produces output in format:
hostname key1 value1
hostname key2 value2
...
And this output is processed (sent) to the zabbix server by zabbix_sender. Item type must be Zabbix trapper in this case (zabbix_sender). Eventually you don't need system.run item, you can execute script with zabbix_sender as cron job.
If you need perfect monitoring solution don't forget to handle errors, minimize IOPs, ...
You can use zabbix_sender also for discovering - just follow documentation about required format, e.g.:
hostname discovery_key {"data":[{"{#ID}": "/"},{"{#ID}":"/usr"},{"{#ID}":"/var"}]}
Disclaimer: I'm the author of https://github.com/monitoringartist/Zabbix-Docker-Monitoring
Set up standard Zabbix-Docker-Monitoring on A and B.
Edit Docker template - filter discovered container as you need + remove any trigger prototypes.
Create new calculated items, which will aggregate each C related item from A and B into new C calculated items (you can create C "metahost" in the Zabbix) - set up new triggers on top of these new C metrics.
Update:
Use calculated items for aggregation - for example aggregate sum(docker.up[cid])
from A and B - then trigger condition for "Container cid is not running" will be sum(docker.up[cid])<1
. Pls read Zabbix doc for correct syntax.
LLD discovers where is your container running atm and it will update items/triggers accordingly. If you want to eliminate any false alerts, don't forget to tune timings of LLD/triggers.
Best Answer
not with low level discovery, although maybe new host discovery in 2.2 works for that