mO SharemO Share

XML Export

Data can be exported in either CSV or XML format. Following explains the XML structure of exported data.

Events

Filename: events.xml

All fields are of data type stringexcept:

NameData Type
timestampUNIX timestamp
start_timeUNIX timestamp
end_timeUNIX timestamp
triesinteger, possible values: number of tries
notification_numberinteger, possible values: number of sent notifications
is_fixedinteger, possible values: 0, 1
is_persistentinteger, possible values: 0, 1
triggered_byinteger, possible values: downtime_id
durationinteger, possible values: duration in seconds

 

 

On this page:

Not all possible host events are supported yet. The following events are not supported at the moment:

  • SCHEDULE_AND_PROPAGATE_TRIGGERED_HOST_DOWNTIME
  • SCHEDULE_AND_PROPAGATE_HOST_DOWNTIME

All event data is included in the central events.xml file which is found in the exported archive. Every event is include in an <event> ... </event> section.

<?xml version="1.0" encoding="utf-8"?>
<events>
<appinfo>
<sysid>2m002421121f36</sysid>
<address>192.168.96.24</address>
<location>skoch-test</location>
</appinfo>
<entries>
<event>
<event_type>service alert</event_type>
<timestamp>1382542433</timestamp>
...
<hostgroup_name>everyhost</hostgroup_name>
</event>
...
</entries>
</events>

 

SERVICE_ALERT

 

<event>
  <event_type>service alert</event_type>
  <timestamp>1382542138</timestamp>
  <host_name>slow-sw-13</host_name>
  <address>127.0.0.13</address>
  <service_name>_dm_test_warning</service_name>
  <status>WARNING</status>
  <type>SOFT</type>
  <tries>76</tries>
  <output>WARNING</output>
  <downtime>0</downtime>
  <hostgroup_name>everyhost</hostgroup_name>
</event>

 

SERVICE_NOTIFICATION

<event>
  <event_type>service notification</event_type>
  <timestamp>1382542418</timestamp>
  <host_name>Room-22.Temperature-Humidity</host_name>
  <contact_name>admin-email@localhost.localdomain</contact_name>
  <service_name>Relative_Humidity</service_name>
  <status>UNKNOWN</status>
  <type>PROBLEM</type>
  <notification_number>0</notification_number>
  <output>Communication error: Reply time-out</output>
  <script_name>service-notify-by-email</script_name>
</event>

SCHEDULE_SVC_DOWNTIME

<event>
  <event_type>schedule svc downtime</event_type>
  <timestamp>1382618010</timestamp>
  <host_name>fast-sw-17</host_name>
  <service_name>Room-3.Powerunit.SDB-1A.Fuse-tripped</service_name>
  <start_time>1382618007</start_time>
  <end_time>1382625207</end_time>
  <is_fixed>1</is_fixed>
  <triggered_by>0</triggered_by>
  <duration>7200</duration>
  <comment_author>Administrator</comment_author>
  <comment_data>Downtime for spare parts mounting in rack A1</comment_data>
</event>

DEL_SVC_DOWNTIME

<event>
  <event_type>del svc downtime</event_type>
  <timestamp>1382686774</timestamp>
  <downtime_id>20</downtime_id>
</event>

ACKNOWLEDGE_SVC_PROBLEM

<event>
  <event_type>acknowledge svc problem</event_type>
  <timestamp>1382542489</timestamp>
  <host_name>DE_Test_Server</host_name>
  <service_name>Process_State_Tcms</service_name>
  <is_sticky>2</is_sticky>
  <notification_number>1</notification_number>
  <is_persistent>0</is_persistent>
  <comment_author>Administrator</comment_author>
  <output>Technical issue in DC</output>
</event> 

REMOVE_SVC_ACKNOWLEDGEMENT

 <event>
  <event_type>remove svc acknowledgement</event_type>
  <timestamp>1382618001</timestamp>
  <host_name>fast-sw-17</host_name>
  <service_name>Room-3.Powerunit.SDB-1A.Fuse-tripped</service_name>
</event>

HOST_ALERT

 <event>
  <event_type>host alert</event_type>
  <timestamp>1382690741</timestamp>
  <host_name>fast-sw-15</host_name>
  <address>127.0.0.15</address>
  <status>DOWN</status>
  <type>HARD</type>
  <tries>1</tries>
  <output>Device outage detected</output>
  <downtime>0</downtime>
  <hostgroup_name>everyhost</hostgroup_name>
</event>

HOST_NOTIFICATION

 <event>
  <event_type>host notification</event_type>
  <timestamp>1382542576</timestamp>
  <host_name>DE_Test_Server</host_name>
  <contact_name>admin-email@localhost.localdomain</contact_name>
  <status>UP</status>
  <type>RECOVERY</type>
  <notification_number>0</notification_number>
  <output>Online for now</output>
  <script_name>host-notify-by-email</script_name>
</event>

ACKNOWLEDGE_HOST_PROBLEM

 <event>
  <event_type>acknowledge host problem</event_type>
  <timestamp>1382687424</timestamp>
  <host_name>fast-sw-15</host_name>
  <is_sticky>2</is_sticky>
  <notification_number>1</notification_number>
  <is_persistent>1</is_persistent>
  <comment_author>Administrator</comment_author>
  <output>On the way to issue</output>
</event>

REMOVE_HOST_ACKNOWLEDGEMENT

 <event>
  <event_type>remove host acknowledgement</event_type>
  <timestamp>1382687438</timestamp>
  <host_name>fast-sw-15</host_name>
</event>

SCHEDULE_HOST_DOWNTIME

 <event>
  <event_type>schedule host downtime</event_type>
  <timestamp>1382686797</timestamp>
  <host_name>DE_Test_Server</host_name>
  <start_time>1382686783</start_time>
  <end_time>1382693983</end_time>
  <is_fixed>1</is_fixed>
  <triggered_by>0</triggered_by>
  <duration>7200</duration>
  <comment_author>Administrator</comment_author>
  <comment_data>reboot for updates</comment_data>
</event>

DEL_HOST_DOWNTIME

 <event>
  <event_type>del host downtime</event_type>
  <timestamp>1382687544</timestamp>
  <downtime_id>21</downtime_id>
</event>

Performance Data

Filename: performance_data.xml

Performance data is collected as well and included in the export. Not all fields are mandatory, such optional fields are:

  • <min></min>
  • <max></max>
  • <unit></unit>

The example below shows mandatory and optional fields in two performance_data sections.

<?xml version="1.0" encoding="utf-8"?>
<performance_data>
  <appinfo>
    <sysid>2m002421121f36</sysid>
    <address>192.168.96.24</address>
    <location>skoch-test</location>
  </appinfo>
  <entries>
    <perfdata>
      <host_name>-azeti-A-</host_name>
      <service_description>CPU</service_description>
      <timestamp>1382542138</timestamp>
      <items>
        <item>
          <caption>CPU Usage</caption>
          <value>3.13</value>
          <warn>80</warn>
          <crit>90</crit>
        </item>
      </items>
    </perfdata>
    <perfdata>
      <host_name>-azeti-A-</host_name>
      <service_description>RRD-Disk-Usage</service_description>
      <timestamp>1382542423</timestamp>
      <items>
        <item>
          <caption>RRD Disk usage</caption>
          <value>0.026</value>
          <unit>Gb</unit>
          <warn>20</warn>
          <crit>30</crit>
          <min>0</min>
          <max>40</max>
        </item>
      </items>
    </perfdata>
  </entries>
</performance_data>	

 

 

The following macros are not currently supported in the footer:
  • style