Fix monitoring and add the publication monitoring.

Fix https://its.cern.ch/jira/browse/CAF-379, https://its.cern.ch/jira/browse/CAF-338 and https://its.cern.ch/jira/browse/CAF-337