Why metrics are always 0 for each workflow_id?

Describe the problem/error/question

I would like monitoring my n8n instance. When I active it with:

      N8N_METRICS: true
      # N8N_METRICS_PREFIX: ''
      N8N_METRICS_INCLUDE_DEFAULT_METRICS: false
      N8N_METRICS_INCLUDE_CACHE_METRICS: true
      N8N_METRICS_INCLUDE_MESSAGE_EVENT_BUS_METRICS: true
      N8N_METRICS_INCLUDE_WORKFLOW_ID_LABEL: true
      N8N_METRICS_INCLUDE_NODE_TYPE_LABEL: true
      N8N_METRICS_INCLUDE_CREDENTIAL_TYPE_LABEL: true
      N8N_METRICS_INCLUDE_API_ENDPOINTS: false
      N8N_METRICS_INCLUDE_API_PATH_LABEL: false
      N8N_METRICS_INCLUDE_API_METHOD_LABEL: false
      N8N_METRICS_INCLUDE_API_STATUS_CODE_LABEL: false
      N8N_METRICS_INCLUDE_QUEUE_METRICS: false

The numbers of workflow_id is always 0

What is the error message (if any)?

# HELP n8n_cache_hits_total Total number of cache hits.
# TYPE n8n_cache_hits_total counter
n8n_cache_hits_total 8

# HELP n8n_cache_misses_total Total number of cache misses.
# TYPE n8n_cache_misses_total counter
n8n_cache_misses_total 9

# HELP n8n_cache_updates_total Total number of cache updates.
# TYPE n8n_cache_updates_total counter
n8n_cache_updates_total 1

# HELP n8n_workflow_started_total Total number of n8n.workflow.started events.
# TYPE n8n_workflow_started_total counter
n8n_workflow_started_total{workflow_id="unknown"} **0**
n8n_workflow_started_total 2

# HELP n8n_node_started_total Total number of n8n.node.started events.
# TYPE n8n_node_started_total counter
n8n_node_started_total{node_type="base_manualTrigger"} **0**
n8n_node_started_total 4

# HELP n8n_node_finished_total Total number of n8n.node.finished events.
# TYPE n8n_node_finished_total counter
n8n_node_finished_total{node_type="base_manualTrigger"} **0**
n8n_node_finished_total 4

# HELP n8n_workflow_success_total Total number of n8n.workflow.success events.
# TYPE n8n_workflow_success_total counter
n8n_workflow_success_total{workflow_id="S4svTPlpJ4g7xyQH"} **0**
n8n_workflow_success_total 2

Information on your n8n setup

  • n8n version: 1.56.2
  • Database (default: SQLite): SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Debian

Hi @kosssi

Thanks for posting here and welcome to the community! :tada:

The 0 at the end seems to be quite redundant. We’ve made a ticket to look into this internally :eyes:

You can see the actual counter below, e.g. n8n_node_started_total 4

1 Like

Thanks @ria for your reponse,

It’s not redundant. I would like know the number by tags :wink:

Finally I would like transform:

n8n_node_finished_total{node_type="base_manualTrigger"} 0
n8n_node_finished_total 4

to

n8n_node_finished_total{node_type="base_manualTrigger"} 4
n8n_node_finished_total 4
``

Hi @kosssi

I will add that to the ticket :wink: