|
@@ -86,10 +86,22 @@ function munin_core_munin_api_info() {
|
|
|
'#type' => MUNIN_API_GAUGE,
|
|
|
'#negative' => 'comment_count_unpub',
|
|
|
),
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'munin_core_taxonomy' => array(
|
|
|
+ '#title' => t('Core taxonomy statistics'),
|
|
|
+ '#info' => t('Core statistics regarding taxonomy.'),
|
|
|
+ '#graph_vlabel' => t('Vocabularies (-)/Terms (+)'),
|
|
|
|
|
|
+ 'vocab_count' => $int + array(
|
|
|
+ '#label' => t('Vocabularies'),
|
|
|
+ '#type' => MUNIN_API_GAUGE,
|
|
|
+ '#graph' => 'no',
|
|
|
+ ),
|
|
|
'term_count' => $int + array(
|
|
|
'#label' => t('Terms'),
|
|
|
'#type' => MUNIN_API_GAUGE,
|
|
|
+ '#negative' => 'vocab_count',
|
|
|
),
|
|
|
),
|
|
|
);
|
|
@@ -172,9 +184,15 @@ function munin_core_munin_api_fetch($graph_name) {
|
|
|
), WATCHDOG_NOTICE);
|
|
|
}
|
|
|
}
|
|
|
+ break;
|
|
|
|
|
|
+ case 'munin_core_taxonomy':
|
|
|
$sq = 'SELECT COUNT(*) FROM {term_data}';
|
|
|
$ret['term_count'] = db_result(db_query($sq));
|
|
|
+
|
|
|
+ $sq = 'SELECT COUNT(*) FROM {vocabulary}';
|
|
|
+ $ret['vocab_count'] = db_result(db_query($sq));
|
|
|
+ break;
|
|
|
}
|
|
|
|
|
|
return $ret;
|