<div dir="ltr">Hi Vincent,<div><br></div><div><br></div><div>I'm sorry it was not an easy setup.</div><div><br></div><div>Can you please share what did not work for you in the instructions? I see you did manage to get it working... :)</div><div><br></div><div>If you want data from the last 24 hours in 60 seconds interval (Still not real time but can give you a better granularity),</div><div>You can use the samples tables.</div><div><br></div><div>Also, Please make sure to update your<b> views prefix </b>to the version you are using, In the example prefix is <b> v4_2_*</b></div><div><b>If you are using oVirt 4.1, prefix should be </b><b> v4_1_*</b></div><div><br></div><div>For example: (Did not get to test this query yet)</div><div><br></div><div><div>SELECT DISTINCT</div><div> min(time) AS time,</div><div> MEM_Usage,</div><div> host_name || 'MEM_Usage' as metric</div><div>FROM (</div><div> SELECT</div><div> stats_hosts.host_id,</div><div> CASE</div><div> WHEN delete_date IS NULL</div><div> THEN host_name</div><div> ELSE</div><div> host_name</div><div> ||</div><div> ' (Removed on '</div><div> ||</div><div> CAST ( CAST ( delete_date AS date ) AS varchar )</div><div> ||</div><div> ')'</div><div> END AS host_name,</div><div> stats_hosts.history_datetime AS time,</div><div> SUM (</div><div> COALESCE (</div><div> stats_hosts.cpu_usage_percent,</div><div> 0</div><div> ) *</div><div> COALESCE (</div><div> stats_hosts.minutes_in_status,</div><div> 0</div><div> )</div><div> ) /</div><div> SUM (</div><div> COALESCE (</div><div> stats_hosts.minutes_in_status,</div><div> 0</div><div> )</div><div> ) AS CPU_Usage,</div><div> SUM (</div><div> COALESCE (</div><div> stats_hosts.memory_usage_percent,</div><div> 0</div><div> ) *</div><div> COALESCE (</div><div> stats_hosts.minutes_in_status,</div><div> 0</div><div> )</div><div> ) /</div><div> SUM (</div><div> COALESCE (</div><div> stats_hosts.minutes_in_status,</div><div> 0</div><div> )</div><div> ) AS MEM_Usage</div><div> FROM<b> v4_2_statistics_hosts_resources_usage_samples</b> AS stats_hosts</div><div> INNER JOIN v4_2_configuration_history_hosts</div><div> ON (</div><div> v4_2_configuration_history_hosts.host_id =</div><div> stats_hosts.host_id</div><div> )</div><div> WHERE stats_hosts.history_datetime >= $__timeFrom()</div><div> AND stats_hosts.history_datetime < $__timeTo()</div><div> -- Here we get the latest hosts configuration</div><div> AND v4_2_configuration_history_hosts.history_id IN (</div><div> SELECT MAX ( a.history_id )</div><div> FROM v4_2_configuration_history_hosts AS a</div><div> GROUP BY a.host_id</div><div> )</div><div> AND stats_hosts.host_id IN (</div><div> SELECT a.host_id</div><div> FROM<b> v4_2_statistics_hosts_resources_usage_samples</b> a</div><div> INNER JOIN v4_2_configuration_history_hosts b</div><div> ON ( a.host_id = b.host_id )</div><div> WHERE</div><div> -- Here we filter by active hosts only</div><div> a.host_status = 1</div><div> -- Here we filter by the datacenter chosen by the user</div><div> AND b.cluster_id IN (</div><div> SELECT v4_2_configuration_history_clusters.cluster_id</div><div> FROM v4_2_configuration_history_clusters</div><div> WHERE</div><div> v4_2_configuration_history_clusters.datacenter_id =</div><div> $datacenter_id</div><div> )</div><div> -- Here we filter by the clusters chosen by the user</div><div> AND b.cluster_id IN ($cluster_id)</div><div> AND a. history_datetime >= $__timeFrom()</div><div> AND a.history_datetime < $__timeTo()</div><div> -- Here we get the latest hosts configuration</div><div> AND b.history_id IN (</div><div> SELECT MAX (g.history_id)</div><div> FROM v4_2_configuration_history_hosts g</div><div> GROUP BY g.host_id</div><div> )</div><div> GROUP BY a.host_id</div><div> ORDER BY</div><div> -- Hosts will be ordered according to the summery of</div><div> -- memory and CPU usage percent.</div><div> --This determines the busiest hosts.</div><div> SUM (</div><div> COALESCE (</div><div> a.memory_usage_percent * a.minutes_in_status,</div><div> 0</div><div> )</div><div> ) /</div><div> SUM (</div><div> COALESCE (</div><div> a.minutes_in_status,</div><div> 0</div><div> )</div><div> ) +</div><div> SUM (</div><div> COALESCE (</div><div> a.cpu_usage_percent * a.minutes_in_status,</div><div> 0</div><div> )</div><div> ) /</div><div> SUM (</div><div> COALESCE (</div><div> a.minutes_in_status,</div><div> 0</div><div> )</div><div> ) DESC</div><div> LIMIT 5</div><div> )</div><div>GROUP BY</div><div> stats_hosts.host_id,</div><div> host_name,</div><div> delete_date,</div><div> history_datetime</div><div>) AS a</div><div>GROUP BY a.host_name, a.mem_usage</div><div>ORDER BY time</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><pre cols="72" style="white-space:pre-wrap"><span style="font-family:arial,helvetica,sans-serif;font-size:12.8px"><font color="#666666">--</font></span></pre><p style="color:rgb(0,0,0);font-family:overpass,sans-serif;font-weight:bold;margin:0px;padding:0px;font-size:14px;text-transform:uppercase"><span>SHIRLY</span> <span>RADCO</span></p><p style="color:rgb(0,0,0);font-family:overpass,sans-serif;font-size:10px;margin:0px 0px 4px;text-transform:uppercase"><span>BI SeNIOR SOFTWARE ENGINEER</span><span style="color:rgb(170,170,170);margin:0px"></span></p><p style="font-family:overpass,sans-serif;margin:0px;font-size:10px;color:rgb(153,153,153)"><a href="https://www.redhat.com/" style="color:rgb(0,136,206);margin:0px;text-decoration:none" target="_blank">Red Hat <span>Israel</span></a></p><table border="0" style="color:rgb(0,0,0);font-family:overpass,sans-serif;font-size:medium"><tbody><tr><td width="100px"><a href="https://red.ht/sig" target="_blank"><img src="https://www.redhat.com/files/brand/email/sig-redhat.png" width="90" height="auto"></a></td><td style="font-size:10px"><div><a href="https://redhat.com/trusted" style="text-decoration:none;color:rgb(204,0,0);font-weight:bold" target="_blank">TRIED. TESTED. TRUSTED.</a></div></td></tr></tbody></table></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Thu, Mar 22, 2018 at 9:05 PM, Vincent Royer <span dir="ltr"><<a href="mailto:vincent@epicenergy.ca" target="_blank">vincent@epicenergy.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">I setup Grafana using the instructions I found on accessing the Ovirt history database. However, the instructions didn't work as written. Regardless, it does work, but it's not easy to setup. The update rate also leaves something to be desired, its ok for historical info, but it's not a good real time monitoring solution (although its possible I could set it up differently and it would work better)<div><br></div><div>Also using Grafana, I have setup Telegraf agents on most of my VMs. </div><div><br></div><div>Lastly, I also installed Telegraf on the Centos hosts in my Ovirt Cluster</div><div><br></div><div><img src="cid:ii_jf2vurj10_1624f16681a2c3c7" style="margin-right: 25px;"></div><div><br></div><div><img src="cid:ii_jf2vwkto1_1624f17b22ca0541" width="562" height="252"><br><br><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail-m_3718631290875671223gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div dir="ltr" style="font-size:12.8px"><font size="4" face="arial narrow, sans-serif"><b>Vincent Royer</b></font></div><div dir="ltr"><div style="font-size:12.8px"><font size="4" face="arial narrow, sans-serif"><b><a href="tel:(778)%20825-1057" value="+17788251057" target="_blank">778-825-1057</a></b></font></div><div style="font-size:12.8px"><font size="4" face="arial narrow, sans-serif"><b><br></b></font></div><div style="font-size:12.8px"><a href="http://www.epicenergy.ca/" target="_blank"><img src="https://lh3.googleusercontent.com/ezD9JxeN67lTscselHjW4ZEqvQRj_i_T_Ky_s__GkR0AtanG1nK52CD1Rdhmyzbk7XRPf-Rhhnr2-SLPmhtd0J8xVMp0xOiR20ebQVb6jU2xwJPKN4lePRq5G2p93ybqA4SnqjCWCvEsNlK37a9FtStdFcTJyIoS2aHKiL69L3bZg1g7mEAMr7IHXVYvHgq3MX9rNaqIQx9T3uPuIHEDIfxrgpCrsBoEamgaRHj5hcpEobnogqCqpa1sRcKy927TSeR5BbVLM1-wn0h-4LvE8CMqj30jpQULxZ9uXEg_S6sR3ZeZjtkkRvgK4l_wiivWlyV_SjCDQ5QREG3jkuCjXC04i1NNmziGZZNWYsaohE6khrN4JGVtvaSOiS2woYJNz3Gt0EucxJp3eUBYspzTl9iZia7bLvFEGIODvmfjRVZJmnCrFucJxGkAtWn_EUIbxJXS5NWAFnvBoixQP563Fbu7dFKL77lDcb4PHwrnJVjqcgU0OTeiMBlMvEt97YgMpMvdi7rx9L4DeEbrIGUovgx4QLfRRoF_9u2mxFu8FHupCxfocSyB3vs8gqOLvVdx42qwiLN0sGLAg8K3G_vFwVNddXQ_yb3cGeCEAOTnk7jfiP4O4jsPIW2RRbnKKL-usL11Tp7gkxbgRouLOoyqpbisjA4vRWDeylj1yDGyBg=w400-h38-no" width="200" height="18"><br></a></div><div><b><font face="arial narrow, sans-serif" size="2">SUSTAINABLE MOBILE <font color="#6aa84f">ENERGY </font>SOLUTIONS</font></b></div></div></div><div><br></div><div><br><div><div><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote"><div><div class="gmail-h5">On Wed, Mar 21, 2018 at 8:41 PM, Terry hey <span dir="ltr"><<a href="mailto:recreationh@gmail.com" target="_blank">recreationh@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="gmail-h5"><div dir="ltr">Dear all, <div><br></div><div>Now, we can just read how many storage used, cpu usage on ovirt dashboard.</div><div>But is there any monitoring tool for monitoring virtual machine time to time?</div><div>If yes, could you guys give me the procedure? </div><div><br></div><div><br></div><div>Regards</div><span class="gmail-m_3718631290875671223HOEnZb"><font color="#888888"><div>Terry</div></font></span></div>
<br></div></div><span class="gmail-">______________________________<wbr>_________________<br>
Users mailing list<br>
<a href="mailto:Users@ovirt.org" target="_blank">Users@ovirt.org</a><br>
<a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/mailman<wbr>/listinfo/users</a><br>
<br></span></blockquote></div><br></div>
<br>______________________________<wbr>_________________<br>
Users mailing list<br>
<a href="mailto:Users@ovirt.org">Users@ovirt.org</a><br>
<a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/<wbr>mailman/listinfo/users</a><br>
<br></blockquote></div><br></div></div>