return FALSE;
}
+ if (metric->unknown_weight > 0) {
+ metric->accept_unknown_symbols = TRUE;
+ }
+
/* Handle actions */
val = ucl_object_find_key (obj, "actions");
if (val != NULL) {
/* Check whether this item is skipped */
skipped = !ghost;
- if ((item->type & SYMBOL_TYPE_NORMAL) && cache->cfg &&
- g_hash_table_lookup (cache->cfg->metrics_symbols, item->symbol) == NULL) {
+ if ((item->type & (SYMBOL_TYPE_NORMAL|SYMBOL_TYPE_VIRTUAL|SYMBOL_TYPE_COMPOSITE))
+ && cache->cfg
+ && g_hash_table_lookup (cache->cfg->metrics_symbols, item->symbol) == NULL) {
cur = g_list_first (cache->cfg->metrics_list);
while (cur) {
m = cur->data;
GList *mlist;
skipped = FALSE;
- item->weight = item->weight * (m->unknown_weight);
+ item->weight = m->unknown_weight;
s = rspamd_mempool_alloc0 (cache->static_pool,
sizeof (*s));
s->name = item->symbol;