elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.76k stars 8.17k forks source link

[Infra] Running processes missing from Processes table #184582

Open crespocarlos opened 4 months ago

crespocarlos commented 4 months ago

Summary

The query that returns the processes list does a terms agg on system.process.cmdline. If a process cmdline has over 2048 characters, this field will be ignored due to it being longer than what's defined in the mappings

 ".ds-metricbeat-8.15.0-2024.05.31-000001": {
    "mappings": {
      "system.process.cmdline": {
        "full_name": "system.process.cmdline",
        "mapping": {
          "cmdline": {
            "type": "keyword",
            "ignore_above": 2048
          }
        }
      }
    }
  },

When a field is ignored, it won't function properly when aggregating or filtering by it, resulting in missing processes in the processes table.

How to reproduce

// Keep the process running indefinitely setInterval(() => { console.log('Dummy process is running.'); }, 1000);


- Create another dummy js file and name it `missing_process.js`
```js
console.log('Dummy process started.');
console.log('Received arguments:', process.argv.slice(2)); // Excluding 'node' and script name

// Keep the process running indefinitely
setInterval(() => {
    console.log('Dummy process is running.');
}, 1000);

Image

Image

Image

Possible solution

elasticmachine commented 4 months ago

Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services)

crespocarlos commented 4 months ago

cc @roshan-elastic @smith