Some string-based info from the "show info" output are returned as gauges
in promex, and the way it's done consists in forcing their label's name
and value to the desired name and values, then faking a value of 1 on the
gauge. Since 3.2 with commit
b03e05cd36 ("MINOR: stats: add alt name info
to stat_cols_info where relevant"), this label's name appears in the stats
info's alt_name field. Thus there's no need to hard-code it again in the
promex code. Let's first do this for the "node" label.
switch (ctx->field_num) {
case ST_I_INF_NODE:
- labels[lb_idx].name = ist("node");
- labels[lb_idx].value = ist(global.node);
+ labels[lb_idx].name = name;
+ labels[lb_idx].value = ist(field_str(&val, 0));
lb_idx++;
val = mkf_u32(FN_GAUGE, 1);
break;