Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

If you have not already done so, install the MySQL ODBC driver and create a data source to access the up.time DataStore. This article assumes you have performed these steps. For more information, see the Connecting to the up.time DataStore via ODBC Knowledge Base article.

...

Retrieving up.time Data in Excel 2010: Creating a New Database Connection

...

    1. Whenever you finish creating a connection profile to the up.time DataStore, or open an existing connection profile, the Import Data dialog is displayed:

      Click Properties.

    2. The Connection Properties dialog is displayed. Click the Definition tab:

    3. In the Command text box, enter the SQL statement that retrieves the data you wish to use in Excel. For example:

 

Code Block
languagesql
SELECT e.display_name,

...


min(p.cpu_sys+p.cpu_usr+p.cpu_wio),

...


max(p.cpu_sys+p.cpu_usr+p.cpu_wio),

...


avg(p.cpu_sys+p.cpu_usr+p.cpu_wio),

...


min(p.free_mem),

...


max(p.free_mem),

...


avg(p.free_mem)

...


FROM performance_aggregate p, performance_sample s, entity e

...

 
WHERE p.sample_id = s.id

...

 
AND s.uptimehost_id = e.entity_id

...

 
AND s.sample_time > DATE_SUB(now(), INTERVAL 7 DAY)

...

 
AND s.sample_time < now()

...

 
GROUP BY e.display_name

...


ORDER BY s.sample_time;

This sample query retrieves CPU- and memory-related data that was collected by up.time over the last seven days.

...

    1. Whenever you finish creating a connection profile to the up.time DataStore, or open an existing connection profile, the Import Data dialog is displayed:

      Click Properties.

    2. The Connection Properties dialog is displayed. Click the Definition tab:

    3. In the Command text box, enter the SQL statement that retrieves the data you wish to use in Excel. For example:
Code Block
languagesql
SELECT e.display_name,

...


min(p.cpu_sys+p.cpu_usr+p.cpu_wio),

...


max(p.cpu_sys+p.cpu_usr+p.cpu_wio),

...


avg(p.cpu_sys+p.cpu_usr+p.cpu_wio),

...


min(p.free_mem),

...


max(p.free_mem),

...


avg(p.free_mem)

...


FROM performance_aggregate p, performance_sample s, entity e

...

 
WHERE p.sample_id = s.id

...

 
AND s.uptimehost_id = e.entity_id

...

 
AND s.sample_time > DATE_SUB(now(), INTERVAL 7 DAY)

...

 
AND s.sample_time < now()

...

 
GROUP BY e.display_name

...


ORDER BY s.sample_time;

This sample query retrieves CPU- and memory-related data that was collected by up.time over the last seven days.

...