Metricbeat - system.process.cpu.total.ticks Help

Hi,

I am working on the metricbeat to gather the sys & process info. The particular field -"system.process.cpu.total.ticks" , I am interested in this as, I need to create report by CPU time spent by the process.

I tried as below, however I am not successful so far.

metricbeat.modules:

  • module: system
    metricsets: [cpu]
    cpu.metrics: [percentages, normalized_percentages, ticks]
  • module: system
    metricsets:

    • cpu # CPU usage
    • filesystem # File system usage for each mountpoint
    • fsstat # File system summary metrics
    • load # CPU load averages
    • memory # Memory usage
    • network # Network IO
    • process # Per process metrics
    • process_summary # Process summary
    • uptime # System Uptime
    • core # Per CPU core usage
    • diskio # Disk IO
    • socket # Sockets and connection info (linux only)
      enabled: true
      period: 300s
      processes: ['.*']

    cpu.metrics: ["percentages", "normalized_percentages", "ticks"]
    core.metrics: ["percentages", "ticks"]

I also tried to use cpu_ticks: true , but it reported saying its depricated

2018/05/17 18:47:55.731592 cfgwarn.go:18: WARN DEPRECATED: cpu_ticks is deprecated. Add 'ticks' to the cpu.metrics list. Will be removed in version: 6.1

I tried in both metricbeat 6.1.2 and 6.2.4.

Any suggestions on how to get this metric?

Thanks.

Regards,
Suman

Can you try with:

- module: system
  metricsets:
    - cpu:
      metrics: [percentages, normalized_percentages, ticks]
   ...(rest of metricsets)...

HI,

I tried your suggestion, however its throwing some conversion error. My yml for system config is as below( no other metrics to keep it simple)

#------------------------------- System Module -------------------------------

  • module: system
    metricsets:
    • cpu: # CPU usage
      metrics: [percentages, normalized_percentages, ticks]

./metricbeat -e -c metricbeat.yml
2018/05/22 15:11:00.377749 beat.go:436: INFO Home path: [/opt/elk/metricbeat-6.1.2-linux-x86_64] Config path: [/opt/elk/metricbeat-6.1.2-linux-x86_64] Data path: [/opt/elk/metricbeat-6.1.2-linux-x86_64/data] Logs path: [/opt/elk/metricbeat-6.1.2-linux-x86_64/logs]
2018/05/22 15:11:00.377771 metrics.go:23: INFO Metrics logging every 30s
2018/05/22 15:11:00.377917 beat.go:443: INFO Beat UUID: 439db23c-def2-493b-a9f1-b14f40b17173
2018/05/22 15:11:00.377938 beat.go:203: INFO Setup Beat: metricbeat; Version: 6.1.2
2018/05/22 15:11:00.378220 client.go:123: INFO Elasticsearch url: http://168.72.199.108:9200
2018/05/22 15:11:00.378711 module.go:76: INFO Beat name: sd-4671-2176
2018/05/22 15:11:00.378987 beat.go:635: CRIT Exiting: 1 error: can not convert 'object' into 'string' accessing 'metricbeat.modules.0.metricsets.0' (source:'metricbeat.yml')
Exiting: 1 error: can not convert 'object' into 'string' accessing 'metricbeat.modules.0.metricsets.0' (source:'metricbeat.yml')

Any suggestions?

I tried as below (removed other metrics for ease of debugging) and I could get the system.cpu.ticks (like system.cpu.idle.ticks,system.cpu.irq.ticks,system.cpu.nice.ticks,system.cpu.system.ticks,system.cpu.user.ticks), however not the system.process.cpu..ticks in above two attempts.

#------------------------------- System Module -------------------------------

  • module: system
    metricsets:
    • cpu # CPU usage
      enabled: true
      cpu.metrics: [percentages, normalized_percentages, ticks]
      processes: ['.*']
  1. Tried to enable system.process.cpu* fields
    #------------------------------- System Module -------------------------------
  • module: system
    metricsets:
    • cpu # CPU usage
      enabled: true
      cpu.metrics: [percentages, normalized_percentages, ticks]
      process.cpu: ['.']
      processes: ['.
      ']

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.