Cannot Deploy monitor_rules.xml With ZPK

Follow

Applies to:

Zend Server 6.3, 7.0 and 8.0

Fixed for Zend Server 8.5

Problem

With exported Monitor Rules, <description> XML element might render empty data. This will fail setting up the rules when deploying the ZPK containing the XML with the affected Zend Server versions.

Workaround

Until a fix is implemented, you can edit monitor_rules.xml, and insert dummy or real data into description XML elements, so the monitoring rules will be properly deployed with your ZPK. Example:

<description><![CDATA[dummy description]]></description>

Recipe

For adding exported rules to a ZPK for deploying with an application, you need to follow these basic steps.

Note: You must have a ready ZPK in advance, or a project which is ready to build a ZPK (Zend Studio, ZDPACK, Manual / Automated build flow).

  1. Prepare the rules in the Monitoring Rules page for the App you have deployed.
  2. Export the Rules on the right of the Application row, it will save monitor_rules.xml containing all the rules of the application. Make sure you do not export global rules but specific app rules for this task.
    NOTE: This is where you should apply the workaround above, until fixed.
  3. Add monitor_rules.xml to your project - If you have a 'scripts' directory in your package base, copy monitor_rules.xml there. If you don't, create one.
  4. Edit deployment.xml and make sure <scriptsdir> XML element is pointing to scripts dir. It can be right after the Document Root element. Example:
    <scriptsdir>scripts</scriptsdir>
  5. Package / Zip / Export / Build the ZPK
  6. To test, deploy a fresh App (simply another name or host, or remove first), or just "Update" the existing App once you have removed all Custom Monitoring Rules to make sure they are being imported properly from the ZPK deployment.
Have more questions? Submit a request

Comments

Powered by Zendesk