1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-16 22:50:10 +03:00

feature #3718: Reduce monitoring info in the monitoring DB table

This commit is contained in:
Ruben S. Montero 2015-07-13 16:20:36 +02:00
parent 0c3a96ad1d
commit 91afe37528

View File

@ -1478,14 +1478,20 @@ error_common:
int VirtualMachine::update_monitoring(SqlDB * db)
{
ostringstream oss;
int rc;
ostringstream oss;
int rc;
string xml_body;
string error_str;
char * sql_xml;
sql_xml = db->escape_str(to_xml(xml_body).c_str());
oss << "<VM>"
<< "<ID>" << oid << "</ID>"
<< "<LAST_POLL>" << last_poll << "</LAST_POLL>"
<< monitoring.to_xml(xml_body)
<< "</VM>";
sql_xml = db->escape_str(oss.str().c_str());
if ( sql_xml == 0 )
{
@ -1497,6 +1503,8 @@ int VirtualMachine::update_monitoring(SqlDB * db)
goto error_xml;
}
oss.str("");
oss << "REPLACE INTO " << monit_table << " ("<< monit_db_names <<") VALUES ("
<< oid << ","
<< last_poll << ","