Event stopped process

how to capture the status of the process when it is interrupted? I only have the status when it is running and sometimes I get a process status that has stopped.

Auditbeat 7.1.0 (Windows Server 2008 R2)
Elasticsearch 7.0.0 (Ubuntu Server 18.04 LTS)

Hi @holiveira - by "interrupted" do you mean stopped? The Auditbeat system/process dataset reports stopped processes (likely what you are seeing as a stopped process status - it's an event with event.action: process_stopped).

Can you post an example of a process start that does not have a corresponding process stop but you think it should? And provide your configuration as well?

Hi @cwurm, yes I mean, stopped.

Configuration:

- module: system
  datasets:
    - process # Started and stopped processes
  state.period: 5s

processors:
- drop_event:
    when:
      not:
        regexp:
          process.name: "notepad.*" 

I am monitoring only one process, in this case notepad.exe, in my understanding, when opening the notepad, should receive a process_started and in the course of time while the running process is receiving existing_process and when to stop the process receive the process_stopped.

What I've noticed is that existing_process occurs perfectly, but the process_started and process_stopped events do not occur.

I made a simulation, follows logs:

Auditbeat:

In this example, my logstash processed 3 documents:

 "event": {
      "action": "existing_process",
      "dataset": "process",
      "id": "ebe2f666-09f0-42a8-9077-be59fa8d81d8",
      "module": "system",
      "kind": "state"
    }

"event": {
      "module": "system",
      "dataset": "process",
      "action": "existing_process",
      "id": "76f10fdd-5d5d-4aa8-bab4-06b490574dfe",
      "kind": "state"
    }

 "event": {
      "kind": "state",
      "dataset": "process",
      "action": "existing_process",
      "id": "88ba5d01-802d-414e-bc67-b66465e9033c",
      "module": "system"
    }

There was no process_started and no process_stopped.

Ok, I'm curious: If you increase state.period to something like 12h - do you then see process_started and process_stopped events?

1 Like

Interesting, it worked perfectly.

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