mirror of https://github.com/Icinga/icinga2.git
Remove Icinga DB perfdata from Icinga check
as the Icinga DB check already yields it.
This commit is contained in:
parent
8eef51afeb
commit
88c8d29ee6
|
@ -29,8 +29,6 @@ std::mutex IcingaDB::m_EnvironmentIdInitMutex;
|
|||
|
||||
REGISTER_TYPE(IcingaDB);
|
||||
|
||||
REGISTER_STATSFUNCTION(IcingaDB, &IcingaDB::StatsFunc);
|
||||
|
||||
IcingaDB::IcingaDB()
|
||||
: m_Rcon(nullptr)
|
||||
{
|
||||
|
@ -42,28 +40,6 @@ IcingaDB::IcingaDB()
|
|||
m_PrefixConfigCheckSum = "icinga:checksum:";
|
||||
}
|
||||
|
||||
/**
|
||||
* Feature stats interface
|
||||
*
|
||||
* @param status Key value pairs for feature stats
|
||||
*/
|
||||
void IcingaDB::StatsFunc(const Dictionary::Ptr& status, const Array::Ptr& perfdata)
|
||||
{
|
||||
DictionaryData nodes;
|
||||
|
||||
for (auto& icingadb : ConfigType::GetObjectsByType<IcingaDB>()) {
|
||||
auto historyBufferItems (icingadb->m_HistoryBulker.Size());
|
||||
|
||||
nodes.emplace_back(icingadb->GetName(), new Dictionary({
|
||||
{ "history_buffer_items", historyBufferItems }
|
||||
}));
|
||||
|
||||
perfdata->Add(new PerfdataValue("icingadb_" + icingadb->GetName() + "_history_buffer_items", historyBufferItems));
|
||||
}
|
||||
|
||||
status->Set("icingadb", new Dictionary(std::move(nodes)));
|
||||
}
|
||||
|
||||
void IcingaDB::Validate(int types, const ValidationUtils& utils)
|
||||
{
|
||||
ObjectImpl<IcingaDB>::Validate(types, utils);
|
||||
|
|
|
@ -37,7 +37,6 @@ public:
|
|||
IcingaDB();
|
||||
|
||||
static void ConfigStaticInitialize();
|
||||
static void StatsFunc(const Dictionary::Ptr& status, const Array::Ptr& perfdata);
|
||||
|
||||
void Validate(int types, const ValidationUtils& utils) override;
|
||||
virtual void Start(bool runtimeCreated) override;
|
||||
|
|
Loading…
Reference in New Issue