ido_mysql, livestatus: Use Application::GetVersion().

This commit is contained in:
Michael Friedrich 2013-10-09 11:24:37 +02:00
parent 78fa9bca09
commit 40f827df58
2 changed files with 4 additions and 3 deletions

View File

@ -156,7 +156,8 @@ void IdoMysqlConnection::ReconnectTimerHandler(void)
/* record connection */ /* record connection */
Query("INSERT INTO " + GetTablePrefix() + "conninfo " + Query("INSERT INTO " + GetTablePrefix() + "conninfo " +
"(instance_id, connect_time, last_checkin_time, agent_name, agent_version, connect_type, data_start_time) VALUES (" "(instance_id, connect_time, last_checkin_time, agent_name, agent_version, connect_type, data_start_time) VALUES ("
+ Convert::ToString(static_cast<long>(m_InstanceID)) + ", NOW(), NOW(), 'icinga2 db_ido_mysql', '2.0', '" + (reconnect ? "RECONNECT" : "INITIAL") + "', NOW())"); + Convert::ToString(static_cast<long>(m_InstanceID)) + ", NOW(), NOW(), 'icinga2 db_ido_mysql', " + Application::GetVersion()
+ ", '" + (reconnect ? "RECONNECT" : "INITIAL") + "', NOW())");
/* clear config tables for the initial config dump */ /* clear config tables for the initial config dump */
ClearConfigTables(); ClearConfigTables();

View File

@ -154,12 +154,12 @@ Value StatusTable::NumServicesAccessor(const Value& row)
Value StatusTable::ProgramVersionAccessor(const Value& row) Value StatusTable::ProgramVersionAccessor(const Value& row)
{ {
return "2.0"; return Application::GetVersion();
} }
Value StatusTable::LivestatusVersionAccessor(const Value& row) Value StatusTable::LivestatusVersionAccessor(const Value& row)
{ {
return "2.0"; return Application::GetVersion();
} }
Value StatusTable::LivestatusActiveConnectionsAccessor(const Value& row) Value StatusTable::LivestatusActiveConnectionsAccessor(const Value& row)