Archimedes report format (legacy XML)¶
This file documents the legacy report format based on XML. This format is only supported by the Drupal 7 client. New installations should be using the new JSON based report format.
Transport Mechanism¶
Encryption uses OpenSSL with an RC4 stream cipher. The HTTP endpoint receives a JSON blob with two fields containing base64-encoded values:
- key
- Envelope key for the public key specified
- data
- The encrypted XML data payload
The HTTP User-Agent is: Archimedes Client
The reports.utils.legacy_decode() function fills in a few fields that the old
report format is missing, or creates mappings to the same fields as the newer
Drupal 7 reports, with a ReportType of drupalLegacy.
XML Format¶
The XML report format starts with a standard XML definition:
<?xml version="1.0" encoding="UTF-8"?>
Everything is contained within a node tag. Node attributes are:
- xmlns
monitor:node- type
- The only supported type for this legacy format is
drupal- id
- The Drupal site’s
SiteKeyvalue- datetime
- Report generation timestamp in ISO format, e.g.
2016-11-29T10:32:09+13:00- author
- Mailto link to the registered Drupal site email, e.g.
mailto:noreply@drupal.example.com
For example:
<node xmlns="monitor:node" type="drupal" id="0mVH53BTsmkowNepLJ3V6pgWmLa7xHZZffhz-DZRDGQ" datetime="2016-11-29T10:32:09+13:00" author="mailto:noreply@drupal.example.com">
All fields inside node are defined in the form <field id="foo"><value>bar</value></field>.
- title
- Site title.
- field_drupal_version
- Drupal core version.
- field_common_hash
- Site key.
- field_body
- Site slogan / description.
- field_servername
- Server’s hostname.
- field_webroot
- Drupal site root directory.
- field_dbname
- Database name (assumes only one?).
- field_dbhost
XML definition :
xmlns:node="monitor-plugin:node", node:title="$host", node:type="host"- facet
- Contains the database hostname. Should match the title specified in the definition for the database host.
- field_users[]
List of admin users. XML definition :
xmlns:user="monitor-plugin:user", user:type="mail"- value
- Specify user’s email address using the format
mailto:$email
- field_c_dataset
Node and user counts. XML definition for the following fields:
xmlns:dataset="monitor-plugin:dataset", dataset:title="$title"- Nodes
- Number of content nodes.
- Revisions
- Number of content node revisions.
- Users
- Number of users.
- field_drupal_mod[]
List of Drupal modules. There are lots of attributes for modules.
- xmlns:node
node="monitor-plugin:drupal-module"- node:title
- Display name.
- node:body
- Description.
- node:field_name
- Module machine name.
- node:field_dru_pkg
- Package name.
- node:field_dru_proj
- Project name.
- node:field_mod_version
- Module version.
- node:field_mod_url
- Module URL, if supplied.
- node:type
drupal_module- facet
- Title of modules
- field_drupal_theme[]
- List of Drupal themes (identical format to _mod)
- field_site_env
- Drupal environment name.
- field_directory_hash
- Directory hash
Example report¶
<?xml version="1.0" encoding="UTF-8"?>
<node xmlns="monitor:node" type="drupal" id="0mVH53BTsmkowNepLJ3V6pgWmLa7xHZZffhz-DZRDGQ" datetime="2016-11-29T10:32:09+13:00" author="mailto:noreply@odt.co.nz">
<field id="title">
<value>Development Website</value>
</field>
<field id="field_drupal_version">
<value>7.52</value>
</field>
<field id="field_common_hash">
<value>7def4c3bb28c00d7eabef091290cfc11</value>
</field>
<field id="body">
<value>No description has been set.</value>
</field>
<field id="field_servername">
<value>http://test.local/</value>
</field>
<field id="field_webroot">
<value>/var/www/test/app</value>
</field>
<field id="field_dbname">
<value>vagrant</value>
</field>
<field id="field_dbhost">
<value xmlns:node="monitor-plugin:node" node:title="localhost" node:type="host"><facet>localhost</facet></value>
</field>
<field id="field_users">
<value xmlns:user="monitor-plugin:user" user:type="mail">mailto:user1@example.com</value>
<value xmlns:user="monitor-plugin:user" user:type="mail">mailto:user2@example.com</value>
<value xmlns:user="monitor-plugin:user" user:type="mail">mailto:user3@example.com</value>
</field>
<field id="field_c_dataset">
<value xmlns:dataset="monitor-plugin:dataset" dataset:title="Nodes">495670</value>
<value xmlns:dataset="monitor-plugin:dataset" dataset:title="Revisions">510072</value>
<value xmlns:dataset="monitor-plugin:dataset" dataset:title="Users">1459</value>
</field>
<field id="field_drupal_mod">
<value xmlns:node="monitor-plugin:drupal-module" node:title="Menu" node:body="Allows administrators to customize the site navigation menu." node:field_name="menu" node:field_dru_pkg="Core" node:field_dru_proj="drupal" node:field_mod_version="7.52" node:field_mod_url="" node:type="drupal_module"><facet>Menu</facet></value>
<value xmlns:node="monitor-plugin:drupal-module" node:title="Node" node:body="Allows content to be submitted to the site and displayed on pages." node:field_name="node" node:field_dru_pkg="Core" node:field_dru_proj="drupal" node:field_mod_version="7.52" node:field_mod_url="" node:type="drupal_module"><facet>Node</facet></value>
<value xmlns:node="monitor-plugin:drupal-module" node:title="Panels" node:body="Core Panels display functions; provides no external UI, at least one other Panels module should be enabled." node:field_name="panels" node:field_dru_pkg="Panels" node:field_dru_proj="panels" node:field_mod_version="7.x-3.7" node:field_mod_url="" node:type="drupal_module"><facet>Panels</facet></value>
<value xmlns:node="monitor-plugin:drupal-module" node:title="Views UI" node:body="Administrative interface to views. Without this module, you cannot create or edit your views." node:field_name="views_ui" node:field_dru_pkg="Views" node:field_dru_proj="views" node:field_mod_version="7.x-3.14" node:field_mod_url="" node:type="drupal_module"><facet>Views UI</facet></value>
</field>
<field id="field_drupal_theme">
<value xmlns:node="monitor-plugin:drupal-module" node:title="Bartik" node:body="A flexible, recolorable theme with many regions." node:field_name="bartik" node:field_mod_version="7.52" node:field_dru_proj="drupal" node:field_mod_url="" node:type="drupal_theme"><facet>Bartik</facet></value>
<value xmlns:node="monitor-plugin:drupal-module" node:title="Seven" node:body="A simple one-column, tableless, fluid width administration theme." node:field_name="seven" node:field_mod_version="7.52" node:field_dru_proj="drupal" node:field_mod_url="" node:type="drupal_theme"><facet>Seven</facet></value>
</field>
<field id="field_site_env">
<value>Development</value>
</field>
<field id="field_directory_hash">
<value>809456fa3962ce228f2e46eaecfe03d1</value>
</field>
</node>